These are chat archives for jdubray/sam

Jan 2017
Jean-Jacques Dubray
Jan 17 2017 15:54
I had a good laugh this morning Michel is promoting two-way data binding in MobX
Once you get past very simple applications, programming on the web can become a nightmare of event handling and notifications
This is one reason why Model/View/Controller architectures (MVC) have become pretty much de rigour
However, MVC also requires that when you change the model, the view will change in response. This is pretty easy to accomplish when there is a direct one-to-one relationship between a component and its associated value.
devin ivy
Jan 17 2017 16:01
the code doesn't look like two-way binding, at least not in the sense of angular 1's ng-model. it's manually listening to input events and changing properties.
it's more like a demo of how to achieve two-way data binding. but yeah... strange demo!
Jean-Jacques Dubray
Jan 17 2017 16:19
Well, it's a question of programming model/factoring of the code, it's not so much about having automatic data binding. Basically what he is saying here is that he wants to bind a model property to an input value and then use the MobX reaction to computables/observables to update the UI.
In SAM it would amount putting all your code in the State Representation (computables)
No action or model logic