|
I'm trying to keep things "bare bones" with Backbone for a huge refactoring I'm doing, and I'm happy so far, I like the quick learning curve, the "stay out of my way" the ability to gradually refactor the code instead of the rewrite that Angular or Ember will probably trigger. The annotated source is a great help, and although I struggled on deciding on namespace and structuring conventions, the freedom to chose my own was helpful. Having that said, I'm starting to regret I didn't do the refactoring using AngularJS, and here are the main pain points - the following must need a plugin, and the plugins keep playing catch with the core releases (not all are 1.0 compatible): - Manual binding - Nested collections / models - Bootstrapping without pushstate * The pain in manual binding is not just for things like a checkbox, the pain starts for syncing things like a sortable list, syncing manually is just painful, it should auto sync with the model * Nested models / collections are an issue mostly due to moving from relational to noSQL database, one can use plugins, or use the method you suggest in the FAQ (I use it, it's not that bad) but it's not built in. * Bootrapping without pushState support - the assumption that models will be bootstrapped (e.g. the fetch change event trigger will trigger if you load the model via Ajax the first time) is an aching point if you can't have pushState (user refreshes a page / clicks a deep link, the hash path is not sent to the sever, wrong model is being bootstrapped)
The solution someone suggested is to have a "once" on "sync" and only then start listening to a change, I think it's a hack, and I still can't find a solution to it. Bottom line, Backbone is great, and will be great, but needs to have the core plugins (Modelbinder, Deep Model / Relational / Nested Models) become part of the core, it's not a luxury. Backbone is smaller than Angular, but if you add all the plugins you usually will need, it can become even bigger... |