Live data from Hacker News

Migrating from Ember.js to AngularJS

beust.com

31–40 of 55 posts

Re: Migrating from Ember.js to AngularJS

#31
post #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 d…

> 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. I've been using Angular for months now and although I already knew what dependency injection was, I didn't have to understand the term to use Angular. > Additionally, Ember…

> Just as an example, Rails is not fully unit tested by any stretch of the imagination

And boy does it show.

Re: Migrating from Ember.js to AngularJS

#33

Earlier quoted context omitted.

This is what I was looking for. I gather the framework is allergic to conditionals.

Behavior can be provided through directives via elements, attributes, css class names, and comments. It isn't "allergic to conditionals". It just drives the logic elsewhere to keep the presentation layer looking as clean as possible to the developer so that you can either focus on the view (template) or the controller or model.

I think you described exactly what I meant by "allergic to conditionals": a philosophy that conditional logic never belongs in the presentation layer. I didn't intend to imply a value judgement.

Re: Migrating from Ember.js to AngularJS

#34
post #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 d…

Well, the fact that you have to come on HN to refute these points means there's a problem. People aren't getting it. This could be a documentation issue, a complexity issue, or a marketing issue. But it's clear there's an issue. Just calling it FUD is disingenuous. It didn't sound like the OP was trying to smear ember.js at all, but instead give some reasons why they moved to angular. The OP doesn't write frameworks…

[deleted]

Re: Migrating from Ember.js to AngularJS

#35
post #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 d…

I've used both Ember and Angular (for former more than the latter) and I can say that I agree with your assessment. When I read the article I immediately recognized a bunch of problems.

For example, I find Angular much harder to get started with and understand than Ember. The documentation is more contrived (they give small examples but don't explain why it's done that way or how to expand on the example).

Angular's $resource object is nice as Ember lacks a built-in REST adapter. While Ember-data is still baking, is there any recommended alternative to use for basic REST calls? We're using jQuery right now with Ember.

Re: Migrating from Ember.js to AngularJS

#36
post #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 d…

Your response is certainly fair. I just think it's kind of unfortunate that the competition between JS frameworks has heated up so much of late - I've seen a few potshots aimed at particular frameworks in the last year. I'm tempted to wish that devs/maintainers would evolve their frameworks to occupy distinct, separate niches so they wouldn't have to clash head-on, but that's pretty utopian. (Not that such competitio…

That StackOverflow post is hilarious. Who actually justifies slow performance by quoting the limitations of humans ?

Here's a thought for that genius. What if I am showing a dynamic graph with that table .. or I have complex rows .. or animations .. or a trillion other use cases that he can't seem to envisage ? And people on slow computers or mobile devices obviously aren't welcome.

Anyway here's a performance comparison: http://jsperf.com/angular-vs-knockout-vs-ember/82

AngularJS does need some work. But so does every framework. Far better to be honest and upfront about your faults so you don't waste your user's time.

Re: Migrating from Ember.js to AngularJS

#37

I've actually had a lot of success using Knockout doing some single page apps. It seems Angular is similar?

I used Knockout for my last app and now that I am re-evaluating choices for a new app it's amazing to see how far everything has come.

It seems that AngularJS/EmberJS are more complete frameworks (routing, controllers, data fetching etc) and definitely seems like in either case your app will be more modular and consistent.

However AngularJS seems to have cumbersome documentation (why do I care about tests?) and far less helpful bindings e.g. conditionals. And EmberJS has terrible handling for events e.g. calling a function when clicking a link. However still learning so could be wrong on all parts.

Re: Migrating from Ember.js to AngularJS

#38

Earlier quoted context omitted.

Behavior can be provided through directives via elements, attributes, css class names, and comments. It isn't "allergic to conditionals". It just drives the logic elsewhere to keep the presentation layer looking as clean as possible to the developer so that you can either focus on the view (template) or the controller or model.

I think you described exactly what I meant by "allergic to conditionals": a philosophy that conditional logic never belongs in the presentation layer. I didn't intend to imply a value judgement.

> I didn't intend to imply a value judgement.

I will. That seems dumb.

Why are conditionals not allowed in presentation layer but repetition is ?

Re: Migrating from Ember.js to AngularJS

#39

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

AngularUI has a ng-if directive, to keep the DOM clean (and specifically make CSS first-child/last-child work): http://angular-ui.github.com/

Re: Migrating from Ember.js to AngularJS

#40
post #15

Earlier quoted context omitted.

Like this: {{name}} There are no names in the list

Or, if you don't want the "no names" item in the list at all when it's inapplicable, instead of merely hidden: There are no names in the list. {{name}} Either way you end up with an ugly dom.

I think if you're starting to add more logic in, you're expected to make your own directives and transclude like in http://blog.omkarpatil.com/2012/11/transclude-in-angularjs.h...
Post reply on HN