This week at PROBESEVEN, a workshop of 5 days span was arranged to discuss and explore AngularJS, developed by Google Inc and community which is extremely popular to build modern web application. The workshop was all about an introduction to AngularJs and the concepts of Model View Controller (MVC). Here are some tit-bits of the wonderful framework, though meant for an advanced developer. Blog(1)

What makes AngularJs popular?

In a traditional application, all actions taking place in the web page should go back and forth to the web server. To reduce the dependency of server in executing the functions, JavaScript is used which made the life of developer easier. JavaScript is extensively used to build more adaptive and responsive UI, reduce workload on the server and it perhaps saves the bandwidth.

While JavaScript is popular for its real advantages, AngularJS is purely built on JavaScript framework, 100% Client-side and in addition, it is one of the best frameworks employing shorter codes and ensuring code stability.

AngularJS provide

  • Single and Multiple sibling views
  • Multiple nested views
  • Fast Development (Once you two become good buddies)
  • Quality (Both in terms of code structure and robustness) &
  • Free (Open Source)
  • The browser makes an HTTP request to the server to load the initial template and scripts.
  • Angular loads and waits for the page to be fully loaded. Then, it searches for the ng-app directive and loads the associated module and its dependencies.
  • Angular compiles the template and pushes to the view state.

How AngularJS works?

And anyone who is behind writing less boilerplate code will enjoy Angular ’s data binding abilities.

An AngularJS workflow skeleton will look as below:

function myCtrl($scope) {
  $http({
    url: 'request-url',
    method: "POST",
    data: { 'message' : message }
  })

  .then(function(response) {
    // success
  },

  function(response) { // optional
    // failed
  });

}

The presentation was best enjoyed by web developers, front-end designers and architects and it is a timely session to know this powerful framework that reduces the burden of server-side services and produces lighter client-side apps. As defined, AngularJS delivers result with HTML extraordinarily expressive, readable, and easy to develop.