[转]Angular, Backbone, or Ember: Which is Best for your Build?

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:

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:

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:

上一篇:MyEclipse 2016 CI 4新增BootStrap模板


下一篇:[Angular] Setup automated deployment with Angular, Travis and Firebase