Live data from Hacker News

Migrating from Ember.js to AngularJS

beust.com

1–10 of 55 posts

Re: Migrating from Ember.js to AngularJS

#2
Would be nice if they hadn't closed comments before Peter Wagenet, Yahuda, and the rest from the Ember team could weigh in.

I personally like AngularJS a lot, but I also like Rails. Rails 4 has a rails-api project along side of it, which makes it seem like they are starting to spend more time thinking of Rails as provider for a Javascript front-end. Because of Yahuda's involvement, they have also placed more bets on Ember than Angular the last few years.

I think that Angular secretly hides an affinity for backing services in Node, and this concerns me a little. I think their team needs to either provide examples and support for each major front-end framework and not just rely on volunteers to provide those examples that won't be maintained as Angular changes. Or at least be crystal clear about what is expected of a service so that as little code is required as possible on the Angular end to integrate with it. And the same goes for Ember. What good is a front-end MVC framework that depends on services to exist if you have to spend any time guessing what to use on the service-side?

Re: Migrating from Ember.js to AngularJS

#3

Would be nice if they hadn't closed comments before Peter Wagenet, Yahuda, and the rest from the Ember team could weigh in. I personally like AngularJS a lot, but I also like Rails. Rails 4 has a rails-api project along side of it, which makes it seem like they are starting to spend more time thinking of Rails as provider for a Javascript front-end. Because of Yahuda's involvement, they have also placed more bets on…

Core Rails, however, isn't moving towards embracing the pure fat client model. (DHH has explicitly ruled out doing so.) That makes me a bit less interested in the benefit of any JS library's Rails integration.

Re: Migrating from Ember.js to AngularJS

#4

Would be nice if they hadn't closed comments before Peter Wagenet, Yahuda, and the rest from the Ember team could weigh in. I personally like AngularJS a lot, but I also like Rails. Rails 4 has a rails-api project along side of it, which makes it seem like they are starting to spend more time thinking of Rails as provider for a Javascript front-end. Because of Yahuda's involvement, they have also placed more bets on…

Core Rails, however, isn't moving towards embracing the pure fat client model. (DHH has explicitly ruled out doing so.) That makes me a bit less interested in the benefit of any JS library's Rails integration.

Not DHH, but look at the committers: https://github.com/rails-api/rails-api/graphs/contributors

Carlos and Santiago are active Rails 4 core team members, and Steve K. has risen among the core team ranks as well (not to leave the others out).

Re: Migrating from Ember.js to AngularJS

#5
While there's great feedback here, it's interspersed with information that is either outdated or just flat-out inaccurate.

Overall, Angular is a much more extensive framework than Ember.

I don't think this is true. For example, AngularJS, as far as I'm aware, does not offer a persistence story at all.

Injection and testability.

Ember.js does dependency injection too; we just roll it into our conventions so that new developers don't need to learn what dependency injection is. If you have to learn a ton of comp sci terminology to start learning a framework, they blew it.

Additionally, Ember is fully unit tested (over 6000 unit tests at the moment) and, because of dependency injection, loading up your app in a clean state and testing individual components (models, views and controllers) is easy.

Support for partials and inclusion of templates. This is another thing I really missed with Ember.js, which offers no easy way to break down your HTML templates into smaller, more manageable files.

This is just flat-out inaccurate, and has never been true. Ember has supported breaking up templates since day one.

Documentation. While the Ember.js documentation is fairly large, I found it very unorganized and I often resorted to searching the page to find what I need.

This has been fixed and the response has been overwhelmingly positive. We still have a ton of stuff planned to make it even more friendly for beginners.

Cascading updates are being executed right away.

This is simply not true. In fact, Ember's run loop is what powers many of the nicest features, like deferred DOM updating and binding synchronization. I'm a little bit surprised that other JS frameworks haven't copied the idea, to be honest.

You need to remember to call the setter: object.set('foo', newValue)

I agree that this is not ideal, but the flip side is that frameworks like Angular have to iterate over every bound object when something in a scope has changed, and check it against previously known values to determine if a change has happened. This "dirty checking" can quickly lead to pathological performance issues. We're all about ease-of-use, but not when it turns into a footgun.

As you might be aware, Yehuda Katz is on TC39 (the committee developing the next version of ECMAScript). ES6 supports object proxies, which provide sufficiently rich semantics that we will be able to drop the get/set requirement if you are targeting ES6 browsers. We are ready to add this to Ember as soon as proxies land in popular browsers.

It's actually disappointing how much FUD is in this article. Competition is great, but let's deal with facts.

Re: Migrating from Ember.js to AngularJS

#6
Proprietary attributes for templating are confusing. So confusing the author put the ng-repeat in the wrong place (I think).

Can someone familiar with angular explain how you would would make a special case 'There are no names in the list'? It is obvious to me how to do it with ember, but non-obvious in angular.

Re: Migrating from Ember.js to AngularJS

#7

Proprietary attributes for templating are confusing. So confusing the author put the ng-repeat in the wrong place (I think). Can someone familiar with angular explain how you would would make a special case ' There are no names in the list '? It is obvious to me how to do it with ember, but non-obvious in angular.

Like this:

  
    {{name}}
    There are no names in the list
  

Re: Migrating from Ember.js to AngularJS

#8
I couldn't really even get started the last time I used ember.js, their website w/ their examples were all worthless since they kept updating their code-base on literally a daily basis. I think I'm going to really take a serious look at angularJS now.

Re: Migrating from Ember.js to AngularJS

#10

Earlier quoted context omitted.

Core Rails, however, isn't moving towards embracing the pure fat client model. (DHH has explicitly ruled out doing so.) That makes me a bit less interested in the benefit of any JS library's Rails integration.

Not DHH, but look at the committers: https://github.com/rails-api/rails-api/graphs/contributors Carlos and Santiago are active Rails 4 core team members, and Steve K. has risen among the core team ranks as well (not to leave the others out).

Yep! A lot of us care a lot about the JSON API case. Since you're mentioning Rails 4, here's the contributors list for the release: http://contributors.rubyonrails.org/edge/contributors

You can see the large overlapping of names there.

Also of note, rails-api includes ActiveModel::Serializers, too: https://github.com/rails-api/active_model_serializers/graphs... You can also find a lot of big names there, as well.

Post reply on HN