Backbone.js is a lightweight MVC framework. After appearing in 2010, it quickly grew popular as a lean alternative to heavy, full-featured MVC frameworks such as ExtJS. This resulted in many services adopting it, including Pinterest, Flixster and AirBNB among others. It gives structure to web applications by providing models with key-value binding, custom events, collections with a rich API of enumerable functions and views. It can connect your existing API over a RESTful JSON interface. Backbone has a hard coded dependency on Underscore.js.
Ember's roots go way back to 2007. Starting its life as the SproutCore MVC framework, originally developed by SproutIt and later by Apple. It was formed in 2011 by Yehuda Katz, a core contributor to the popular jQuery and Ruby on Rails projects. Notable Ember users include Yahoo!, Groupon, and ZenDesk.
Ember allows developers to create scalable single-page applications. It offers a rich object model, declarative two-way data-binding, computed properties, automatically-updating templates powered by Handlebars.js and a router for managing application state.
An important factor when choosing a framework is the size of the community and the rate of activity on it. Angular.js has a larger, faster growing and more active community than the other frameworks mentioned here. It also has more highly starred projects on GitHub and more questions on StackOverflow compared to Backbone.js and Ember.js combined.
Page load times are crucial for a successful web application. Users need access to information quickly. There are two factors which impact on loading times: the size of the framework and the time it takes to bootstrap it.
Comparing the minified version of each framework, Angular (1.2 - 105Kb) has the largest footprint followed by Ember.js (1.9.1 - 97Kb) and Backbone.js (1.1.2 - 6,5Kb). However, Angular does not have any dependencies while Backbone needs at least Underscore.js (5,2Kb). Ember.js and Backbone.js also benefit from using JQuery (82Kb). If our comparison includes these dependencies, Angular.js actually has the smallest footprint.
Angular and Ember include a template engine. Backbone, on the other hand, leaves it up to developers to use the template engine of their choice and Underscore templates are common here.
With Angular.js a developer can quickly start building an impressive web application, like using two-way binding, without having to learn much. It looks easy at first sight but after getting the basics, a steep learning curve follows. When using Angular.js, the developer must learn some very specific jargon. Ember.js has a comparative learning curve to Angular.js.
Backbone.js is easier to learn but leaves developers to make important decisions by themselves. Alongside Backbone.js the developer must learn the basics of other libraries like Underscore.js.
An informed decision
Choosing the right framework is an important decision when building a web application. Angular.js is the fastest growing and most active framework for the moment. It has a large community and Google’s backing. It’s definitely here to stay and works well for small and large projects. Backbone.js is the minimalist framework, small and easy to learn. Ember uses the MVC structure that many developers already know. All frameworks mentioned in this post help developers in creating flexible, powerful and mobile applications.