When the framework turns into a superhero for your projects!
AngularJS is a framework used for web development, especially for single-page web applications. It was initially launched as a project by two Google developers, Brad Green and ShyamSeshadri. Its first official version was released in June 2012. Today, it has become an open source framework, with a large community of developers. It is one of the most used frameworks in web agency.
The existence of this framework is justified by the limitations of HTML, which can only produce static pages. We had to find a way to work with applications that manipulate data dynamically, such as CRUD systems.
The framework is built around a few key concepts, such as MVC architecture, Data Binding, dependency injection and the use of guidelines for DOM manipulation. These are, for the most part, existing concepts that cannot be new to some web developers.
The MVC architecture (Model, View, Controller)
It is a well-known web development architecture that separates the actual data, its presentation and the actions that can be undertaken on this data.
Model: This is the data. It can be dynamic data, which means that you can get it from a database like MySQL. You can also obtain data from a static JSON file.
View: this is the display of the model that is your data.
Controller: it allows you to control the model and view, which means it controls how data is retrieved and displayed to the end user.
The Data Binding
This is the principle according to which the framework injects dependencies whenever an application is needed. The developer's job is to pass the dependency on to the module, and everything else will be handled by the framework. In this way, the modules no longer have to instantiate their dependencies.
Handling the DOM
With the framework, the DOM is handled by means of directives. Directives are markers on a DOM element (such as an attribute, element name, comment or CSS class) that tell the framework's HTML compiler ($ compile) that a specific action is needed on that DOM element. It can be about transforming the DOM element and its children. There are predefined guidelines and the ability to create them yourself.
Benefits of the framework
The Google-informed framework is a complete solution for rapid development on the client side. It does not need any other plugins or frameworks. It is intuitive because it allows you to use HTML in a declarative programming approach. In addition, the fact that it was developed by Google engineers means that there is a large community to support its development.
No wonder this technology is preferred in web agency, and finds itself at the heart of many e-commerce, travel, weather, social networking applications such as LinkedIn, etc....
Découvrez également nos services en ou Developement Laravel