Re:On "The Future of JavaScript MVC Frameworks"
by swannodette on Monday February 24, 2014 @05:31PM
(#7293869)
I personally don't see much value in automatic two way binding. It's a little bit of convenience that's really easy to build over React/Om if that's your cup of tea, http://facebook.github.io/react/docs/two-way-binding-helpers.... Immutability doesn't present any challenges here.
Re:On "The Future of JavaScript MVC Frameworks"
by haberman on Monday February 24, 2014 @05:47PM
(#7293942)
ReactLink (which you linked to) calls setState() on the React component state when the DOM changes -- wouldn't this violate the assumptions of your shouldComponentUpdate() implementation?
Re:On "The Future of JavaScript MVC Frameworks"
by swannodette on Monday February 24, 2014 @05:58PM
(#7293986)
We don't use setState, but we have om.core/set-state! which does pretty much the same thing - an OmLink would not be very hard to do.
The main reason I dug into this so deep is because after reading your article I had a nagging feeling that using anything other than React or immutable data structures was an architectural dead end. But I'm not so worried about that now; I think that any framework that aggressively batches DOM updates will probably be ok performance-wise, and I think that mutable data structures can perform well.
Also I think that some features are easier to provide with mutable structures, such as automatic two-way data binding a la Angular. How do you propagate DOM changes to your models? Manual event handlers or do you have something more automatic?
I definitely think that immutable data structures are worth consideration for their snapshotting ability though.