Hacker News new | ask | show | jobs
by lapusta 4964 days ago
Backbone is a great framework and moved the industry forward a lot in terms of code quality. But there are definitely couple things broken, like Zombie/Ghost views - everyone(!) is making their own workaround.

View part is too much DIY. Seriously, _.template is okay for views with no input and simple updates, but if you have heavy IO views become bloated. Check the wiki, there are 7 "yet another binding plugins". Make default one, and make it an option (view binding can be slow and not needed sometimes).

Another DIY are models relations & nesting. These two additions wouldn't be big for the core, but they could really improve the ecosystem. Now you have to take in mind those third-party plugins people are using for these covering basic gaps.

2 comments

In my opinion binding should be included with backbone. Rendering views over and over again is pointless and if it's a form it will lose focus. There is already one binding plugin that isn't being developed anymore. A winner should be picked and integrated.

I haven't created a monolithic backbone application but model relations and nesting could add significant complexity. Adding binding, model relations, and nesting will make backbone look more like Ember which I think they are trying to stay away from.

So what do you suggest?
I haven't used Backbone.js, but from what I've read there are extensions like Backbone.Marionette for better view and memory management.

https://github.com/marionettejs/backbone.marionette

As obviously stated in other threads... I've moved to Angular. Their 'digest all the changes and update the dom once' makes a lot of sense... and it has basically inverse opinion from Backbone. (Backbone has lots of opinion about data / saving, while Angular has more opinion about binding and logic.)
Backbone is an opinionated software, so it's hard to say if binding would be ever included.

For developers I suggest to try some of plugins, which are listed on GitHub wiki in the binding section and also take a look at Knockout/Ember/Angular so at least you would know what other frameworks offer.

Ember.js?