Misko Hevery wrote a bit about dirty checking in Angular on this StackOverflow page linked from the submission: http://stackoverflow.com/questions/9682092/databinding-in-an... I think I've also seen a speed comparison/test involving Angular updating (animating) many objects repeatedly. So I'm not sure how much of an issue dirty-checking is in practice.
I'd like to see civil discussion between maintainers of JS MVC frameworks on technical points, but the higher profile the forum, the higher the stakes and the more mindshare there is to gain/lose. In which case I doubt civility would endure. Still, it's better that people hear the cases laid out side-by-side for each framework, which supplements the reviews given by independent bloggers.
I hope you didn't find any personal attacks in my response. I want to be firm about the fact that the article contained gross inaccuracies.
I welcome criticism of Ember.js; as with any open source project, there's plenty to criticize. I would just like that criticism to be accurate.
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.
1: https://plus.google.com/112439678898563138768/posts/RZKRBiGX...
Sadly, these days, "FUD" has become synonym for "this person is saying something I disagree with".
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.
I would say that "dirty checking" is a better approach. The code is cleaner and with Object.observe() there are no performance issues even in _edge cases_ with thousands of monitored objects.
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 is fully unit tested.
Not to start a flame war, but I'm not sure this is a plus. Full unit coverage is nice for confidence, but can be balls and chains when it comes time to make changes. Just as an example, Rails is not fully unit tested by any stretch of the imagination.
Ask any of our pre-1.0 users; they'll assure you that the pace of change was breakneck and certainly not hindered by our unit tests.
Tom, do you know if anyone has written extensively about tests in Ember? Or is the source still the best go-to?
@tomdale thank you for the breakneck speed in development, it amazes me how much the project has evolved in the time I've been using it.
And boy does it show.
Run loops make a great partner in crime with requestAnimationFrame.
https://github.com/collin/taxi/blob/master/src/taxi.coffee#L...
Will, both, EmberJS & AngularJS become faster because of these new core-JS features?
It does have angular-resources for restful interfaces. Which are straight forward and easy to use.
I'll let ember ferment.
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.