Live data from Hacker News

Ember.js or Angular.js?

news.ycombinator.com

41–50 of 104 posts

Re: Ember.js or Angular.js?

#41

I have limited experience with javascript and MVMM's and cannot answer all the questions, but here is what I do know: Which is best overall? Not enough experience with ember.js to comment. Common gotchas for angular: It's a very different approach when compared to using jquery for everything. The documentation can seem a bit daunting at first, as described in the popular post about why discourse chose ember.js. "The…

Ha ha, nice way to scare people off angular and justify their decision ;) Transclusions are an interesting feature to cherry pick because a) they're a necessary complexity to enable reusable components (one of angular's greatest strengths), and b) they highlight the steep learning curve required to truly master angular.

I agree that the docs can be a bit vague occasionally, but I think that's only due to the sheer depth of features and flexibility that angular provides. I was a skeptic for a long time (was championing knockout.js), but having used it in both personal and professional projects, I'm a convert.

Angular is a thoroughly well designed library, that gets the hell out of your way.

Re: Ember.js or Angular.js?

#42
post #33

Earlier quoted context omitted.

Actually that's the only bit confusing part of the documentation (which now everyone is quoting to troll Angular).

Pity Google don't take the hint and make it more readable/understandable then.

It's really not so bad, I'm in no way an angular expert, but reading that passage (even out of context), is not beyond the realms of comprehension.

I think it says what it needs to say in the context of the surrounding information, no more, no less.

Re: Ember.js or Angular.js?

#43

I have enormous confidence in the capabilities of the team working on Ember. jQuery, Sproutcore, Rails core team members. If you're a Rails developer, the existence of active_model_serializers as a quasi-standard for how JSON is shuttled between tiers suggests that Ember has taken a position of strong thought leadership on a lot of things that other frameworks just don't have the reach to do. Also, the recent Peepcod…

I think the capabilities of the Angular team are quite respectable as well. Speaking of "reach" and thought leadership makes think of the fact that these guys are working at Google! This seems to have several positive aspects:

a) Possibly a more solid stance on development (stable APIs, not ditching a project and rewriting (Sproutcore -> Ember). Sorry if I simplify too much here.

b) Being a little "strategic" for Google: In this podcast [1] Igor Minar seems to suggest that they have some influence with other people at Google who work on web standards.

Logic: Google goes great length to optimize Chrome performance - therefore needs to understand how modern websites work, therefore may want to influence how modern web development is done (through their own js framework) so that the Browser can optimize better etc.

c) Also note the existance of a Chrome extension [2] for displaying and debugging Angular.js models in the browser.

Logic: Google wanting to promote their browser - therefore adressing important multiplicators like web developers with useful tools for development, leading to more websites being developed, tested primarily on Chrome, making use of Chrome features etc.

Do you agree? I haven't heard too much commentary on the "big picture"!

[1] http://basementcoders.com/2011/08/episode-41-interview-with-... [2] https://github.com/angular/angularjs-batarangfor Chrome helping with displaying

Re: Ember.js or Angular.js?

#44
As a relative beginner - "It's a very different approach when compared to using jQuery for everything" — is a bit misleading. They're both very different to jQuery (or Backbone/Spine - which are beautifully simple).

Totally anecdotal: - Backbone I learnt straight away and have been progressively writing better code for around a year. It gives you enough rope to hang yourself but you can usually see what you've done and refactor. Which is nice. - Ember I've been trying to learn a couple of times for the past year. Keep trying. Find a tutorial. It's out of date. Get frustrated. Try again. Find another one. It's poorly written. Try Again. Find another one. Can't get something to work and Ember is too much of a blackbox to debug. Give up.

The docs on the site are getting better (but still suck) - the PeepCode tutorial was great (not the Play By Play with Yehuda; don't waste your money on that) - but it still only did relatively trivial things. Would be great if PeepCode did a Play By Play with a Rails API and relational data etc.

- Angular scared me for ages too - the docs, as with Ember, are written by people who know how to use the framework for people who know how to use it already. Then Egghead.io happened. Wow. The concepts actually aren't that hard!

I think what the community sorely needs is a good Ember teacher - one that isn't patronising or aimed at computer scientists!

Re: Ember.js or Angular.js?

#45
I haven't used ember.js, but have been getting my teeth into angular.js over the past couple of months. Overall, I've been very happy with it.

What I liked:

- Relative simplicity and very little code for most common tasks (showing/hiding content, AJAX and JSON support, breaking down the UI into components / areas).

- Great testability, thanks to relatively clean separation of concerns.

- The two way databinding support is awesome and works well. This does away with lots of the usual boilerplate.

- Templating is very straightforward.

- No performance issues to report. But from what I can gather, Angular a bit like the Swing framework - it's possible to shoot yourself in the foot and write poorly peforming applications. (Haven't managed to do that yet ;))

