AngularJS

In this post we interview Dr Takhir Mamirov about his work with AngularJS during the last year. AngularJS is an open-source JavaScript framework, maintained by Google, that assists with running single-page applications. Its goal is to augment browser-based applications with model–view–controller (MVC) capability, in an effort to make both development and testing easier. The conversation gives us answers on such questions as what, why and where AngularJS can be used. So, let’s review it!

What is the philosophy of Angular?

AngularJS is built around the belief that declarative programming should be used for building UIs and wiring software components, while imperative programming is excellent for expressing business logic. The framework adapts and extends traditional HTML to better serve dynamic content through two-way data-binding that allows for the automatic synchronization of models and views. As a result, AngularJS deemphasizes DOM manipulation and improves testability.

AngularJS design goals:

  • Decouple DOM manipulation from application logic. This improves the testability of the code.
  • Regard application testing as equal in importance to application writing. Testing difficulty is dramatically affected by the way the code is structured.
  • Decouple the client side of an application from the server side. This allows development work to progress in parallel, and allows for reuse of both sides.
  • Guide developers through the entire journey of building an application: from designing the UI, through writing the business logic, to testing.

Angular follows the MVC pattern of software engineering and encourages loose coupling between presentation, data, and logic components. Using dependency injection, Angular brings traditional server-side services, such as view-dependent controllers, to client-side web applications. Consequently, much of the burden on the backend is reduced, leading to much lighter web applications.