Angular js

What Is React JS ?

AngularJS is a client side JavaScript MVC framework to develop a dynamic web application. AngularJS was originally started as a project in Google but now, it is open source framework.

AngularJS is entirely based on HTML and JavaScript, so there is no need to learn another syntax or language.

AngularJS is also called just “Angular”.

AngularJS changes static HTML to dynamic HTML. It extends the ability of HTML by adding built-in attributes and components and also provides an ability to create custom attributes using simple JavaScript.

  

AngularJS Features

MVC – The framework is built on the famous concept of MVC (Model-View-Controller). This is a design pattern used in all modern day web applications. This pattern is based on splitting the business logic layer, the data layer, and presentation layer into separate sections. The division into different sections is done so that each one could be managed more easily.

  1. Data Model Binding – You don’t need to write special code to bind data to the HTML controls. This can be done by Angular by just adding a few snippets of code.

  2. Writing less code – When carrying out DOM manipulation a lot of JavaScript was required to be written to design any application. But with Angular, you will be amazed with the lesser amount of code you need to write for DOM manipulation.

  3. Unit Testing ready – The designers at Google not only developed Angular but also developed a testing framework called “Karma” which helps in designing unit tests for AngularJS applications.

Angularjs

AngularJS Architecture

Angular JS Architecture
  • The Controller represents the layer that has the business logic. User events trigger the functions which are stored inside your controller. The user events are part of the controller.

  • Views are used to represent the presentation layer which is provided to the end users

  • Models are used to represent your data. The data in your model can be as simple as just having primitive declarations. For example, if you are maintaining a student application, your data model could just have a student id and a name. Or it can also be complex by having a structured data model. If you are maintaining a car ownership application, you can have structures to define the vehicle itself in terms of its engine capacity, seating capacity, etc.

Advantages of AngularJS

  1. Open source JavaScript MVC framework.
  2. Supported by Google
  3. No need to learn another scripting language. It’s just pure JavaScript and HTML.
  4. Supports separation of concerns by using MVC design pattern.
  5. Built-in attributes (directives) makes HTML dynamic.
  6. Easy to extend and customize.
  7. Supports Single Page Application.
  8. Uses Dependency Injection.
  9. Easy to Unit test.
  10. REST friendly.
Advantages of AngularJS