Saturday, July 19, 2014

3D’s of Angular.js

Chapter – II
3D’s of Angular.js

Data Binding


One of the core feature you will want in every presentation or client side development framework is data binding. Unlike any other frameworks angular provides two way data binding. In angular all you will have to do is to connect the view to a model. And you are done! Later in your application if the model changes the view get changed and if the view changes the model get changed. This feature was so much needed because before that developers have to write additional codes to update the views and models separately. Now there is less code and less code is always good!

Directives


Directives are like your custom HTML. Angular has many built in directives that makes your HTML declarative. Some of them are ng-view, ng-model, ng-controller etc. You can build your own directives and to make a custom HTML element, attribute or class. By default all directives that you create are attributes if you don’t define its mode. We will take a deeper dive into directives later.

Dependency Injection


Dependency injection is how your angular modules talk to different services throughout the applications [We will talk about modules and services later]. As I already said you can use other library like jquery with angular. To do that you will have to inject the library dependency where you will be needed it. Angular’s own services are separated into different files. To use these different services throughout different modules, you will have to inject the dependencies. For example if you want to use angular’s animation service you will have to inject the ngAnimate into your application module.





Wednesday, July 16, 2014

What and Why’s of Angular.js

Chapter – I
What and Why’s of Angular.js

What is Angular.js


Today I’m going to talk about a very popular client side web application framework called Angular.js. With the initial release in 2009 this super heroic JavaScript framework is still getting developed by the Google community and offering some mind-blowing features which developers wanted for so long. Built with only JavaScript this framework offers us to implement MV* (Model-View-Whatever) in our web application development to overcome development and testability overheads.

Why Angular.js


To take total advantage of a framework, first we must know why the framework was even created in the first place. Since the client side development is getting cheaper and users are getting demanding day by day, giving the user a great experience is a matter of concern for the developers. Design and usability both play a great role nowadays. Delivering a rich client side environment only with raw JavaScript is painful and frustrating unless we use correct tools and techniques. And then Angular.js comes to rescue us. Staring from organizing your code, Angular can teach your HTML to behave dynamic and be friend with other framework such as Jquery. This ultimately makes your development process easy and fun.