Take the 2-minute tour ×

So recently I started a really big project, and choose jQuery as always, but I realised that jQuery is not enough for this task, and I ended up with nested pile of call back functions.

I started looking at Backbone.js and AngularJS, but I cannot really decide, because I'm a bit confused based on some user feedback, like lot of people say Backbone is the future, but more of people say Angular is way better, so I thought I will ask the community to help me decide based on user experience and based on some of my questions.

So my questions

  • Which one of them communicates better with Laravel?
  • Which one's code base is easier to maintain?
  • Which has better performance?
  • Pros and cons based on experience?
  • Which one you would offer?
  • And I know this maybe silly but, which one has more tutorials on the net what are newbie friendly? What I mean by this, there where times when I learned something new, I took a look at the documentation and it was really raw, and dry with out any basic examples
share|improve this question

closed as not constructive by CD.., Ben Lesh, Joachim Sauer, JP Richardson, Brandon Tilley Jan 24 '13 at 17:21


I tried them, and then found Knockout (knockoutjs.com). Easier and more flexible IMHO. –  7zark7 Jan 24 '13 at 15:36
I think Backbone is easier –  salexch Jan 24 '13 at 15:39
add comment

4 Answers

up vote 68 down vote accepted

Well, either one will be fine. I'm a fan of Angular... but like I said, they're both fine.

Which one of them communicates better with Laravel?

They will both communicate in roughly the same fashion, they both handle REST quite well and have default HTTP/AJAX implementations.

Which one's code base is easier to maintain?

The code base is as easy to maintain as you write it to be. That said, Angular forces you into it's own modular application structure which might make it a little easier to deal with from a "Where is this code at?" standpoint. Backbone is a little more free-form and you can set it up however you choose... so there's a give and take.

Which has better performance?

At what? AJAX or REST? They're probably about the same. Angular does a lot more than Backbone... Angular is a templating engine, a two-way binding MVVM/MVC/MVW architecture, reusable controls, content filtering and formatting, etc. Angular is more of a whole framework, where Backbone is just a library. That said, the way that Angular handles two-way binding will be slightly less performant than say, Knockout; That's because Angular triggers a digest that processes everthing that's being "watched" whereas Knockout uses an observer pattern. All in all, on a client app, this doesn't really hurt performance much though.

Pros and cons based on experience?


pros: Very little boilerplate. It's a complete framework, it has routing, controls, templating, two-way binding, it handles REST and AJAX, currency formatting, date formatting, you name it. Development is a lot more rapid. It works extremely well with JQuery plugins. Directives and modules and code re-usability is very slick. It forces your developers into a certain structure, so you know where to look for things. It forces you into Dependency Injection and is highly testable because of that. It has some nice testing framework addins for Jasmine and E2E testing with Protractor.

cons: It forces your developers into a certain structure, so you know where to look for things. The learning curve is a little steeper. Memory management can become an issue if you try to go "too big" with your interfaces.


pros: You can develop your UI any way you want to. It's smaller and well documented. You can structure your JS app any way you choose.

cons: A lot more boilerplate. It's not a complete framework, you'll need to use something like Knockout and Sammy to come close to everything Angular does. Since there's no defined structure, you'll looking at a lot more chance for your development team to spaghettify your code. It has some Dependency Injection, but it was added as an afterthought and you're not forced to use it. This means that it's really easy to write code that's hard to unit test because of tight coupling caused by lack of dependency injection.

Which one you would offer?

I prefer Angular. I have no beef/qualms with Backbone, however. They're both good libraries, Angular is just quicker to develop in if you know what you're doing because there's less boilerplate. The problem is the learning curve for most people, really.

And i know this maybe silly but, which one has more tutorials on the what are newbie friendly? What i mean by this, there where times when i learned something new, i took a look at the documentation and it was really raw, and dry with out any basic examples.

This is the hardest one to answer. Backbone has been around longer, so there will be more tutorials... but the fact that you're going to have to roll your own framework from scratch by gluing together other libraries like Knockout and Sammy, and the fact you have to build your own application structure, basically means that a "newbie" is more likely to really shoot themselves in the foot fast.

At the same time, Angular has a steeper learning curve. But once you've learned it, it's extremely fast and easy to work with.

... so it's probably a toss up.

I hope that helps.

share|improve this answer
thanks for the detailed answer +1 ofr it :), and thenks for the reply –  Levente Nagy Jan 25 '13 at 6:09
I am now learning Angular and already used Backbone. The biggest critic I always heard about Backbone which made me interest myself into Angular was that Backbone enforces you to structure you app much more than Angular. It's the only thing I'd disagree in this answer ... –  Augustin Riedinger Feb 20 '13 at 14:18
@AugustinRiedinger: I was asserting the opposite: Angular forces you to structure your app "the Angular Way", which is generally pretty solid. Backbone lets you do whatever you want... which can be better... or worse. –  Ben Lesh Feb 20 '13 at 17:04
Just adding a cross reference to a similar Backbone vs Knockout response -- it posits that you wouldn't use Backbone and knockout together. stackoverflow.com/a/6340870/215068 –  EBarr Feb 10 at 23:07
Thank you! greate answer! –  alucard Feb 26 at 13:54
show 2 more comments

