Live data from Hacker News

AngularJS versus Ember

eviltrout.com

121–130 of 163 posts

Re: AngularJS versus Ember

#121

One is 272kb and the other is 78kb. This should be noted at the beginning of any article making such a comparison.

It's not really a fair comparison for several reasons. Namely that to match Ember's functionality, you have to add several libraries to your AngularJS app. Eventually you'll reach the point where you've effectively got the same size in several libraries, as opposed to one. This is the same argument the Backbone guys use to make and it's stupid.

If you don't need that level of functionality, then fine, don't pick up the framework with a few extra KBs. But keep in mind that with any luck, your app will start to grow. When it does you'll need to scale and perhaps you'll discover there was value in using a more functional framework.

Re: AngularJS versus Ember

#123
My personal experience is the opposite.

I tried Ember first. Got excited replicating the sample blog app, but got stuck trying a simple task: show the most recent post by default (see this bug: https://github.com/emberjs/ember.js/issues/1642). Later I started to trip into namespace clashes - you have to jump a few hoops if your model has a field named "content", "is_new" or "is_deleted" (http://stackoverflow.com/questions/16515900/reserved-atribut...). My general impression is: there is nice ideas here but Ember is too opinionated and has to many magic going on (hard to debug).

In contrast, Angular shows better design everywhere. No name clashes, framework methods and attributes use special prefix $ (like python uses double underscores). Everything I got stuck with ember, I was able to achieve elegantly with Angular.

I love the eviltrout but this post is lacking a bit of diligence. Angular learning curve is a little steeper but IMHO it is way more finished and well designed than Ember (Ember data has good ideas, they have a cute mascot, and it ends here).

Re: AngularJS versus Ember

#124
I know it's really not the point on the article, but I wanted to share a quick and dirty solution for a common problem, especially this:

>> If you were using jQuery to do this, you’d likely bind a function to the click event on each row. When fired, your function would change the CSS class of the row to highlight it.

>> You can’t stop there, though. Your function also has to remove the CSS class from any other rows that were previously selected. That’s a little crazy if you think about it! Changing which item is selected means we have to know everywhere that it’s been represented in our UI.

  An easy way is just to do:
  
  $('').each()
      .find('').each()

Re: AngularJS versus Ember

#125
post #61

I just have the "feeling" that with Discourse being written in EmberJS, people are mindlessly going to flock to it without really looking at anything else. And even if AngularJS really is better, it will be left behind. Just because...

It won't be left behind, it's from Google.

So true! Google never abandons technologies. At least that's what an article on my Google Reader said. :P

Re: AngularJS versus Ember

#126
post #37

Earlier quoted context omitted.

Thank you for the excellent and succinct answer! > My question is then: why are people purposely choosing not to use the advantages of client side MVC code? I didn't understand this question (it seemed too obvious to me and felt like a bait to get into a broader discussion). In both Ember and Angular apps you still have a 'model' that is stored outside of the DOM, the only difference is how the model is works, which…

This is a pretty ridiculous conspiracy theory. (Is it a conspiracy if there's only one actor?) To spell out the question in a different way: I have an object that represents some kind of object, like a User, for example. On every page, I display the user's name. With the 'long lived object' strategy, I fetch the User on the first page load, and display it. The JS object then sticks around, and as I navigate, the same…

In Angular, there is a powerful concept called services. Services are used when you need to share data between controllers, like your example. Angular services are guaranteed to be singletons, but instead of passing references around, you use dependence injection instead. Ember is fun and kids like it, but grown ups appreciate the superior design in Angular.

Re: AngularJS versus Ember

#127
post #99

Earlier quoted context omitted.

I've worked with both frameworks. You're too quick to judge Angular. Secondly, I suggest you watch Angular 1.2 & beyond: http://www.youtube.com/watch?v=W13qDdJDHp8&feature=c4-overvi... For instance, scope will be optional in the future, not only that but the roadmap for Angular Next is very impressive (see around the 44:40 mark). --- Angular is accelerating; it has more stars/watchers/staff than Ember. Embers' core d…

Angular wasn't invented at Google (it was invented by Angular company, which got acqui-hired by Google) and some Google staffers have mentioned Angular breaks a few documented Google rules for creating Javascript MVC frameworks. I suspect Angular's popularity has more to do with a logo than features. - The unnecessary new module system is a massive waste of time and obviously doesn't play well with others - It's the…

Angular went open source before it turned into 'official google'.

http://en.wikipedia.org/wiki/AngularJS#Development_history

Re: AngularJS versus Ember

#128
post #86

The fact that Google is backing AngularJS is a nice bit of reassurance. But are any of their current apps using AngularJS in any way? I realize most of their major apps, such as GMail and documents, pre-date Angular...but they must use it, or parts of it for something prominent, right?

> The fact that Google is backing AngularJS is a nice bit of reassurance

Really? google frame ? google reader ? (...) they dont give a f..

While Angular is quite complete feature wise , the UI responsiveness of a AngularJS application is not that great. At least that's my personal experience.

Re: AngularJS versus Ember

#129

Earlier quoted context omitted.

This is a pretty ridiculous conspiracy theory. (Is it a conspiracy if there's only one actor?) To spell out the question in a different way: I have an object that represents some kind of object, like a User, for example. On every page, I display the user's name. With the 'long lived object' strategy, I fetch the User on the first page load, and display it. The JS object then sticks around, and as I navigate, the same…

In Angular, there is a powerful concept called services. Services are used when you need to share data between controllers, like your example. Angular services are guaranteed to be singletons, but instead of passing references around, you use dependence injection instead. Ember is fun and kids like it, but grown ups appreciate the superior design in Angular.

Your 'kids vs grown ups' comment just makes me want to learn Angular that much less.

(I will look into exactly what Services are, thank you.)

Re: AngularJS versus Ember

#130
post #26

Is there anyone out there who has written non-trivial applications (i.e. a _lot more_ than the quintessential todo app) in both, AngularJS & EmberJS and can offer a non-biased opinion? Some time ago, I started off with AngularJS, I liked what I saw (except the dirty checking part) and started building my product / startup with it. I don't have the time to stop all dev and experiment with EmberJS, but would like to kn…

there is no directives in EmberJS , you could use any DOM templating engine ( =/= string template engine like Mustach ) with it I guess to get something similar to directives.

You don't understand the power of directive till you actually use them.
Post reply on HN