Why do I need Angular.js and why choose it

You will try to do everything with simple JavaScript and a couple of dozen jQuery plug-ins, and very quickly the written code will become impossible to support, impossible to read and impossible to edit.

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

There is a high probability that you will not have to use JS frameworks in the coming months and / or years. The area of ​​their application is quite specific: the so-called Single Page Applications (Single Page Applications, SPA). Typical examples: Google Drive, Gmail, Evernote. But even in cases where the task is to write a one-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.

Nevertheless, the popularity of such tools is high as never before, and, at a minimum, it is worth knowing about their existence. It’s impossible to tell about all the available options at once, so in this series of articles we will look at the Angular.js framework. If you are interested in alternative solutions, then you can look at them on the site http://todomvcc.com/ – the authors of this project implement the same application on different frameworks to make it easier for developers to choose the most suitable for them.

Why Angular.js?

From my point of view, Angular.js has become a terrific combination of a low threshold of entry and a rich set of functions. To start writing small applications on it, it will take about an hour of free time. 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 task that I could not solve with the help of this framework. And I used it for a cross-platform mobile application with rich functionality, for small widgets inside applications, and even for a video editor.

Angular.js is currently the most popular framework, the development of which is supported by guys from Google. In addition to the rich standard library, many custom extensions have been written for Angulyar, some of which we will get to know within this series of articles. There is even a special framework on top of Angular.js, which makes it much easier to write cross-platform mobile applications: http://ionicframework.com.

What about Angular.js 2.0?

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

This means that at least 2 more years of Angular.js 1.x will still dominate, thousands of applications are still written on it, and a lot of vacancies (especially in Europe) indicate exactly this framework in the requirements. Of course, at some point you will have to spend a couple of hours trying to figure out the new version 2.0 and, most likely, a couple of days to switch from 1.x to 2.0. However, the knowledge of Angular.js will not be thrown into the garbage, because, as you already know, this is not a question of a specific technology, but the ability to understand any of them and apply it to your task 😉

Announcement of version 2.0 can be read here: http://angularjs.blogspot.se/2014/10/ng-europe-angular-13-and-beyond.html. Another good article with more technical details: http://ng-learn.org/2014/03/AngularJS-2-Status-Preview/

So what are we going to do?

In this series of articles we will write a small finance manager: let’s start with setting up the working environment and project structure and finish with the API. Along the way, we will get acquainted with the basic concepts of Angular.js, routing, some third-party libraries and several important tools of modern front-end development. At the end of the series, you should be able to write simple applications on Angular.js and know where to look in order to learn how to develop more complex things.