TechU Solutions

View Original

When Angular Fails

If you’ve read any of my other posts, you’ll know that I’m a HUGE fan of Angular. I’ve written quite a few pieces about why I think Angular is great. However, I’m writing this to challenge myself and see when Angular would fail you. What do I mean when I use the word “fail”? To me, failure would mean that something about the framework itself would hinder the development of my product or get in the way more than help.

Angular, by nature, isn’t just a single tool; Angular is more like an entire toolbox full of various tools you would need for any job. It’s like if you’re working on a car, you could buy a toolbox that already has a bunch of tools in it. The other option is to buy an empty toolbox, and every time you need a tool, you buy that tool and slowly start to fill your toolbox. There are many benefits of getting this toolbox with pre-selected tools in it, but today we’re going to talk about the downsides.

All the tools

A framework like Angular gives you all the tools you need to build anything you want. Having all the tools you need is usually a great thing because you don’t need a ton of 3rd party tools; however, it can also be a curse.

If you’re building something small and simple, you don’t need all the tools available to you. It would be more efficient for small and simple applications to pick out the specific tools you need since you will likely not need many. So what is the big deal with having all the tools available to you? Well, it’s really having all of these available to you and having to know how they work and how they interact with each other. You may need to create routing files, services, modules, and components to create something simple. That can turn into overkill pretty quickly.

There is also the hassle of sorting through all the various tools in your box. I mentioned some of the things Angular has in its toolbox. You have to know what all the tools do to make the best use of them. Then you have to decide which ones to employ. Since you have all the tools at your disposal out of the box, it kind of forces you to know what they do and how to use them. Not only can this be overkill for a simple application, but it can also be a barrier to entry to new developers. Many new developers pick up things like React because it’s simple to start with.

Learning Curve

Before I get into this section, I want to say something quickly. A learning curve isn’t something a developer should be afraid of. Any developer worth their salt should be able to learn something new. If you’re not excited about learning new things (and I’m not just talking about Angular here), you may be in the wrong profession. With that being said, let’s get into this.

A learning curve is the one downside that many people point to as to why they don’t use Angular. I mentioned one learning curve previously, knowing how to use all the tools in the Angular toolbox. There is another tool that people always point to as well, RxJS. RxJS, or Reactive JS, is a way of handling asynchronous actions. RxJS uses Observables which are like an event-driven stream. Observables, while incredibly useful and very cool, can be difficult to understand at first. It takes time to adjust the way you think about writing event-driven code. If you’re used to writing code with promises, Observables can be jarring. This is definitely a bar to entry for new developers.

Opinionated

Angular is a framework, and as a framework, you have to work within its confines. Angular is opinionated, and there is a right and a wrong way to do things in the framework. This also plays into the learning curve aspect because you have to know how the framework works. This also means that you can’t just do whatever you want. Angular, as a framework, is far less flexible than libraries like Svelte or React. There are a lot of developers that feel hindered by the confines of the Angular framework.

For this reason, a lot of more experienced developers get turned off by Angular. They’re used to doing things a certain way, and when Angular doesn’t play with the patterns they’re used to, it can be difficult to work with. Angular becomes easier to work with once you know how everything works and how it all gets hooked up. However, to get there, you have to overcome the hurdles I’ve mentioned in this post.

Wrapping it Up

While I love Angular, I do understand that it isn’t perfect and has its downsides. While there are excellent reasons that Angular has these hurdles, I think its popularity is hindered by its steep learning curve and opinionated nature. These are some of the biggest issues with the framework. As a fan of Angular, it wasn't easy to write this, but I enjoyed a challenge nonetheless. If you’re a fan of Angular like me I hope this has opened your eyes a bit to Angular’s downsides and get you to think a bit more about the framework itself.

If you’ve enjoyed this article I’d love for you to join my mailing list where I send out additional tips & tricks!

If you found this article helpful, interesting, or entertaining buy me a coffee to help me continue to put out content!