4 ms·
I strongly recommend anyone starting SPA development to checkout AngularJS because I've found that its close to impossible to not end up with a mess when using
by mr_christmas 14y ago
I strongly recommend anyone starting SPA development to checkout AngularJS because I've found that its close to impossible to not end up with a mess when using Backbone.
I for one would never again use a library/framework just because its popular.
Also (at least for me):-
Backbone learning curve: 1-2 months
AngularJS learning curve: 3-5 days
- pedalpete 14y agoI'm going to be trying angular, but backbone is popular for a reason. My backbone code is very easy to understand, organized and not a mess at all. It doesn't need to be for everyone, but I think your recommendation may be misplaced.
- timruffles 14y agoFUD. I've had several developers over several teams pick up Backbone significantly faster than 1-2 months. I'd strongly recommend over generalising from personal experience, and perhaps considering why Backbone has so many devs using, and contributing to, it. I've been writing MVC apps in JS and ECMA script in general (eg AS 3) for a good time now, and have used other MVCish frameworks before (Dojo, Flex etc). Backbone has a solid implementation of models, views and events. If you understand the fundamentals of Javascript (knowing event listener closures are references that'll prevent GC) and write modular code you can do great things with it without any "mess".
- blablabla123 14y agoFrom reading the other comments here I get the impression it very much depends whether someone has used JS MVC frameworks before. Having not tried any JS MVC framework before, I also have the problem of thinking backbone js doesn't seem to be so good as everybody is saying. Although I have to admit that I did not spend enough time yet. But from the examples (in particular the famous Todo example), I got the impression backbone js only works fine for apps with low complexity. But who am I to judge, having it not used yet seriously...
- krebby 14y agoIn response to your last point: take a look at some of the real world examples that use Backbone (http://backbonejs.org/#examples http://backbonejs.org/#examples) as compared to builtwith.angularjs.org. Real, huge projects like Hulu, Soundcloud, Moviepilot, and USA Today are all using Backbone incredibly successfully. Backbone doesn't provide a lot of the "plumbing" that other frameworks like Angular, Knockout, Batman, Spine, et al have built-in, but it's got a lot more resources and community that work much better for doing only what you actually need.
- Zarel 14y agoAs a counterpoint, the first JS MVC I tried to use was Backbone.js, and it was really easy for me to learn, much easier than most others that I've tried.
- weego 14y agoAbsolute nonsense. I was well into writing my first view helper extension for backbone at the end of the second week learning it, having already built a small app (comet shopping cart) in the first week. There is literally a couple of days worth of reading to get up and running with either backbone or angular and the rest of the time is just standard write code -> question how good it is -> research better ways -> refactor loop that everyone should go through when picking up something new.
- div 14y agoI've used both Backbone and AngularJS, and found the AngularJS learning curve to be steeper than the Backbone one, and there's more 'jargon' to grok before you start understanding things. How steep you find a learning curve is likely to be influenced by your technical history. That said, the difference in difficulty, in my experience, is certainly not an order of magnitude.
- rjknight 14y agoReally? I found Backbone incredibly easy to learn because it is so simple. Compared to most other attempts at JavaScript MVC frameworks, Backbone has a very small number of 'classes' and each class has a fairly small number of methods. The event system is incredibly simple and easy to grok. The backbone.js source is also very readable and if I'm confused about some implementation details I can easily locate the relevant source. In Backbone it's bad /style/ to continue using jQuery in an "old school" way (without using the helpers provided by Backbone.View) but it still works and this makes it easy to start porting jQuery-based code to Backbone. Angular offers a different and more indirect set of abstractions, which means that (for me) it's harder to reason about what's going on, and it's not really feasible to look at the Angular source for clues. Angular feels like a good approach if you're willing to adopt it fully and follow its conventions, but this surely takes longer to learn fully than Backbone does. Also, Backbone plays incredibly well with CoffeeScript, if you like that kind of thing (I do, but I understand that not everyone does).
- jongold 14y agoBackbone - 3-5 days (especially if you switch to Marionette quickly to help with the repetitive stuff rather than actually…remembering it) Ember - 10000000 years
- eddieroger 14y agoSeriously. I have been trying to figure it out or at least get started, and I can't ever get past "Hello from Ember.JS". At some point they will have some decent tutorials or something, but until then I have to pass. Just can't get my head around it.
- jashkenas 14y agoThey really do entirely different things. Angular allows you to create custom HTML tags, and have smart bits of HTML that react to arbitrary changes in a nested JSON object. Backbone gives you tools for modeling the client-side data of your JavaScript application, and having an interface that reacts dynamically to those changes. In Backbone, the emphasis is on the data and rich models; in Angular, the emphasis is on the HTML structure. Fortunately, there are many good examples you can take a look at for both -- http://builtwith.angularjs.org http://builtwith.angularjs.org vs. http://backbonejs.org/#examples http://backbonejs.org/#examples. A longer answer to the question is available in the FAQ, here: http://backbonejs.org/#FAQ-why-backbone http://backbonejs.org/#FAQ-why-backbone
- arcosdev 14y agoI found Angular was easy to pickup - initially. Once you strayed from the path it became more difficult to understand. It is a cool framework, but I feel like you have to take it on whole-hog or nothing. Also - and this is completely and illogically subjective - it doesn't feel like JavaScript to me. It feels like Flex or I don't know what...
- klibertp 14y agoI built two apps with Knockout.js (similar to Angular I think) and many more with Backbone and I can say that it's true that it's harder to do non-standard things in Knockout than in Backbone (I'm talking about view layer). But there is a reason for this: standard things in Knockout are so much simpler and faster to do than in Backbone that it almost always pays off. That being said, I see no problem at all with using them both at the same time. There is a Knockback project, which I found after I wrote a hundred lines of code helper that does exactly the same thing, and I can tell that the work great together. Backbone is good at the Model layer, it's Model ad Collection classes are very good; Knockout on the other hand is exceptionally good when it comes to Views and Controllers, almost entirely eliminating the latter. I think that people fear the complexity of using both frameworks in one app, but in my experience it's not that bad. Everyone should give it a try.
- kaonashi 14y agoAngular doesn't mesh well with progressive enhancement, and if I'm going to use an all-inclusive javascript framework, I'm going to go with the speed and intelligent architecture of Ember.js.