Joshua Colvin

Why choose Angular?

Published October 23, 2018

There are plenty of think pieces that compare JavaScript frameworks and tell you why all of them are inferior to the authors chosen one. This is not one of them. I have worked with all four of the most popular frameworks (Angular, Ember, React, and Vue) and they are all awesome. We often forget that these are tools created to solve problems. Different frameworks excel at solving different problems. With this in mind, here are the reasons I keep choosing Angular.

Angular CLI

One of the biggest barriers to entry for new developers getting started with a framework is getting a project setup. JavaScript tooling is amazing but it can be a hurdle if you’re just getting started. You could easily spend hours on tooling setup for a simple Hello World application. The Angular CLI helps solve this problem. Inspired by the Ember CLI, this command line interface allows you to get a project up and running with just a few commands in the terminal. The generated project follows the best practices defined in the Angular Style Guide and comes with a development server, testing, and linting already configured. Angular CLI also allows you to generate the different pieces of your application (components, services, routes), creating all the files, boilerplate code, and even test shells for you. The Angular CLI is one of the biggest advantages of using Angular because it allows developers to focus on the important thing: writing code. If you prefer a GUI to the command line, checkout Angular Console.

TypeScript

Angular went all in on TypeScript (The framework is actually build with it!). TypeScript is a superset of JavaScript that add lots of useful features, the biggest of which is Types. While you can write your angular application using regular JS, it is not recommended and most of the resources you will find are using TypeScript. One of the best things about TypeScript is that you can implement it incrementally, only using the parts you need/want. TypeScript gives you increased IntelliSense capabilities for the libraries your are using (this utilizes something call a type definition file. See: Definitely Typed). Adding types to your application can help uncover bugs you didn’t know you had and give your team the confidence that your code is going to work as expected.

Opinionated

Some people may think that being opinionated is a bad thing but it can be a huge productivity booster, especially when working on a team. There is usually an “Angular way” to do things, laid out in the Angular Style Guide. This is invaluable when working on an application. The style guide covers everything from how your project should be structured to what naming conventions you should use. Angular being an opinionated framework goes a long way to reducing decision fatigue.

Batteries included

Speaking of decision fatigue… it can be a real problem when working on a project. While it can be nice having the ability to choose all the different libraries you are going to use in your application it can slow you down significantly while trying to weigh the pros and cons of said libraries. Since Angular is a “batteries included” framework it includes all the pieces you will need to build a significant application.

Reactive Forms

Forms in Angular just work. There’s no complicated setup and no need to create event listeners to update the values on each input. You just tell Angular what fields are in your form and what validators (if any) the field should have. Yes,it also comes with validation! If you plan on building an application that uses forms heavily Angular will make this a breeze.

Community

A framework is only as good as the community that surrounds it. The ease of finding learning resources or the ability to find help when you get stuck are important considerations when picking a technology. The Angular community is about as robust of a community as you will find. There are countless conferences, articles, books, tutorials, podcasts, and courses covering every aspect of Angular. Community leaders are accessible and willing to help. This can be helpful if you need to get un-stuck.

Find this article helpful or interesting? Follow me on Twitter for related content.

Joshua Colvin is a UI Software Engineer specializing in building component libraries. He lives with his wife and two kids in Michigan.