Without hesitation, I would recommend Backbone over Angular. Right now, Angular is plagued by many faults one finds in any new library. To name a few specifics:

  • Poor documentation, which means:
    • Difficult to discover Angular idioms
    • On more than a few occasions you'll have to dig in to Angular's source to understand why something you think will work, doesn't work
  • Few real-world example apps (although plenty of toy apps e.g. todo lists)
  • Smaller community than existing competition

I think all of those points outweigh any concerns about performance, etc. And maybe some people would disagree with me on why those things matter, but here's my experience with it:

For about 6 weeks very recently, I and a few other talented engineers struggled with a particularly bad case of inherited, poorly written, copy-pasta spaghetti Angular code. That's not Angular's fault -- but when we were deciphering the client's code and got to something we didn't yet understand in Angular code, we all felt that the official documentation rarely helped us understand that component's intent or recommended/idiomatic use. And we always had a tab open in Chrome with the Angular docs, and we referred to it multiple times per day. Together the group of us have probably 35 years of experience in software, and we unanimously agreed that the documentation was poor.

All that being said, Angular is still on my "let's check back in a year" list; once it's beyond its immature phase, it will definitely be worth re-evaluating.

share|improve this answer
I think the documentation is alright now. why do you think it is poor ? –  maxisam Jan 24 '13 at 23:03
@maxisam I updated the answer with my experience with Angular's documentation. It's hard to point at a single page and say "this is why the documentation is bad," but my coworkers and I had an overall poor experience with referring to Angular's documentation multiple times per day. –  Mark Rushakoff Jan 25 '13 at 7:08
AngularJS is a HUGE framework. If you don't have a decent basic knowledge, you can't just get a phrase and try to find the answer in the document. It is not like a library like jQuery. In fact, I just graduated from CS 2 years ago, and I don't find any problem to learn or use AngularJS. (I have used it in production project without any issue and I'm not a FE people.) I do think it would be nice if they cover more detail, but c'mon isn't that the reason they build Google first ? –  maxisam Jan 25 '13 at 15:42
I agree with the perception that Angular's documentation is severely lacking. As the Disqus comments make painfully apparent, a large number of Angular's documentation pages are missing critical information or are factually incorrect/out-of-date. Some of the examples don't work at all. It's very difficult to read offline (as far as I can tell). And from a verbal standpoint, it does a poor job of introducing concepts in a way that's straightforward to grasp. I know it's tough for such a large framework, but this is one place where Django, for example, shows how well it can be done. –  acjay Jul 10 '13 at 21:36
add comment

We looked at AngularJS, Backbone, Ember, and Knockout in details six months ago. Our conclusion was that all these frameworks are good, meaning that you can't go wrong with any of them. But for us, AngularJS was best, for the following reasons:

  • The HTML code looks like HTML and the JavaScript code looks like JavaScript
  • Having a full-blown HTML5 compiler in the web browser is very powerful
  • The Services architecture is extremely well designed
  • Performance is great
  • Advanced debugging tools are available
  • Documentation is extremely thorough and rather up to date

Now, to be perfectly honest, AngularJS is certainly the most difficult language to learn of all the options mentioned above. Our experience is that you need to invest a couple of days to really learn how the compiler works and how to use or implement services.

Also, sooner or later, you will need to use asynchronous programming techniques, and these can be a bit challenging to master. So, it's usually a good idea to take a look at flow control libraries originally built for Node.js and make use of them to simplify your code. But you'll need this only after you've mastered the more basic constructs of AngularJS.

share|improve this answer
For those who want to learn AngularJS with ease follow www.thinkster.io –  Aamir Shah Aug 1 '13 at 5:25
add comment

Without more information about your project, it's hard to tell.

Angular is really a full stack web app framework. Backbone help organize code, but is way more raw (it does less than Angular, but this mean it's simpler). But as Backbone is simpler, it's also easier for a beginner to give bad structure to its app.

All in all, today I'd go for Backbone because: good community, works well with AMD (using shim but still) and easy to build for production use.

In the future though, I think Angular will impose itself because: it has support of a good community and of Google, it is way more complete. And I guess its current flaws are going to be resolved: harder to build (minification cause some issues), and no support for AMD (this last point may be a personal preference)

share|improve this answer
good AMD support? –  Evan Carroll Mar 6 '13 at 15:38
@EvanCarroll Oh yeah, I'll edit that. I meant that it works great with AMD. –  Simon Boudrias Mar 6 '13 at 16:22
add comment
