After a year after a re-learning angularjs, feeling a lot.
Last year, when I was in touch with web programming, my friend told me that Angularjs was very useful, so I began to learn ANGULARJS by just learning HTML and CSS, and it was difficult to think about it and not understand its value. Arbitrarily think that through the server can not need to angular such tools to solve all problems. A year later, the syntax of JS is relatively familiar with, after trying to write a website, not only very quickly mastered the angularjs of the general content, and understand the value of angular. It can also be explained that only after a large number of practices, the ability of their own abstract problems will improve.
Angularjs presents concepts such as module, service, Controllor,routeprovider,filter, and so on. So what does each concept mean? What is the relationship between the concepts?
Module can be understood as a complete program, it has its own controllor,routeprovider,filter, dependent on the service and module and so on.
Service can be understood as a global library function, can be customized, Angularjs can automatically find dependencies. Many times the data is requested from the $http or encapsulated $http service back to the platform.
Controllor can be used to manipulate data, defined by the user itself.
Routeprovider and Django Urlpattens do the same job, which is to show users different pages based on the different functions of the HTTP request.
Filters can be used to filter some data, just like the literal meaning.
Typically, we customize a module of our own, defining the template and Controllor for each request by Routeprovider, each controllor to reduce code duplication, make the logic clearer, and optionally use the service. Using filter when you need to filter the data is basically a simple angular-based application.
Benefits of Angular:
For users, the degree of abstraction is very high, the realization of the two-way binding data and shielding the complex DOM operation, in the context of simple page business logic, development and its simple.
Angular deficiency:
Encapsulates the native DOM interface, which can cause a drop in rendering efficiency.
The rest of the questions worth thinking about:
Does the work done by Routeprovider be done on the server or on the client? (The current train of thought is the need to test the efficiency of the gap between the two, if the efficiency is not small, I tend to do this work on the client).
Angular study Notes