Filters select a subset of items from an array and return a new array while Directives are markers on Data Object Model elements which are useful in creating custom HTML tags that serve as new, custom widgets. AngularJS has built-in directives called Templates which are the information provided by the controller in a rendered view and can be single or multiple views using partials.
The concept of switching views is called Routing and MVC is a design pattern for dividing an application into different parts (called Model, View, and Controller), each with significant functions. AngularJS implements MVVM (Model-View-View Model) traditionally and not the MVC architecture. The Angular JS team refers it as Model View Whatever humorously. Deep Linking allows one to encode the state of an application in the URL then be restore from the URL to the same state while Dependency Injection helps the developer by making the application easier to develop, understand, and test.
AngularJS-An Extension to HTML
HTML is highly efficient for the development of static documents, but it fails at some points when used for declaring dynamic views in web-applications. AngularJS extends HTML vocabulary for an application. The resulting environment is remarkably expressive, coherent, and fast to create.
AngularJS is a toolset for building an application framework. It is highly extensible and can work well with other libraries. Each feature can be modified as per the applications requirement and future perspective.
The main advantages of AngularJS are as follows:
- The observable functions are not required to be used. It analyses the page DOM and builds the bindings based on the Angular-specific element attributes. This results in a cleaner code, which requires less writing, easier to comprehend and there are lesser errors.
- AngularJS is faster as it modifies the page DOM directly instead of adding inner HTML code
- Multiple alternatives exist to perform similar tasks, thus making to particular development styles and tasks easier.
- Extended features such as dependency injection, routing, animations, view orchestration and supported by IntelliJ IDEA and Visual Studio .NET IDEs.
- Supported by Google and a great development community.
- AngularJS gives the ability to make Single Page Application in a spotless and viable way.
- The data binding capacity in AngularJS provides the user a rich experience of dynamic and responsive web applications.
- AngularJS code is unit testable and provides reusable components.
- AngularJS uses dependency injection and separation of concerns for greater efficiency.
- AngularJS provides the developers the benefit of writing a lesser amount of code and use the maximum functionalities.
- In AngularJS, the user views pure HTML pages and the business processing is done by the controller.
Being a very powerful framework, AngularJS has some limitations, which are as follows:
- AngularJS is vast and complicated. Since there exist many alternatives of doing the same thing, it can cause confusion and different coding techniques of developers may hamper the efficiency of the application.
- The brief study is required to understand the code because it is highly complex.
- Angular implementations scale poorly as with time the existing implementations need to be discarded and new versions need to be created with different approaches.
- AngularJS is not Secure and server side authentication and authorization is mandatorily required to keep the application secure.