您的位置:首页 > Web前端 > AngularJS

Pros and Cons of Angularjs

2013-04-15 15:46 477 查看
Angularjs is being hot recently in front end world. As a MVC framework introduced by Google, it separate concerns of a web app in a sort of WYSIWYG way that
make the development and maintenance more easier and efficient(check this out). If you google something like "angularjs vs xxx.js … " you can see brutal wars among these mvc framework
alliance, and people in the angular troop would say "This is the best and only choice for you !!". After some searching, I find out some pros and cons of angular and hope it can help for choosing a "right" MVC framework from the jungle.



Pros:
1. intuitive. using the view to derive behavior. It's somewhat more easy to understand and startup, and also reduce lots of boilerplate code. http://www.localytics.com/blog/2013/angularjs-at-localytics/

2. two way data binding.
3. removing the need for child views which is a disaster in Backbone. http://tech.nextgxdx.com/2012/09/01/backbone-to-angularjs-removing-the-need-for-child-views/
4. easy unit testing.

Cons:
1. not just working friendly with query plugins and other popular UI widgets (like Kendo UI).
- https://groups.google.com/forum/?fromgroups=#!topic/angular/5tCXyc7jtc4
- https://groups.google.com/forum/?fromgroups=#!topic/angular/QBBX_oGx90w
2. the kind of tech like directive, server or something are relative new that requires an learning curve.
3. projects that built with angularjs is relative less. [compared with origin backbone & marionette] https://github.com/angular/angular.js/wiki/Projects-using-AngularJS
4. under heavily developments so that api could be changed rapidly.
5. the dirty-checking of angular may seem simple but even inefficient vs change listeners backbone or some applied. http://stackoverflow.com/questions/9682092/databinding-in-angularjs
6. do not working with IE6,7 without some tricks and sluggish in IE8, 9 https://groups.google.com/forum/?fromgroups=#!topic/angular/tYrm758kxNo
7. as there are more ngRepeat or ngModel set up, there are more "watch"es that need to be processed by $digest which could slow down your app. http://stackoverflow.com/questions/14485828/angular-js-performance-issues
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: