问题
i'm looking for a good backbone.js + require.js boiler plate for my app as this will give me a good idea of how to modularize my code and get me started. i'm using backbone.js-AMD-Boilerplate ( link ) but i'm not sure if there is some other boiler plate better than this. i don't want to indulge myself more into any other loader or framework to keep things simple for my project. i'm in the beginning so i'm just focusing on backbone.js and require.js ( text.js to load my html templates ). need your opinions on this guyz thnx
回答1:
This seems to be the most popular backbone boilerplate...
With regards to requirejs you may reconsider against using any module loader until your app is past its initial stages and you indeed have many modules - it is much easier to develop/debug this way and it is not difficult to add a module loader later as long as you avoid using globals and encapsulate your modules in function () { ... your module ... }
.
That is only my personal opinion that probably will not be supported by people who have forgotten how it was when you're just starting to use module loaders ;)
回答2:
Here you can find more comprehensive solution with up-to-date dependencies, latest bugfixes and useful examples included.
(Backbone + CoffeeScript + Browserify + SASS/SCSS + Image-min + Jasmine) x Grunt
https://github.com/antarasi/backbone-boilerplate
来源:https://stackoverflow.com/questions/14037727/best-backbone-js-and-require-js-boilerplate-for-huge-apps