5 ms·
ok here is my take : AngularJS : + MVVM : databinding + Dependency Injection, so no global state, and loose coupling + Well organised into services , view m
by camus 14y ago
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 control over dom objects lifecycle
- the doc sucks
- if you dont understand Dependency injection , dont use it.
- will not scale if javascript dont get some new structures , dirtychecking is insane given javascript performances.
Ember:
+ fully event driven
+ plays well with other libraries
+ less magic than angular
+ full control over DOM lifecycle
- the doc sucks but less than angularJS one
- more verbose than AngularJS
- unstable API
I built apps in both langages. like that one :
http://markme.alwaysdata.net/ http://markme.alwaysdata.net/
I prefer Ember but have no problem using Angular when I have to.
- patrickaljord 14y ago> forget any projects that are animation/transition between views heavy, you'll fail Animation is coming to the next version. It's already possible but you have to do it yourself. > doesnt play well with some other frameworks ( requireJS, jQuery mobile , even phonegap ...) * https://github.com/tigbro/jquery-mobile-angular-adapter https://github.com/tigbro/jquery-mobile-angular-adapter * http://briantford.com/blog/angular-phonegap.html http://briantford.com/blog/angular-phonegap.html > is slow when dealing with a lot of data. It's fast enough not to be noticeable by humans unless you're batman as explained by Angular creator: http://stackoverflow.com/questions/9682092/databinding-in-angularjs/9693933#9693933 http://stackoverflow.com/questions/9682092/databinding-in-an... . Object.observe will make it fast even if you're batman. > no control over dom objects lifecycle There is control actually (see digest, apply etc). > the doc sucks The guides are actually pretty good and http://egghead.io/ http://egghead.io/ free screencasts are awesome. Edit: Google is going to sponsor the author of egghead.io videos! https://twitter.com/eggheadio/status/302494160982781953 https://twitter.com/eggheadio/status/302494160982781953 > if you dont understand Dependency injection , dont use it. You don't have to understand DI to use it. I know I didn't. > will not scale if javascript dont get some new structures , dirtychecking is insane given javascript performances. Again, read this http://stackoverflow.com/questions/9682092/databinding-in-angularjs/9693933#9693933 http://stackoverflow.com/questions/9682092/databinding-in-an...
- dgregd 14y ago> Object.observe will make it fast even if you're batman. Additionally Object.observe will make Ember way of the data binding obsolete. So there will be another big Ember API change in near future. Object.observe adoption for Angular apps will be transparent. Only the framework code will be updated. Maybe it is already updated.
- camus 14y ago> * https://github.com/tigbro/jquery-mobile-angular-adapter https://github.com/tigbro/jquery-mobile-angular-adapter * http://briantford.com/blog/angular-phonegap.html http://briantford.com/blog/angular-phonegap.html that's what i'm saying i should not need an adapter for these libraries , i dont need them with Ember or Backbone
- patrickaljord 14y agoYou don't need them but they make it more convenient. There's one for ember too https://github.com/LuisSala/emberjs-jqm https://github.com/LuisSala/emberjs-jqm
- sharondio 14y ago"You don't have to understand DI to use it. I know I didn't." LOL...me neither. I also don't get how someone could do anything beyond "Hello World" and not use DI as it seems to be pretty integral to how Angular works.
- Kiro 14y ago- forget any projects that are animation/transition between views heavy, you'll fail Why? How is it different from using jQuery without Angular?
- camus 14y agoyou have a list , each time you remove elements on the list ,you want to fade out elements that are being removed for 0.5 secs. Explain me how you would do that.
- Kiro 14y agoJust create a custom binding (or whatever it is called, using knockout terminology here) which fades it via a jQuery fadeOut?
- camus 14y agonope , you have very little control over how angularJS destroy dom nodes.
- ganarajpr 14y agoYou are partially right... partially wrong.. You lose control for it only when you use ng-repeat.. you could alternately write your own repeat directive that does animations for adding or removing.. If your are not yet in a state to write this level of a directive yourself, you still have a few options. I remember someone had written a fadey directive that does fading animation, there is also a fork which does animation with ng-repeat. And if you can wait, this fork will be merged into the core angular , hopefully soon...
- glennsl 14y ago> - 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.
- rxcfc 14y agoPrior to the 1.0 RC, Ember's API changed a lot because we were seeking for the best abstractions. We didn't want to lock ourselves in when there was a better way to do things. Now that we've hit 1.0 RC, the API is generally frozen. We'll only break existing APIs in exceptional cases. Once 1.0 Final is release we'll be sticking to SemVer.
- sharondio 14y agoI know we use Angular with RequireJS in a few of our apps. We require in all of our libraries (jQuery, Bootstrap and Angular) before creating the application module. We haven't found speed to be a problem yet. We used to use CanJS, and I can tell you that handling the same amount of data, Angular is faster, even with fairly complicated filters in place. I do agree that Angular requires you to let go of the "jQuery way" of approaching DOM manipulation, which throws jQuery-coders for a loop. It's a downside not to be able to plop in a jQuery plugin. Then again, considering some of the plugins I've encountered, that might not be a complete loss. Also, the Angular-UI team is doing a heck of a job of replicating the most common plugins as Angular native directives.