Re:Backbone.js - Model and Views: Image Gallery Tutorial
by jondot on Friday August 26, 2011 @03:44PM
(#2929709)
That's a good question. If you think of a model representing whats behind a view, in a non-web world (stateful), selectedness can very well sit in a model - as long as it represents a state of the view.
In this example, the selectedness sits in the collection, however it may sit in the view. See more about this here, for example:
http://stackoverflow.com/questions/6519990/best-way-to-make-...
[ Parent
| on HN ]
Re:Backbone.js - Model and Views: Image Gallery Tutorial
by finpingvin on Friday August 26, 2011 @04:24PM
(#2929837)
Yup, can simplify code for wiring together views a great deal and promote decoupling between them.