What are the advantages and disadvantages of ANGULARJS? Introduction to the advantages and disadvantages of ANGULARJS

Source: Internet
Author: User
This article mainly introduces to you about the history of Angularjs, as well as the advantages of ANGULARJS and ANGULARJS shortcomings of the introduction, now let us look at this article

First, let's look at the historical background of Angularjs:

In the field of web development, we typically use HTML as a declarative language for front-end page elements, using CSS as a descriptive language for presentation styles, and JavaScript as the imperative language for business processing interactions. When we build very complex web applications, pure and limited HTML is very inadequate, and JavaScript itself can be difficult to maintain and manage as the amount of project code expands, and the duration and cost of research and development can be difficult to control. At this time, we generally use some class libraries (such as jquery, Dojo, etc.) or frameworks (such as backbone, Ember, ExtJS, etc.) to improve development efficiency, thereby reducing project duration and cost, but also facilitate the subsequent maintenance and management.

Angularjs is not only a concept advanced (forcing gecko) front-end development framework, but also an end-to-end (end to the end) solution. ANGULARJS adheres to the MVC pattern in architecture design, advocating the loose coupling of presentation, data, and logic processing components (like Flex and WPF). Angularjs through the instruction technology to the traditional HTML to realize the natural expansion, through the compilation technology to achieve the data model and display view of bidirectional automatic synchronization, thus eliminating the front-end development of cumbersome and complex DOM operations (think of those pieces of selector). Finally, the modular design solves the problem of JS Code management maintenance and on-demand loading, freeing the majority of front-end programmers (as well as the back-end programmers) to complete the front-end development task productivity. And this decoupling itself, but also to the front-end automation testing technology to provide a good support. (Want to know more recommendations to Topic.alibabacloud.com's ANGULARJS reference manual section to learn)

To introduce the advantages of ANGULARJS:

1. The template function is powerful and rich, and it is declarative, and comes with rich angular instruction;

2. is a more complete front-end MVVM framework, including templates, data bidirectional binding, routing, modularity, services, filters, dependency injection and other functions;

3. custom directive, more flexible than jquery plug-ins, but need to understand some of the features of Directive, simple packaging easy, complex a bit of the official does not provide a detailed introduction to the document, we can read the source code to find something we need, Such as: the use of $parse in Directive;

4.ng modularity is a bold introduction of something Java (Dependency injection), it is easy to write reusable code, for the agile development of the team is very helpful, our project from the online to the present, the UI changes greatly, in the exploration of iterative products, but JS code is basically very little change.

5. Supplement: Angular supports unit testing and e2e-testing.

Note: The best thing to do is Angularjs's two-way binding and the use of his template layer.

Finally, we introduce the disadvantages of the following angularjs:

1. Verification function Error message display is weak, need to write a lot of template tags;

2.ngView can only have one, can not nest multiple views, although there are angular-ui/ui-router to solve, but the ui-router for the URL control is not very flexible, must be nested;

3. For particularly complex applications, seemingly a bit of performance problems, especially in Windows using Chrome browser, do not know whether it is a memory leak or other problems, did not find a good solution, it is strange in the IE10 but quickly, but also in the observation;

4. This upgrade from 1.0.X to 1.2.X, there seems to be a larger adjustment, there is no perfect compatibility of the lower version, after the upgrade may lead to a compatibility bug, specific details refer to the official document ANGULARJS, the corresponding Chinese version: Angular 1.0 to 1.2 Migration Guide, Now the angularjs4 are out, but the use of angularjs2 more;

5.ng advocates in the controller do not have to operate the DOM code, for some jquery plug-in use, if you want to do not break the code cleanliness, need to write some directive to encapsulate the plug-in, but now there are many plug-in version has been supported angular, Preferably can be combined with Cordova plug-in hybrid development;

6.Angular is too cumbersome.

Note: The most uncomfortable point is the angularjs routing mechanism, very prone to problems.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.