model view controller - MVC vs. Flux ? Bidirectional vs. Unidirectional? -


looking @ following diagram (which explains mvc), see unidirectional data flow.

so why consider mvc have bidirectional data flow while justifying flux ?

mvc pattern

because in javascript frameworks mvc not work way depicted. ui communicates bi-directionally model, in:

  1. user types view input
  2. mvc framework binds onchange() update model.
  3. ajax request brings in new model data.
  4. mvc framework updates view input's value match model.

in flux architecture, ui fire independent action type , associated data dispatcher update model same way background ajax method update model.

reference: http://www.thesoftwaresimpleton.com/blog/2013/03/23/client-side-mvc/

"client side mvc different server side mvc"

"we setting 2 way communication between 2 objects..."

"in short wiring value of firstname property of person object value property of input."

http://guides.emberjs.com/v1.10.0/object-model/bindings/

bindings in ember.js can used object, not between views , models.


Comments

Popular posts from this blog

matlab - error with cyclic autocorrelation function -

django - (fields.E300) Field defines a relation with model 'AbstractEmailUser' which is either not installed, or is abstract -

c# - What is a good .Net RefEdit control to use with ExcelDna? -