Angular, Backbone, or Ember: Which is Best for your Build?
With the release of our Shaping Up With Angular.js course, Code School has now produced a hat trick of courses focused on JavaScript frameworks. In order to choose which framework is right for your build, we’ve asked four important questions of each framework.
AngularJS
1. What is AngularJS?
AngularJS is a client-side JavaScript framework that allows you to organize large, client-heavy applications into something manageable.
2. What does Angular do better than competing frameworks?
Angular has nifty features such as two-way data binding, the ability to make custom HTML tags/attributes/comments that encapsulate functionality, and built-in directives that extend the functionality of normal HTML. Angular is also really versatile, it can be used for large, one-page app projects or for a small little element; there’s not much setup required to start using Angular’s built-in directives.
3. Where does Angular fall short?
Angular’s biggest drawback is that there can be many ways to do one thing. Until you use Angular for something fairly big, it can be difficult to find the best ways of doing things. Also, you have to be very careful to clean up events and DOM elements if you work with them in a “non-Angular” way or you may create memory leaks.
4. What type of applications are best built with Angular?
Angular is great for just about anything you want to do with JavaScript in the browser, big or small. If you want a framework that makes your HTML more declarative and gives you neat features like directives, then AngularJS is a great choice. If you want a more opinionated framework that forces you to structure code in a particular way, then you might want to look at another option.
Some applications built with AngularJS include:
- YouTube for PS3
- Our new Code School course system is a fairly large and complex AngularJS app. The two courses currently using it are Discover Drive and Shaping Up With AngularJS
- More examples found at: https://builtwith.angularjs.org/
Backbone.js
1. What is Backbone.js?
Backbone.js is a minimalistic JavaScript framework that gives structure to web applications by pulling your “truth” — your model — out of your DOM and into Backbone’s Model, Collection, and View objects.
2. What does Backbone do better than competing frameworks?
Backbone is relatively easy to implement on a small portion of a page, and at only 6KB for the entire production version library, a little code can mean a lot of organization for your application. With far fewer concepts to grasp than Angular or Ember, Backbone is easier to get started with and allows for greater control over the method of implementation.
3. Where does Backbone fall short?
The “hands-off” approach of Backbone may mean implementing many features that are already in other frameworks. Backbone doesn’t include data-binding, the ability to have changes in one place trigger a change elsewhere. You could set this up on a per-case basis, but it’s not a core feature of Backbone.
4. What type of applications are built with Backbone?
Being one of the first JavaScript MVC (or what most call MVV) frameworks, Backbone has a head start on other frameworks that have only become popular in the last year or two.
Some applications built with Backbone.js include:
- A number of Code School courses, like Try Ruby, Try jQuery, Try Objective-C, and yes, even Warming Up With Ember.js
- Khan Academy
- Groupon Now
- Stripe
- Airbnb Mobile Web
- More examples found at: http://backbonejs.org/#examples
Ember.js
1. What is Ember.js?
Ember is a framework for creating rich JavaScript web applications.
2. What does Ember do better than competing frameworks?
Ember has conventions that can help developers be more productive and write better code. These conventions help facilitate the collaboration between different developers working on the same project. Ember also has top-notch router and URL handling.
3. Where does Ember fall short?
After you get past the basics, Ember’s learning curve can be a bit steep. Since the API has changed so rapidly, a lot of the code examples you may find online are out of date.
4. What type of applications are built with Ember?
Ember is typically used for building long-lived applications, such as admin dashboards where a user is expected to keep their browser open for many hours.
Some teams that build with Ember.js include:
- Zendesk
- Yahoo!
- Travis CI
- More examples found at: http://emberjs.com/ember-users/
If you’re interested in learning more about AngularJS, Backbone.js, or Ember.js, Code School offers intro courses for each of these technologies. To see the full list of Code School courses, visit: https://www.codeschool.com/courses
Special thanks to Adam Rensel, Adam Fortuna, Carlos Souza, and Dray Lacy for the framework insight!