Re:Rethinking Backbone.js View Rendering
by clintjhill on Friday March 08, 2013 @11:15AM
(#5344152)
We agree on having a single source of truth. I'm arguing for it to be derived in a controller and not in a view.
Re:Rethinking Backbone.js View Rendering
by ricardobeat on Friday March 08, 2013 @09:28PM
(#5347014)
Then the controller becomes a second source of truth, no?
I guess I feel somewhat strongly about this because having multiple sources for the same truth is what gets people into trouble so often with client-side apps. (Where by a "truth" I mean something like: "What are the names of the collaborators on this document".) Having that data in your model and then again in your viewmodel, and some parts of your app access it over here, and your templates access it over there, is exactly that sort of unnecessary duplication...