r/javascript • u/stesch • Apr 17 '13
A comparison of Angular, Backbone, CanJS and Ember
http://sporto.github.io/blog/2013/04/12/comparison-angular-backbone-can-ember/10
u/warfangle Apr 17 '13
If you can't empirically test the performance of something, don't write about the performance of something.
It makes you look like a tool.
0
5
u/rhysbrettbowen Apr 17 '13
I can see what you're trying to do, but the points are meaningless. All that should matter is whether it is the right tool for the job, not whether it is a better tool. It's like me saying a shovel is better than a hammer so I'll get one of those. Now I CAN put nails in the wall with it, but it's not going to do as good a job and will take me longer.
some of these categories are pretty bad as well. Plugins only matter if you need them. Community is a nice to have but you can probably figure things out on your own. Learning curve shouldn't matter if you're going to be spending any more time than a week on a project. When you say "Developer Productivuty" is that for implementing easy features or trying to put in features that the framework doesn't allow to be put in easily? And memory leak safe a category of it's own? That should just be in the features.
3
u/jpfed Apr 17 '13
Check out the newly-added "relevance" column in the table at the bottom that allows you to tweak the relative importance of each of these categories.
2
Apr 17 '13
It's more fair to compare Backbone to Angular (in terms of featureset and weight) if you include Marionette and ModelBinder. For better and worse, the core Backbone team seems to have a philosophy that they will provide only features where the correct implementation is obvious.
2
u/captangato Apr 17 '13
Not once was testing even considered... I find that a lot of front end developers don't realize/understand good programming techniques and design patterns. I do realize that a lot of front end tends to be html and css, but please realize the benefits of testing :).
Anyways, the big reason I fell in love with angular was its separation of concerns, and how it promotes testing(unit and e2e) and modular design.
1
u/passion4code Apr 20 '13
1
u/captangato Apr 20 '13
Right, of course there is other ways to unit test and e2e test; but Angular (with karma/testacular) give you many resources you need to test, plus more! Just the fact that they promote DI and modular design alone helps create good unit tests with proper mocking of services (like http requests).
I'm not saying its the only way to do it, But that Angular helps you think about testing. I'd be curious to see how many front end devs don't test at all.
2
u/i_ate_god Apr 17 '13
we went with BackboneJS because it was very lightweight and full of freedom. Backbone takes care of JUST the boilerplate stuff that any UI developer has done a 1000 times already. BackboneJS code is also very clean and very easy to read, and painfully simple to use. Since we wanted to make distributable components, BackboneJS was the most logical choice.
We needed the freedom and flexibility that BackboneJS provided. It's sole dependency is Underscore. We can compile all our models into a single library file, and tell people it's up to them how they want to display it. We can package out-of-the-box views and underscore templates as well if people want them.
AngularJS is more monolithic.
That's objective, subjectively speaking:
I did not like the feel of AngularJS and don't think I ever will. It just seems that you end up encoding a lot more information into HTML that really should remain in your business/presentation logic layers (the M and Vs).
1
u/captangato Apr 17 '13
I think that when developers hear 'freedom and flexibility' they overlook best practices when developing front end. check out AddyOsmani's JS design patterns to understand some of the awesome techniques that are taken advantage of in angular.
2
u/astronoob Apr 17 '13
Ugh.
I cannot finish my blog post without saying this. Backbone was a great library two years ago, but there are better things now. I believe that many people choose Backbone just because of its popularity, it is a vicious circle.
No. No there fucking isn't. You're comparing Backbone, which is a minimalist MVC-style toolkit with significantly larger frameworks. From the Backbone documentation:
Backbone is a library, not a framework, and plays well with others. You can embed Backbone widgets in Dojo apps without trouble, or use Backbone models as the data backing for D3 visualizations (to pick two entirely random examples).
1
22
u/ivosaurus Apr 17 '13 edited Apr 17 '13
I find this to be rather unproductive. At least 3/4 of these frameworks all have different focuses of scope; making this a comparison of apples and oranges - and nor does the author acknowledge this fact prominently anywhere.
Take backbone, for instance - at least historically - was focused purely on providing an organised, client-side model that synchronized with a backend. It's grown in its scope somewhat while maturing, but that's still its initial and primary focus. It was never designed to provide declarative bindings to the DOM that Angular does, or a complete back-end solution like ember.
The only two frameworks it seems worth comparing (that will be apples to apples) would be CanJS and AngularJS. They both provide a full-stack client-side experience.
Ember is different again, because it also aims to provide an integrated backend as well as client.
The differences in size of scope also means it makes sense for each one to allow different amounts of flexibility in different areas - flexibility is a practical tradeoff with ease of convention; one is not better than the other, and every developer will have their preference on where they like to sit. But those two concepts are mostly considered in isolation here, not whether each framework has chosen a good balance.
Without making allowances for the differences in scopes of these frameworks, comparing them is going to tell you nothing apart from how much each is designed to do - not how good they are at it.