Angular - Exploring the Front-End: Modern Frameworks - Part IIPublished on 21 Dec 1991
Angular is, in a way, the oldest of the three frameworks. AngularJS (or Angular 1.x) was released back in 2010, and was a pretty big deal. It brought new concepts and was for some time considered “the king of modern JS frameworks”. Then React came and brought new concepts, a component-based approach and took the throne for itself.
Google, the main maintainer behind AngularJS, then made a very controversial decision - to rebuild the framework from the ground up, and change the way it works completely. Thus, Angular (or Angular 2+) was born. The naming doesn’t help at all differentiating them: AngularJS is one thing, and Angular (without the “JS”) is another. The first one is the one we’re gonna talk about here!
This is the second post of a series that aims to dive in the three most popular front-end frameworks, exploring their concepts and building the same sample application with each one, trying to find out their pros and cons. You can read the introductory post here.
Before the code, let’s see some of the concepts behind Angular. I’m doing my best to sum them up in a way that’s not tiring to read, but still easy to understand. You can always delve deeper into them by reading the official Angular docs.
- The framework itself is very modular, which means a lot of functionality is split between multiple packages and needs to be imported separately. This can be a bit of a nuisance while developing, but is actually good to reduce bundle size and improve loading performance in the end product;
- There’s a heavy use of dependency injection;
Basically, Angular consists of three types of classes (there are more, but these three are the main pillars). They are: