In this presentation, I cover a few of the things that I find myself doing over and over again in any Backbone code that I work with.
There are a couple of points I want to stress:
- Lots of small classes that are easily testable make for fun programming
- Avoid single page apps unless you have a good reason too. Can you really justify it? Do your customers care? Zendesk is a good example of a single page app. Its the kind of thing you have open all day. Great use.
- Think about passing a template as an option to the class your building. What if you were responsible for the UI - not it. (check out the autocompletor link below)
- If you need to attach existing behaviour to a page with a Backbone View - checkout the ProxyView (check the link below)
Here are the links to the code I open sourced along with this presentation:
The presentation git repo is here: