Angular — The good and the bad
© Shutterstock / Anatoli Styf
Stack Overflow recently analyzed the most dramatic technology increases and decreases and, naturally, we weren’t surprised to see that the Angular tag rules over the ‘most dramatic increase’ top. However, this doesn’t mean Angular is spotless — it has both benefits and disadvantages. Let’s dissect them.
Angular: The good
TypeScript also brings everything good that comes with newer versions of ECMAScript, including class syntax, arrow functions, async/await, etc. The addition of established OOP practices like interfaces, generics and method access modifiers smooths the transition of newcomers into the web ecosystem from languages like Java and C#.
SEE ALSO: What’s new in Angular 5?
Angular is a framework rather than a library and as such offers a “complete solution” – both on the way “How Things Should Be Done™” and what you get out of the box in terms of coherent features. In comparison to libraries such as React and Vue, most of the major pieces are there – routing, HTTP client, animations, forms handling and validation, etc.
You can directly focus on the problem at hand rather than spend time analyzing and picking up libraries which cover these scenarios.
The build tools are adequate. It seems like Angular-CLI has established itself as the preferred way to start a new project in Angular these days. It gets the job done from development up to building and deployment.
Angular is easy to scale thanks to its design and opinionated way of doing things. Designing your application around self-contained, testable, pluggable modules, lazy loading, a unified data flow and Redux-like state management will take you a long way before you encounter any scalability issues and spaghetti code. Following that architecture also enables bigger teams to easily work on different parts of the codebase without fear of breaking working code or stepping on each other’s toes.
SEE ALSO: 6 reasons why you need to try Angular
Angular: The bad
Simplicity and code bloat
Angular is not simple at all. There are a lot of moving parts, lots of concepts and conventions to grasp and the time investment is significant in order to produce something more than a To-Do application. The API is huge and potential breaking changes in future versions of Angular are a real possibility.
This brings us to the other issue – code size. Angular is several times bigger than React and Vue, causing longer load times and performance issues mostly on mobile devices. The produced code is heavy and bloated. Even when utilizing Angular’s Ahead-of-Time compiler the resulting files are still larger than acceptable. Fortunately, the dev team acknowledges the problem and is actively trying to improve on it.
While the documentation for Angular has improved over the past few months, I still find it lacking. A sizeable chunk of the exposed API is nothing but short stubs of methods and properties without useful description. I would also appreciate a changelog or another tool to easily compare what is new and what has changed between releases of Angular.