|
|
|
|
|
by catshirt
4841 days ago
|
|
>> How does everything fit together? initialize models and controllers, then pass that data to newly initialized views. at any scale, this hardly differs. >> How should I handle templates? backbone is template agnostic so the answer is "however you'd like". because I use r.js, my preference is loading the templates as separate text modules and defining them on my view. when our production script is build, the templates are inlined into the javascript through r.js. your qualms with the todo example (no AJAX, global variables, strange template handling) are things that are not at all pertinent to Backbone and are solved by other patterns. point being, Backbone has it's own model/view pattern, but you can look at it in isolation. your other concerns are things solved by patterns with no pertinent relation to Backbone. |
|