5 Angular concepts an Angular Developer must know

Ewantavener
3 min readNov 9, 2020

--

Angular is an easy framework to use, however there are 5 key concepts and strategies you should know before you can call yourself an Angular developer.

1. Master Angular Concepts

Angular (commonly referred to as “Angular 2+” ) is a TypeScript-based web application framework led by the Angular Team at Google

Angular has been around a few years with a new release every 6 months.

It has a few core concepts that once understood makes it an easy and powerful framework to get to grips with. Once you understand modules, services, components, pipes and dependency injection you should find it a doddle to build a working application.

Angular applications are written with Typescript, but don’t let this put you off. Typescript’s a lot nicer than Javascript and very easy to pick-up.

2. The power of RxJS and Observables

A core concept of Angular is RxJS and Observables.

Observables are declarative — that is, you define a function for publishing values, but it is not executed until a consumer subscribes to it. The subscribed consumer then receives notifications until the function completes, or until they unsubscribe.

RxJS (Reactive Extensions for JavaScript) is a library for reactive programming using observables that makes it easier to compose asynchronous or callback-based code.

Observables and RxJS are extremely powerful, but grasping them can take a little time. However, to master observables and RxJS is extremely worthwhile and required to become an Angular developer.

3. State management with NGRX

Provides reactive state management for Angular apps inspired by Redux.

Along with Observables and RxJS it’s recommended to have a state management like NgRx. If not, you’ll soon find your code base becomes complicated and buggy.

Mastering reducers, stores, effects and selectors and using them correctly will help keep you code stable, tidy, understandable.

4. Improve performance and SEO

A single-page framework like Angular has a couple of drawbacks:

  • Performance — loading of large files
  • Search Engine Optimisation — A lot of web crawlers don’t use javascript.

It is possible to resolve these issues, but this depends on your application.

You have two choices to fix these two issues:

  • Static site / JAMstack — building static html files from you application
  • Server side rendering — building and serving the site with

In my opinion Static sites are very easy to implement, but might not be suitable for your site. If so, then go for the Angular Universal approach, but this is more complicated, costly and time consuming.

Learn more about creating a static site with Angular

5. Testing and TDD

Last but by no means least is Testing. It has become such an important part of developing over the last few years. It sounds like a complex subject, but it’s not. A good developer writes good tests.

A lot of people tend to cut corners when it comes to testing. However, I find this is a dangerous game. Testing an application gives me an assurance that my code works, there are no regressions and I therefor sleep well at night.

Writing a good test can also give you an idea of how well written your code it. You’ll see your code from another perspective, and maybe write it better next time.

Personally, I love to write a test, write the code for the test and then run the code in the application knowing it works first time.

Recommended courses

Course: “Angular — Complete Guide”

Course: “Create a JAMstack site with Angular and Scully”

--

--