Instead, RequireJS yielded a fairly verbose and error-prone header* coupled with large and distinct JS downloads for each and every page. Add in Backbone's verbosity and it's boilerplate and hand-wiring all the way down. Just the kind of thing for when you want to handcraft an artisan website, but not so great for cranking out code.
* Good luck catching typos when you're pulling in 20 modules and you lose synchronization between the strings and the vars. Here's a simple example:
define([
'jquery',
'handlebars',
'backbone',
'mymodel',
'mycontrolleranimals',
'mycontrollerpeople',
'myview_cats',
'myview_dogs',
'myview_birds'
],
function(
$,
Handlebars,
Backbone,
MyModel,
MyControllerAnimals,
MyControllerPeople,
MyViewDogs,
MyViewCats,
MyViewBirds) {
Sure, you caught the error because you were looking for it, but what happens in a RequireJS application is that you get weird errors in your application because you were trying to use the MyViewDogs, but myview_cats was actually bound to that variable.To be perfectly honest, I didn't build the system, so don't that it was configured correctly.