Why Angular.js is needed and why exactly it is

Why Angular.js is needed and why exactly it is

At some point, you decide to write a web application in which absolutely everything works on AJAX requests, the page never reloads, and the interface resembles a full-fledged desktop application, not a traditional website. You try to do everything with simple JavaScript and a couple of dozen jQuery plugins, and very quickly the code you write becomes impossible to maintain, impossible to read, and impossible to edit.

To avoid such a catastrophic situation, you need a tool that provides a rigid code structure and conventions for writing applications, as well as ready-made solutions for known problems (for example, for two-way communication of a variable in code and text on a page that outputs the value of this variable). This tool is JavaScript MVC (or MVC analogs) frameworks.

Chances are you won’t have to use JS frameworks for the coming months and / or years. Their area of ‚Äč‚Äčapplication is quite specific: the so-called Single Page Applications (SPA). Typical examples: Google Drive, Gmail, Evernote. But even in those cases when the task is to write a single page application, it does not always make sense to use a full-fledged JavaScript framework: it all depends on how dynamic and complex the UI you are trying to build.

Evernote for the web is a typical SPA application
Evernote for the web is a typical SPA application

Why Angular.js?

From my point of view, Angular.js has become a terrific combination of low barriers to entry and rich feature set. It will take about an hour of free time to start writing small applications in it. At the same time, it will take months to learn and use all its features. So far, there has not been a single front-end problem that I could not solve using this framework. And I used it for a cross-platform mobile application with rich functionality, for small widgets within applications, and even for a video editor.

Angular.js is by far the most popular framework supported by the guys at Google. In addition to the rich standard library, many custom extensions have been written for Angular, some of which we will get acquainted with within this series of articles. There is even a dedicated framework on top of Angular.js that makes it much easier to write cross-platform mobile apps.

What about Angular.js 2.0?

The current version of Angular.js that this article series will be based on is 1.3. The developers stated that version 2.0, which will be released unknown when (but not earlier than in a year and a half), will be incompatible with the current version of the framework, but at the same time it will retain most of the concepts embedded in it. The developers also promise to support the 1.x version for several years after the 2.0 release.

This means that for at least another 2 years, Angular.js 1.x will continue to dominate, thousands of applications are still written on it, and many vacancies (especially in Europe) indicate this particular framework in the requirements. Of course, at some point you will have to spend a couple of hours getting to grips with the new version 2.0 and, most likely, a couple of days to switch from 1.x to 2.0. Nevertheless, knowledge of Angular.js will not be thrown into the trash, because, as you already know, this is not a question of a specific technology, but the ability to understand any of them and apply for your task.

What about Angular.js 2.0

Leave a Reply

Your email address will not be published. Required fields are marked *