From the perspective of Our Frontend Team Leader Dusan: Why Choose Angular?

Published: Apr 12. 2024
Frontend Development - Angular - by Touch4IT

One of the first questions that will cross your mind at the beginning of a project is: What framework should I choose from the plethora of available options? Here, I am going to describe my decision-making process when faced with this question.

How to decide?

In today's tech landscape, it is possible to make almost everything with anything, but there are better and worse tools for certain projects.

Most of the time, the tech stack for your project is already defined by the technologies your team is using and has the most experience in. It is not the best approach, but it can speed up the decision process if your project is filtered before this question is even asked. However, sometimes you have a wider range of available technologies and need to pick the best one for the given project. Multiple factors come into play when selecting the tech stack or frontend framework for a project.

Project type needs to be considered first and foremost, but you may not always have developers available for it. This is why the project needs to be filtered beforehand by sales and project management personnel before this decision lands on your table.

Given these circumstances, you need programmers who are proficient in the selected framework. So do not pick SvelteKit if your developers are most experienced in React or Angular. There are times when this decision needs to be made, but you need to keep in mind the delicate balance of the project's cost, which will escalate when you pick a framework that is not compatible with your team.

Frontend Development - Angular - Touch4IT

Project type is a significant parameter for selecting the technology for a project. Single Page Application (SPA) frameworks are not the best solution for e-commerce projects. It's better to pick some Multi-Page Application (MPA) frameworks like Next or Analog if you have the chance to do so. But as mentioned before, it is possible to create everything with anything, so it is possible to make this kind of project in a SPA framework. However, you need to take certain precautions when designing the project so that the disadvantages of the framework affect the final product minimally. And even if you choose an SPA framework, there are better and worse solutions. React is a better solution than Angular for this kind of project, especially considering Angular versions earlier than v17.

Also, for projects aimed at administration and back-office purposes, it is a better choice to pick Angular. Angular is better suited for business-targeted applications where peak performance is not the primary requirement, but rather maintainability and reliability.

Why Would Anyone Pick Angular in 2024?

Good question. Based on the Stack Overflow survey, React is the most popular framework on the market used by professionals, with Angular as the second most popular frontend framework (source). It is easy to see why this is the case.

React is a very flexible framework, or library, arguably (source). As it stands, React does not include any additional toolsets for more complex development tasks such as forms, validators, or routing.

While there are widely used/popular/preferred options for these tools, nothing is explicitly designed and developed by React developers directly. This can bring additional risks of higher maintenance to your product or even the danger of deprecation of dependent libraries. Of course, it's doubtful that something like react-router will be archived soon (source), but you need to keep this in mind when selecting tools for your project.

With third-party tooling comes configuration complexity. External tools may require more time to integrate into your project. Additionally, React is a relatively easy technology for beginner developers to pick up when learning this vast world of ours.

Frontend Development - Angular - Touch4IT

I would beg to differ on this decision for your first experience in frontend development. By its nature, React is not an opinionated framework, which creates more room to learn bad design and programming habits.

The learning curve in Angular can be steeper because of concepts such as dependency injection, services, or RxJS (not exclusive to Angular, but baked into it). However, learning these concepts properly leads to writing cleaner code and potentially fewer dependencies, as these three concepts can easily replace state management (source).

On the other hand, Angular is a strongly opinionated framework. Although new concepts are implemented into Angular later in its lifecycle, it provides a more stable development environment that is easier to maintain in the future.

Angular is a so-called "batteries included" framework that comes with everything needed for most applications: forms, validators, router, animations, and others. However, this is a double-edged sword. On the one hand, you have everything you need at your fingertips, but on the other hand, the bundle size can bloat to megabytes before you even notice. Therefore, you need to keep optimization of your code in mind more often than with other frameworks.

The Future of Angular in 2024: What Lies Ahead?

Angular has weathered rough times, but after the latest release (v17), there is news that warms my heart once again.

On the performance side, Angular is back in the game and has caught up to Svelte and React (source).

Signal-based reactivity has been introduced, so soon, the old ng-zone-based change detection will be just a memory of the past days. The standalone architecture is reminiscent of React's component-based architecture. Even though I lean towards a modular approach, this is a very good step toward removing unnecessary boilerplate when trying to optimize bundle size using the SCAM pattern (source).

Staying on the optimization path, a defer block has been introduced, allowing us to defer the loading of certain view parts where they are needed. 

A new control flow has been introduced, and although I was skeptical at first about the syntax, after using it, I must admit it is a much better way to write readable templates.

Furthermore, Angular has joined the ranks of meta-framework-supported technologies, thanks to AnalogJS.

Conclusion

Angular has taken a second breath with the v17 release and is now even better than ever. With Angular as my daily driver and other frameworks like React and Qwik as occasional side hustles, I would wholeheartedly recommend Angular, either for your project or as a first entry into the world of frontend development.

Just remember: there is no one-size-fits-all solution for anything, and this holds true for frontend development as well.

 

To be continued...

 

 

Dušan at Touch4IT
Dušan Frontend Team Leader
Tags
Angular
Frontend Development
Framework
React

Get in Touch with Us: 

Fill in this form, or, if you prefer, send us an email. Don’t worry, we’ll send you an NDA and your idea will be safe.