AngularJS : A “Write Less Do More” JavaScript Framework

11 / Sep / 2012 by raj 0 comments

AngularJS is a javascript framework which helps to make html pages more dynamic with the least possible code. The idea is to write less, do more.

AngularJS is based on the concept of MVC ( Model, View & Controller ).

Model :

It consists of the data that flows in the application. Before the advent of AngularJS, whenever there was a change in model, the DOM elements were manually manipulated to reflect that change. Similarly, when a DOM element was changed, model was required to be changed to show the new state of DOM. Now, with AngularJS, there is two way binding of data -From model to DOM and from DOM to model. It means, if there is a change in DOM, the corresponding data automatically changes itself to reflect that change and vice-versa. This data-binding capability of angularjs is very advantageous as it tremendeously reduces the amount of javascript code that we generally write.

View :

View is the final HTML page that is rendered to user after the processing of angularjs is completed.

ViewModel :

ViewModel is a special object that is specific for every view. It aids in providing data which is meant for that particular view. We refer the ViewModel object by a variable named $scope.

Controller :

A Controller is used to express/manipulate the behavior of the DOM elements. The ViewModel variable $scope is available to controller function and it adds properties and methods to the $scope, that it can access later.

Some of the outstanding features of angularjs are :
1. Two ways data binding
2. MVC architecture
3. Dependency Injection
4. Templates
5. Testing Support
6. Form Validation
7. Creation of Reusable Components
8. Localization

We will further explore the above mentioned features of AngularJS later in this series of blogs.
Till then, have fun 🙂

Read Further on AngularJS Series

FOUND THIS USEFUL? SHARE IT

Leave a Reply

Your email address will not be published. Required fields are marked *