Great article highlighting some common areas for attention -- <i>especially</i> when first moving from vanilla jQuery to something like Backbone ... but important for any basic Model/View layer separation.<p>For what it's worth, <i>all</i> 5 of these points are addressed by the Backbone docs, and there are some further nuances worth mentioning:<p>1. listenTo() is great when you're connecting <i>from</i> an object (frequently a View) that will be removed long before the object that its observing is removed. But when the two (the observer, and the observed) tend to live and die together in the same cycles, no special care is needed, as garbage collection will simply remove both together.<p>2. An easier way to avoid multiple DOM reflows when rendering collections, is to simply use a less granular template instead of a document fragment. You can even render the "item" template directly within the optimized "collection" template (remember, a template is just a function that takes data and returns HTML). For example:<p><pre><code> <div class="books-collection">
<% books.each(function(book) { %>
<%= templates.bookItem({model: book}) %>
<% }); %>
</div>
</code></pre>
3. Absolutely. Addressed in the FAQ: <a href="http://backbonejs.org/#FAQ-bootstrap" rel="nofollow">http://backbonejs.org/#FAQ-bootstrap</a>. While bootstrapping models, be careful that you don't inject arbitrary user JSON into the page without properly escaping it first -- if there's any data shared publicly between different users of your app. Otherwise they can throw a "</script>" into their post, and ruin your day.<p>4. All of Backbone's "save" calls are optimistic <i>by default</i>. If you'd rather a specific call be pessimistic instead, just pass "{wait: true}", in order to wait for the server to respond with a 200 OK before emitting the change on the client.<p>5. Yep. Instead of putting further model changes in a "success" callback, simply have a listener waiting for the "change" event. Then Ajax is out of the equation, and whenever the model state is considered to be "change"'d on the client-side, that change propagates appropriately through the system.