3 ms·
Do you have any conventions for keeping your Backbone code sane?
by atomical 14y ago
Do you have any conventions for keeping your Backbone code sane?
- philfreo 14y agoI'll write more about it soon. But overall using RequireJS modules. Generally one "class" (Model, Collection, or View) per .js file - though helper classes end up in the same file. Have a different environment for dev vs. production to make dev easy and production fast. In dev handlebars templates are fetched/parsed on the fly. On production they are precompiled. Overall I like most of what's found here: https://github.com/tbranyen/backbone-boilerplate https://github.com/tbranyen/backbone-boilerplate Also using a few base classes and plugins to keep things DRY.