Jessicahoney
New member
These I'm hearing so much the importance of Angular JS.
What is Angular JS and how use this in a website or web application?
What is Angular JS and how use this in a website or web application?
Angular JS helps :-
1. MVC done right
2. A declarative user interface.
4. Behavior with directives
5. Flexibility with filters
6. Write less code
7. DOM manipulations where they belong
8. Service providers where they belong
9. Context aware communication
10. Unit testing ready
11. Its a framework to use Angular for mobile development.
Angular JS helps :-
1. MVC done right
2. A declarative user interface.
4. Behavior with directives
5. Flexibility with filters
6. Write less code
7. DOM manipulations where they belong
8. Service providers where they belong
9. Context aware communication
10. Unit testing ready
11. Its a framework to use Angular for mobile development.
Hello you
AngularJS is especially useful while building Data Driven, CRUD, Single Page Applications - let's explore that a bit-
Single Page Applications are web app which fits in a single web page, to provide fluid user experience like a desktop or native smartphone application.
Gmail, Google Maps web applications are perfect examples of a Single Page Apps.
Data driven, CRUD (Create Read Update Delete ) Apps -
Irrespective of the capabilities of the modern web ecosystem, most of the web apps remain Line of Business, RDBMS based, CRUD operations driven Information Management Systems -
A typical example would be an HRMS or a CMS.
Now, such kind of apps are the sweet spot of AngularJS - if you're building one of such apps, AngularJS is best choice for you, to build a client side application!
Let's have a look at primary reasons to use AngularJS.
Declarative Paradigm
AngularJS relies on Declarative programming paradigm
In simple terms, it means you tell the computer WHAT to do, NOT HOW to do it!
For example, in case of AngularJS, when you want to update data in the document, you DECLARE the model using templating syntax, and when the model changes, the data on the document changes, without any additional programming! (Two-way data binding between views and controllers)
So, here you declared your model, and now AngularJS takes care of HOW to handle the updation itself!
So you told Angular WHAT to do, and it did it itself, without specific instructions on how to do it!
Now, this is a BIG WIN for pragmatic developers!
Instead of focusing on hacking the DOM, programmer can focus on core business logic and user experience!
Directives -
One of the most powerful feature of AngularJS -
Directives provide an extension to HTML markup-
You can create self-managed , autonomous "components" which can be reused throughout the web applications by creating a directive!
A directive has it's scope, controller, linking function among many other things!
You can also use directives to create a declarative, domain specific language!
Data Driven
AngularJS applications are primarily data driven - that means, data - or the domain models DRIVES the application and it's development, not vice versa!
Application is developed to cater domain models, domain models are not defined to cater needs of the application!
Now, this, again, a BIG WIN for pragmatic developers, especially when you're building front end web apps, as it is the situation when domain models are predefined and immutable!
Angular provides tons of features for managing forms really well. It provides built in, robust mechanisms for form validations, updating the forms.
But..
When you should NOT use AngularJS?
Complex interfaces relying on heavy DOM manipulations
As we've seen, AngularJS is declarative in nature, which also implies, we have a little control over HOW things happen!
Well, sometimes, it is not what you want!
If you're building a complex user interface relying heavy on DOM manipulation at 'nuts and bolts' level, Angular is not the best choice!
For example, when building an HTML5 game, what you really need is heavy DOM manipulation!
High Performance Client Applications
In case of most of the real-life CLIENT apps, 'high performance' isn't a typical requirement, but if you have, you'll need to consider a few things.
For it's declarative magic, AngularJS relies on something called 'dirty checking' How AngularJS implements dirty checking and how to replicate it ourselves
As it sounds, it is 'dirty' from the performance perspective.
It is a common understanding that your Controller shouldn't be 'watching' more than 2000 models at a time, and, if your application needs to do something at THAT scale, Angular is not the best choice.
This drawback might get away with introduction to Angular2 and integration with native ES6 features (for example Object.observe() ) , but we'll have to wait for a while before it rolls out.
Hope this helps!
Hello you
AngularJS is especially useful while building Data Driven, CRUD, Single Page Applications - let's explore that a bit-
Single Page Applications are web app which fits in a single web page, to provide fluid user experience like a desktop or native smartphone application.
Gmail, Google Maps web applications are perfect examples of a Single Page Apps.
Data driven, CRUD (Create Read Update Delete ) Apps -
Irrespective of the capabilities of the modern web ecosystem, most of the web apps remain Line of Business, RDBMS based, CRUD operations driven Information Management Systems -
A typical example would be an HRMS or a CMS.
Now, such kind of apps are the sweet spot of AngularJS - if you're building one of such apps, AngularJS is best choice for you, to build a client side application!
Let's have a look at primary reasons to use AngularJS.
Declarative Paradigm
AngularJS relies on Declarative programming paradigm
In simple terms, it means you tell the computer WHAT to do, NOT HOW to do it!
For example, in case of AngularJS, when you want to update data in the document, you DECLARE the model using templating syntax, and when the model changes, the data on the document changes, without any additional programming! (Two-way data binding between views and controllers)
So, here you declared your model, and now AngularJS takes care of HOW to handle the updation itself!
So you told Angular WHAT to do, and it did it itself, without specific instructions on how to do it!
Now, this is a BIG WIN for pragmatic developers!
Instead of focusing on hacking the DOM, programmer can focus on core business logic and user experience!
Directives -
One of the most powerful feature of AngularJS -
Directives provide an extension to HTML markup-
You can create self-managed , autonomous "components" which can be reused throughout the web applications by creating a directive!
A directive has it's scope, controller, linking function among many other things!
You can also use directives to create a declarative, domain specific language!
Data Driven
AngularJS applications are primarily data driven - that means, data - or the domain models DRIVES the application and it's development, not vice versa!
Application is developed to cater domain models, domain models are not defined to cater needs of the application!
Now, this, again, a BIG WIN for pragmatic developers, especially when you're building front end web apps, as it is the situation when domain models are predefined and immutable!
Angular provides tons of features for managing forms really well. It provides built in, robust mechanisms for form validations, updating the forms.
But..
When you should NOT use AngularJS?
Complex interfaces relying on heavy DOM manipulations
As we've seen, AngularJS is declarative in nature, which also implies, we have a little control over HOW things happen!
Well, sometimes, it is not what you want!
If you're building a complex user interface relying heavy on DOM manipulation at 'nuts and bolts' level, Angular is not the best choice!
For example, when building an HTML5 game, what you really need is heavy DOM manipulation!
High Performance Client Applications
In case of most of the real-life CLIENT apps, 'high performance' isn't a typical requirement, but if you have, you'll need to consider a few things.
For it's declarative magic, AngularJS relies on something called 'dirty checking' How AngularJS implements dirty checking and how to replicate it ourselves
As it sounds, it is 'dirty' from the performance perspective.
It is a common understanding that your Controller shouldn't be 'watching' more than 2000 models at a time, and, if your application needs to do something at THAT scale, Angular is not the best choice.
This drawback might get away with introduction to Angular2 and integration with native ES6 features (for example Object.observe() ) , but we'll have to wait for a while before it rolls out.
Hope this helps!