anchor.diff:  -module(wf).
  --author('Rusty Klophous').
  +-author('Maxim Sokhatsky').
   -include_lib("n2o/include/wf.hrl").
   -compile (export_all).
   
  -wire(Actions) ->  ok = wire(undefined, undefined, Actions).
  -wire(Target, Actions) -> ok = wire(Target, Target, Actions).
  -wire(Trigger, Target, Actions) -> ok = action_wire:wire(Trigger, Target, Actions).
  +% Here is Nitrogen Web Framework compatible API
  +% Please read major changes made to N2O and how
  +% to port existing nitrogen sites at http://synrc.com/framework/web/
  +
  +% N2O Core API compatible with Nitrogen
  +% =====================================
  +
  +% Update DOM wf:update
  +
   set(Element, Value) -> ok = action_set:set(Element, Value).
   update(Target, Elements) -> ok = action_update:update(Target, Elements).
   replace(Target, Elements) -> ok = action_update:replace(Target, Elements).
  
positive.code: insert_before(Target, Elements) -> ok = action_update:insert_before(Target, Elements).
  insert_after(Target, Elements) -> ok = action_update:insert_after(Target, Elements).
  remove(Target) -> ok = action_update:remove(Target).
  flash(Elements) -> element_flash:add_flash(Elements).
  flash(FlashID, Elements) -> element_flash:add_flash(FlashID, Elements).
  f(S) -> _String = wf_utils:f(S).
  f(S, Args) -> _String = wf_utils:f(S, Args).
  coalesce(L) -> _Value = wf_utils:coalesce(L).
  redirect(Url) -> action_redirect:redirect(Url).
  redirect_to_login(LoginUrl) -> action_redirect:redirect_to_login(LoginUrl).
  redirect_from_login(DefaultUrl) -> action_redirect:redirect_from_login(DefaultUrl).
  pickle(Data) -> _SerializedData = wf_pickle:pickle(Data).
  depickle(SerializedData) -> _Data = wf_pickle:depickle(SerializedData).
  depickle(SerializedData, TTLSeconds) -> _Data = wf_pickle:depickle(SerializedData, TTLSeconds).
  to_list(T) -> _String = wf_convert:to_list(T).
  to_atom(T) -> _Atom = wf_convert:to_atom(T).
  to_binary(T) -> _Binary = wf_convert:to_binary(T).
  
negative.code: state(Key, Value) -> ok = state_handler:set_state(Key, Value).
  clear_state(Key) -> ok = state_handler:clear(Key).
  clear_state() -> ok = state_handler:clear_all().
  flash(Elements) -> element_flash:add_flash(Elements).
  flash(FlashID, Elements) -> element_flash:add_flash(FlashID, Elements).
  async_mode() -> wf_context:async_mode().
  async_mode(AsyncMode) -> wf_context:async_mode(AsyncMode).
  switch_to_comet() -> async_mode(comet).
  