What I'm struggling with:

- Working with directives is complicated. They are the only way you can integrate with other javascript components sanely. Specifically, I ran into some issues with how to make the databinding work between directives. Still wrapping my head around how that bit works.

- It took a while before I was able to get my unit tests up and running (most example test suites were out of date with the current way of doing things)

- I have some (minor) issues with how things are named. There are two kinds of 'Controllers', for example, which are used in very different contexts (in the DOM, and in directives). Angular's 'controllers' are actually closer to models IMHO (they are where you manipulate state) than controllers.

Re: Ember.js or Angular.js?

#46
post #34

ok here is my take : AngularJS : + MVVM : databinding + Dependency Injection, so no global state, and loose coupling + Well organised into services , view models ,directives , filters , ... - forget any projects that are animation/transition between views heavy, you'll fail - doesnt play well with some other frameworks ( requireJS, jQuery mobile , even phonegap ...) - is slow when dealing with a lot of data. - no con…

> - unstable API

Seeing as Ember just hit 1.0 RC, the API should now be pretty stable. It's been pretty bad the last few months though.

Also, with a stable API, the docs will hopefully see significant improvement.

Re: Ember.js or Angular.js?

#48
I think deciding on this will be hard and frankly subjective. My suggestion is that you try both for a small project and decide for yourself what makes you feel at home. It should not take more than a couple of days to assess it yourself.

As for me, I decided to go with Ember.js. To be frank the final decision was between Ember and Angular (over all other frameworks) and I felt that getting past the learning curve of Ember, it made me comfortable. Most importantly both are close/past the 1.0 release.

If you do choose Ember, I would recommend the following:

- Watch the peepcode's emberjs cast https://peepcode.com/products/emberjs (and code it up)

- Go through the Emberjs documentation on the site, though very likely you will not know how to build a big app. It is still necessary to hone your fundamentals.

- The 1.0 RC1 that was released yesterday has dependency injection, if that matters to you. My opinion is to just code as little as possible and prefer to stick with the framework's conventions (i.e not use DI).

- Use a sound build tool. I don't have Ruby/RoR background and so preferred to use Brunch.io (http://brunch.io/) - Nodejs pipline. They have a Emberjs skeleton available to get started quickly - https://github.com/icholy/ember-brunch. I believe there is a rake pipeline tool for Ruby/RoR folks as well.

- Ryan Florence recently released a scaffolding/build tool Emberjs - https://github.com/rpflorence/ember-tools. I use this to develop my skeletons and use it with my Brunch.IO setup. It is a good place to start and get past the learning curve. The tool will probably become the go to place for building Emberjs apps sometime later.

I am sure you will find similar tools for Angular.js but I think you just have to try something simple in both and find out for yourself what makes you comfortable with these opinionated frameworks :).

Re: Ember.js or Angular.js?

#49

I want to learn Ember, but the official docs are confusing, and the tutorials are outdate, are there any YouTube videos or any other of tutorial on Ember?

I don't get it, why not just play around with examples, look at the source, destruct it and understand how it works? This is efficient.

You're exactly like most of my friends who want video2brain alike materials to teach them stuff they don't want to study on their own. No offense :)

Re: Ember.js or Angular.js?

#50
post #9

I have enormous confidence in the capabilities of the team working on Ember. jQuery, Sproutcore, Rails core team members. If you're a Rails developer, the existence of active_model_serializers as a quasi-standard for how JSON is shuttled between tiers suggests that Ember has taken a position of strong thought leadership on a lot of things that other frameworks just don't have the reach to do. Also, the recent Peepcod…

Looks like the peepcode screencast is paid: https://peepcode.com/products/emberjs I suppose you'll say it's well worth the money? Anyone else bought/watched this screencast?

Definitley worth the money but for my taste a bit too basic
Post reply on HN