TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: AngularJS vs Backbone vs Ember?

25 pointsby gawkeralmost 13 years ago
Hi guys,<p>I'm starting a new project and am wondering what are the pros and cons of each framework over the other?<p>Thanks!

10 comments

ludicastalmost 13 years ago
Angular beats Backbone like a prison rape scene. I wrote the peepcode backbone todo app in 1/3 the code using angular (over here: <a href="https://github.com/ludicast/angular-peepcode-todo" rel="nofollow">https://github.com/ludicast/angular-peepcode-todo</a>, n.b. I haven't had time to update to newest Angular)<p>Haven't used ember, but I do mancrush ykatz, so sure he is taking it to good places.
Lazarealmost 13 years ago
You first need to consider what <i>kind</i> of framework you want.<p>Backbone is a very light MVC framework that provides you a few minimal tools for structuring your project. It doesn't get in your way, and it won't have any performance issues. On the other hand, it doesn't hold your hand, and it doesn't help you solve any especially hard problems. A simple demo app tends to look very clean when implemented in Backbone, but anything more complicated will require you to write a <i>TON</i> of code. (By design; Backbone only provides functionality that everyone will need, regardless of the type of project.)<p>The other two you listed are heavier, and more opinionated. They will do a lot more to help you, <i>if</i> you're working the way they think you'll work. If you aren't, they can be counter-productive; it's not hard to miscode something to get a major performance penalty.<p>I evaluated every framework I could get my hands on, and settled on Knockout. It's quite similar to AngularJS and Ember, but feels more mature than either, and has great documentation. Its killer feature is it's two way bindings between the DOM and the JS models.<p>My project is basically a very complex CRUD app; I've got tons of complex, deeply nested records I need to display and let users edit; a good, fast, clean UI for doing so is crucial. My initial spike using Backbone bogged down in endless boilerplate to try and keep everything in sync, and tons of ugly JQuery code to manipulate the DOM. (And was buggy to boot, which I'm sure was my fault, but highlights that Backbone can have a somewhat rough learning curve.) Knockout, however, made it a snap. My code was shorter, cleaner, easier to write and maintain, and fast.<p>So, my suggestion: Backbone if you're comfortable with writing all the functionality you need from scratch, and just want a little structure for your app. On the other hand, if you want a very robust framework for writing CRUD apps with a rich UI, and want to make your life easy, go with Knockout.<p>(Ember and Angular are good too, but in my view they're too similar to Knockout. There's just no compelling reason to choose them, given that Knockout is more mature and polished.)
评论 #4180452 未加载
评论 #4188213 未加载
MrMikealmost 13 years ago
Our front-end team did extensive research on this that wrapped up a just a couple days ago. They landed on angular and have been very happy. I'll see if I can get one (or more) of them to comment on their findings.
snbalmost 13 years ago
In order to make a reasonable choice between js MVC frameworks, the best is to write on your own a small app and decide for yourself. During my research, I have the following chart. 1. JavascriptMVC 2. AngularJS 3. Backbone All the rest (Ember, Knockout, Dojo) aren't nearly close to the 3 winners. Backbone and Angular were described quite good. So, I'll add what I've loved about JavascriptMVC (JMVC) and what problems it solves out of the box: Problem 1: How to structure the project? Where are 100+ variants to structure the folders of the project. It's important when is grows. JMVC has automatically generated empty project with very clean structure: separate folder with models, and separate folder per module for controllers and views. Problem 2: AMD AMD is built in into JMVC Problem 3: jQuery support JMVC is built on jQuery, so no collision happens what so ever Problem 4: Documentation JMVC has plenty of ot including API description, tutorials and active community Additional sugar: It has built it google closure compiler and minifier and checks your js code and optimize it; It has built in documentation script that generates documentation out of comments. Thus, JMVC is not just an Javascript MVC framework, it's great set of tool for the development of serious heavy apps.
taterbasealmost 13 years ago
Angular is fast and easy for development. Very ittle boiler-plate and comes with easy UI bindings. I feel it's perfect for smaller projects where separation of logic isn't as important. Angular has the ability to grow in complexity if you need it too.<p>Backbone comes with a lot of boilerplate, but honestly is worth it if you have a larger front end app. Being able to have your data trickle though your models and views in a concise structured way can make changes as well as fixes much easier in the long run. Backbone's persistence functionality is pretty phenomenal as well.<p>Ember relies pretty heavily on Handlebars. If you're game to use that for your client side rendering than it could be a good option. Ember looks similar to Backbone but makes a few things easier such as computed properties and bidirectional bindings. I haven't touched it much yet as I'm currently working in Backbone and Ember's current lack of an "official" persistence mechanism turned me off a bit.<p>All three of these are great frameworks. Angular is easier to pick up but Backbone has more users and more users means someone has probably ran into a problem that you possibly will and has already asked a question on StackOverflow. That alone can be invaluable.
digitalzombiealmost 13 years ago
I have the same problem at the moment. I think I'll do backbone and move to Ember. I remember reading somewhere the google people is saying AngularJS is their experiment, so lots of things might get deprecated or change. I wouldn't bank on it if its pace of changes is crazy.
评论 #4180361 未加载
jameswysealmost 13 years ago
I'm interested in this too, I did find a blog post which does some comparisons: <a href="http://codebrief.com/2012/01/the-top-10-javascript-mvc-frameworks-reviewed/" rel="nofollow">http://codebrief.com/2012/01/the-top-10-javascript-mvc-frame...</a>
评论 #4180430 未加载
评论 #4147670 未加载
评论 #4147247 未加载
gawkeralmost 13 years ago
Thanks for the comments, guys. I've just experimented with AngularJS and have managed to build most of what I need in less than a week.<p>As a side project, I might attempt to work with the other frameworks as a comparison.
sidcool1234almost 13 years ago
I find AngularJS the best.
macca321almost 13 years ago
vs Knockout?
评论 #4174388 未加载