Overview of AngularJS
Introduction to AngularJS
Basic knowledge to grasp to approach AngularJS
Features of AngularJS
- AngularJS is often used for frontend development (client interface) through APIs to get data from the server and use the data to present html AngularJS source code conforms to MVC (Model – View – Controller) structure.
- Provides Data-binding mechanism to reduce software development time
- Angular is open source, completely free and developed by thousands of programmers around the world.
- In short, it can be understood that working with AngularJS is like working with Ajax, using the bind data mechanism, operating according to the MVC model, and using a service to interact with data from the server.
Describe the concept of MVC pattern in programming
View: is the interface concept of the application, easier to understand than what the user sees and interacts with (on the browser), the user will not know what is behind the model, the controller of the application is using. And of course, views understand the model, and will use the data not in the model to display it for user interaction.
Controller: This is the place to handle the logic, in between to communicate with the View and the Model, the controller contains the logic to work with the data represented through the Model, and gives it to the view for the view to understand and display to the user. . In Angular, the controller's flow is to call the service to communicate with the server through the API, get the data (model) and return the view to display to the user.
AngularJS Core Features & Concepts
Data-binding : (data binding) automatically synchronizes data between model and view
Scope: (Scope) These are connection objects between Controller and View
Controller : Central to control the flow of software, used in conjunction with scope objects to process data, and define the desired interface to display to the user.
Service : As I mentioned above, AngularJS uses APIs built from web services (PHP, ASP) to manipulate the DB.
Filters : Filters out the elements of an array and returns the new array
Directives : mark up DOM elements, that is, create custom HTML tags
Templates : a component that helps display information from the controller, can be understood as an HTML structure template, this is a component of views
Routing : switch between actions in the controller, based on the URL the user manipulates in the browser
MVC : Model divides separate components into Model, View, Controller. This is a pretty cool model, but in Angular it's slightly reworked to resemble MVVM (Model View View Model).
Deep Linking : Deep linking, which allows you to encode the state of your application in URLs so that it is bookmarkable to search engines.
Dependency Injection : Angular makes it easier for developers to create apps to develop, understand, and test easily.
Advantages and disadvantages of AngularJS
- Angular allows to create applications in a simple, clean way
- Angular uses data bind like .NET with HTML binding feature, so it makes users feel comfortable.
Although angular has many advantages, it also has the opposite side:
- Error on mobile devices at the moment
- Stopped development and ended support until the end of 2022. Google has abandoned the old framework structures and replaced by the next Angular versions with completely different concepts, it will take time to approach from the ground up. .
Below is a basic introduction to angularJS, although the language is out of date, in practice, old projects using AngularJS still need to be maintained, and if understand the structure of AngularJS, with a knowledge base This will be easily accessible to the current new frameworks such as ReactJS, VueJS, or Angular 9 which are very powerful at the moment.