10 ms·
Comparing Ember and Angular
- Tyrannosaurs 12y agoThis is a discussion playing out in our development team at the moment. The one thing we've observed that he touches on in mentioning that Angular is backed by Google but doesn't really go into as much as he might, is that it feels like Angular has more momentum generally in the developer community - more posts on StackOverflow and more Git activity, plus more job ads. If you're in it for the long haul that may be a significant factor.
- brbcoding 12y agoWe are having the same discussions, and a lot of the developers seem to lean towards angular, simply because of that momentum that you mentioned. > "The project I'm working on at Netflix is extremely ambitious, ... solving pretty interesting problems in Ember, that are actually a lot more complicated than problems I solved in previous Angular projects" This is a key point that I keep running into. It seems that more complicated applications can benefit from Ember's very opinionated nature and more backbone-like structure... I could be totally off base, as I've not created a large-scale app in either of these frameworks (yet).
- Tyrannosaurs 12y agoWe have a very complex Ember app, the discussion we have is largely around whether we've made the right choice. My personal view is that we could get rid of every single problem we have with Ember if we replaced it with Angular... And instead have a whole new set of Angular problems.
- nailer 12y ago> The one thing we've observed that he touches on in mentioning that Angular is backed by Google but doesn't really go into as much as he might, is that it feels like Angular has more momentum generally in the developer community - more posts on StackOverflow and more Git activity, plus more job ads. This is true, however: - Angular is considered by both it's supporters and detractors to be very complex and it's documentation a little difficult. I've used Angular for some older production projects, and used ractive.js about 5x more newer projects, and I've searched/asked more questions for Angular. - A lot of people think Google, rather than Getangular LLC, created Angular. I've also met a lot of people who think Angular is popular inside Google, or that Angular is used for Google+, both of which are incorrect. The fact Ember is so popular despite the 'by Google' misconception around Angular actually makes me quite confident about Ember. My Ember knowledge, BTW is limited, I went angular -> ractive.js, so there may be ember downsides I'm not aware of. Ember's new htmlbars templating looks really clean though, so I'm pretty excited to try ember once it's the default.
- Tyrannosaurs 12y agoMy personal view is the supported by Google isn't as robust a defence as some would like to believe - after all, it's not as if they don't have a history of dropping things with little or no warning.
- rdtsc 12y agoIt seems kind of a weak point it me, in way. The fact that Ember is around kinds speaks that it is quite good -- it didn't need a full time corporate backer to rise up.
- awinder 12y agoI didn't get the impression that Angular was unpopular inside of Google from the talks from Google employees at Ng-Conf earlier this year. It's in use by the doubleclick team, they mentioned a ton of internal app usage, and they pointed to it being "the future" for current apps implemented against GWT. Also mentioned a lot of dart & angular dart usage as well.
- nailer 12y agoAsk the Google employees at JSConf what they think, and you may hear a different story. :^)
- spankalee 12y agoAngular _was_ created at Google, by Misko Hevery and Brad Green.
- nailer 12y agoNo, it was created in 2009 at Brat Tech LLC by Miško Hevery and Adam Abrons, see any of the references in the other answer above.
- joshuacc 12y ago"A lot of people think Google, rather than Getangular LLC, created Angular" 1. The Angular website itself states that Angular is "by Google" 2. On many occasions, Misko Hevery has described how he created Angular while working at Google. 3. This page itself is the only real reference to Getangular LLC that shows up in Google search results. Consequently, I'm inclined to think that you're mixing up your story.
- rhgraysonii 12y agoAt the company I work for we recently did a massive migration from Backbone to Ember. The reasoning behind this was simple: prior to the funding round we had recently received that led to an influx of new developers, we had one senior FE guy who was customizing and building this all himself. It became a decision of convention the senior's way vs convention in the standard means of how it is defined in a framework. This is why Ember was so attractive: it is both powerful and maintains a rails-like standard on how you build an application up and out. On a personal project, I would totally use Angular or Backbone, but when maintainability is a question the convention of Ember is a clear winner in my eyes.
- TeamMCS 12y agoDamn just as I was reading that our corp firewall blocked the domain for hosting malicious content (it's usually over zealous)...
- camus2 12y agoChoice is good , monoculture is not. The more frameworks we have to choose from,the better it is. I personally prefer the configuration over conventions thing,because I dont like magics,but I understand that kind of pragmatism.
- protonfish 12y agoIf that were true, two poor frameworks would be better than one good one. Luckily we have 50 poor ones.
- camus2 12y agothe black or white argument is of course a logical fallacy.
- minznerjosh 12y agoAs somebody who has built actual applications with both Ember and Angular, I think this article totally hits the nail right on the head. Though, in regards to the "Angular is backed by Google" comment, while they don't actually "back Ember" in the same way Google "backs Angular", it seems that a ton of large companies are also invested in Ember (http://emberjs.com/ember-users/ http://emberjs.com/ember-users/)! And, I know the Ember folks are really proud of the community they've built as well. I theorize that Ember's lack of a single corporate backer is what has enabled its incredible community to flourish.
- sehr 12y agoEmber: * Yahoo * Square * Vine * NBC News (front page) * Netflix (real time tools)[1] * Zendesk * Groupon * Twitch * CodeSchool * Urbanspoon * Discourse * TravisCI * Ghost Angular: * DoubleClick * MSNBC (front page) * BBC [2] * The Guardian [3] * Huffington Post [4] * Udacity [5] * Desk.com [6] * Plunker Please reply if you know more, would love to build out a real census of who's using what [1] - https://twitter.com/ebryn/status/433402427979493377 https://twitter.com/ebryn/status/433402427979493377 [2] - http://www.bbc.co.uk/blogs/internet/posts/Building-BBC-Live http://www.bbc.co.uk/blogs/internet/posts/Building-BBC-Live [3] - https://github.com/guardian/guardian.github.com/blob/master/developers/about.md https://github.com/guardian/guardian.github.com/blob/master/... [4] - http://www.huffingtonpost.com/john-pavley/huffpost-content-management-system_b_3739572.html http://www.huffingtonpost.com/john-pavley/huffpost-content-m... [5] - http://www.quora.com/Udacity/What-is-Udacitys-technology-stack http://www.quora.com/Udacity/What-is-Udacitys-technology-sta... [6] - http://www.desk.com/careers/angular-engineer http://www.desk.com/careers/angular-engineer
- will_work4tears 12y agoCouple more for Angular: * MSNBC * Plunker
- sehr 12y agoAdded to the list!
- pascalo 12y agoI have worked a bit with angular lately, and am now knee deep into my first ember project (with ember-cli). I agree with a lot of the points made in this Series, a really good write up. In Ember I feel I have to write a bit more boilerplate around dealing with collections, (i.e. sorting). Can't wait for HTMLBars, the script tags littered around the dom are just not very nice, and I find myself using :last-of-type CSS selectors and the likes a lot. I also think that the directives in angular just work nicer than the components in ember, because there is more control over what's bound into their scope. Ember's approach to structure is great though, and the router is really nice to work with, much much nicer than ui-router. Both are great frameworks though, and I really appreciate the work of both teams to give me great tools like this to work with.
- lhorie 12y agoPeople claiming that framework size doesn't matter is a bit of a pet peeve for me: download size may not matter once the files are cached, but the uncompressed size still translates directly to how much code the browser needs to parse and execute on every page load, and may also negatively affect the weight of execution payloads across operations in your app. These costs are not as small as you might expect. The performance tests I put on the Mithril ( http://lhorie.github.io/mithril http://lhorie.github.io/mithril ) site illustrate this problem. I don't have Ember there, but if anyone more familiar with it would like to contribute (the rendering test is really simple), that would be most welcome. There's another independent test here ( http://jsperf.com/angular-vs-knockout-vs-ember/292 http://jsperf.com/angular-vs-knockout-vs-ember/292 ), which actually surprised me.
- ben336 12y agoI think its important to note with the perf test and download size stuff that the frameworks that are bigger/slower to render provide more functionality and more templating options respectively. Thats not to say they're better, but just trying to clarify the tradeoffs under discussion.
- lhorie 12y agoThat's not necessarily true. I can't speak for the jsperf test since it's not mine, but for the Mithril site tests, I exclude "optional-but-not-really" things like Marionette and ngRoute/ngResource/friends from the tests (whereas I include the entirety of Mithril - templating engine, router, etc) to try and tilt the tests in other frameworks' favor. Sure one could argue that Angular has filters or whatever, but hey with Mithril you can express templating things that you can't with Angular (e.g. tables with nested loops, or w/ for-else constructs), so it's not really a apples to apple trucks comparison. With an order of magnitude more code, one has to wonder how much of that extra code is more functionality and how much is just bloat.
- hajile 12y agoA big factor here is that Mithril describes templates programmatically rather than strings of data. It's the difference between: function render() { eval("(function () {}());"); } and function render() { (function () {}()); } These are going to run at much different speeds because one involves parsing multiple times while the other only needs to be parsed once. The tradeoff is some complexity (though there's also more flexibility too). <ul class="foo"> <li data-ng-repeat="item in items"> {{item.x}} </li> </ul> m("ul.foo", [ items.map(function (item) { m("li", item.x); }); ]);
- itsbits 12y agoI have worked for both Ember and Angular...i prefer Angular for personal projects and Ember in my company. Reason is simple. With Angular , you can write code in many ways. If code goes to maintainance, it gonna get messed up. With Ember, unless you use lot of jquery, that issue not gonna rise. I am waiting for HTMLbars too.
- nikon 12y agoBeen using Angular for 10+ months now, it's been a great ride and has saved 1000's of hours. Feel like I should try out Ember over the weekend. The HTML mustache style puts me off though I have to admit!
- nahname 12y agoIt's just style. I currently prefer mustache, but used to prefer something much more similar to angular (PURE templates). One is not any better than the other, just takes some getting used to.
- nikon 12y agoSorry by style I meant the whole {{ bind-attr }} stuff. I think I read too much into it, you can do simple binding just like Angular e.g. {{ user.firstName }} it's just for HTML elements.
- protonfish 12y agoMaybe, but were those 1000's of hours saved the ones where you should have been learning how to use JS, HTML and CSS?
- nikon 12y agoI knew all three way before using Angular. Don't get it.
- adamors 12y agoHow can anyone do 10+ months of front-end web development without knowing all three (well)?
- protonfish 12y agoI've seen it a lot. If they knew what they were doing it'd have been done in 3.
- deleted 12y ago
- blueskin_ 12y agoHow's this for a revolutionary idea: The server sends text hat can be rendered on any device with minimal resource usage, can be cached, can be parsed by robots, and even formatted by the user. Rendering pages in javascript just wastes the user's computing resources (and opens them up to nice vulns) and prevents search engines from indexing your content.
- pascalo 12y agoWell, roudtripping to the server and reloading a whole chunk of html to get a sorted view of a table you already have downloaded isn't super smart either?
- camus2 12y agothat's exactly what microsoft is doing with its excel app online,and it's one of the fastest app i've ever seen.
- protonfish 12y agoThat sounds great, but does it have a framework with corporate backers?
- blueskin_ 12y agoIt's called HTML.
- jaegerpicker 12y agoThat's a pretty horrible idea and a large step backwards. Sure the web started out as a system for reading and sharing text but that being the extent of the web's UI pattern has long since passed. For good reason. The web is our best shot at create an open and non controlled application framework. Rendering text on a server and not using JS isn't even close to a solution for that.
- IgorPartola 12y agoCool. How do you provide instantaneous feedback with this system? As in, if the user has a list of items with delete buttons, and you want to remove the item from the list as soon as the user clicks the X? Think about using your browser and having it reload every toolbar and menu every time you clicked on something. All sarcasm aside, plain HTML has plenty of great uses, but just because you don't see a reason for client-side apps does not mean that they don't exist.
- deleted 12y ago[deleted]
- nateabele 12y agoRe: > Ember's routing is just flat out better than anything else I've seen out there. I'm the lead developer of ui-router. I've read everything I can about Ember's router, and I just don't get it. Barring some boilerplate-saving conventions (we don't offer any, but we do offer APIs that let you roll your own pretty easily), could someone explain to me what the big deal is? Also, re: the score-keeping thread, I know Angular is used extensively within the BBC.
- Keats 12y agoI didn't get that part either. ui-router works well for me and doesn't have equivalent issues to rendering nested routes in the same outlet I had in Ember.
- IgorPartola 12y agoI just recently started using Angular, but ui-router definitely gave me a bit of trouble. I had to dig through StackOverflow to find answers to questions like how to enforce that certain views must only be accessed when the user is logged in. Another bit of trouble I had was doing things like logging the user out, then immediately redirecting them to the login page. Had to redirect then to the home page so that the state change hijacking code fired and redirected a second time. I can definitely see that ui-router is a valuable component and it's very powerful, but perhaps I have not achieved the zen of it yet.
- Keats 12y agoI've used both and I much prefer Angular, more flexible and I find the simple object approach way easier to understand than the getters/setters. If you worry that much about difficulty of maintenance because someone is calling their controller SomethingCtrl and another one SomethingController, you can choose one and enforce it during code reviews. I guess it's down to whether you prefer doing things your own way or having to follow their structure. Also not having some random divs popping up in your html is nice.
- cloverich 12y agoWas hoping in his comparison of download size that he'd mention the total size of all included libraries. I've not used either yet (only watched some talks, etc), but have noticed a few times Yehuda argue that Ember is bigger because it includes a lot of functionality you would use 3rd party libraries for in Angular. E.g., if you add up all the libraries most people use with Angular, that are included out of the box in Ember, they'd be similar. Does that hold any water?
- tragic 12y agoIt really depends what you need. I just launched a pretty trivial Angular app, which required ngRoute and a local storage interface. Total size of the three: 112.7k. All the standard-issue angular modules put together amount to 129k. For non-trivial stuff, I'm sure people need a bunch more extras, third party libraries and so on. But it's a pretty major bonus for Angular that you can use it productively either for a full SPA, or for the kind of trivialities that one typically duct-tapes together with jquery. The small-ish size (I know, not THAT small) is part of that, but so is the flexible and modular design. Not that I dislike Ember - it's very nice. And I am in the fortunate position at the moment where page-load size is not a huge concern (or rather, a battle that has already been lost before I clock in).
- notastartup 12y agoI don't know if it's just me but I've found that when I just use regular javascript or jQuery or specific javascript libraries that I only need, I am able to produce something faster and with far less frustration of having to learn MVC on the client side which I feel is enough for server side but not the client side. I used backbone.js for days where as something I could've done within hours in jQuery and ajax with Python flask running in the background. Not only that you need build automation, dependency manager, phantomjs static html renderer...it's really more than I can deal with and feel that this extra overhead doesn't really bring much to the table more like work for work itself is created to boost the credibility of such work.
- iends 12y agoFor small projects, you can certainly get stuff done more quickly with native JS and/or jQuery. Once you get past a certain number of developers, or project size, are framework really shines.
- badman_ting 12y agoI kind of can't believe he called Angular easy to learn. One of the most common things you hear about it is the steep learning curve, which is not helped by the docs (the skimpiness of which is another frequent lament). In my experience Angular is learned by Googling problems you have, which are then explained in Stack Overflow posts. As an aside - this is something I've hardped on before, but I just really think it is not helpful to anyone to use examples whose names are so abstract: ng-click="foo = 'bar'; blah(foo + bar + '!!!); shazbot = nanoo && nanoo" This is meant as an example of something you should not do. But it's nonsense - it's quotes and semicolons separated by meaningless names. Of course that is the point, but in turn that is my point - give a better example, one that models something one may do in the real world but should not, so that the person reading the example actually understands what not to do. Instead of that, something like this: ng-click="shoppingCartId = 52; initCart(52); var myShop = new Shop();" People know what shopping carts are. "shazbot" and "nanoo nanoo" are whimsical references to an old sitcom. Entertaining to the author, perhaps, but not helpful.