DEV Community

Discussion on: Angular is almost always better than React

 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Yes it is like that in most cases, agree with that

My question though goes through a different path: Does fewer choices compensate the lack of being able to choose the right tool for each job?

I've worked on a couple of projects with Angular and it was fine but speaking of frameworks I do like Next more from the dev point of view (flexibility, fine-grain the results regarding the needs...).

In most companies we standarize some sort of libs to use and when something is more convenient to a project we simply add them as option, so you'll end up with few options (or just one) whenever you want to fill a need. On the other hand, JS core API is quite good for quickly overcoming needs without the need of libs.

This requires iterative checking and it's some burden but it's mostly decoupled of the devs day to day job (devs can suggest whatever they like, then everything is checked, including the license of course and added or not whether it's convenient).

By the way the "current" situation is a lack of available human resources aligned with a high demand and React is known by much more people (and is way easier to learn), which makes it a good choice.

On the other hand Google did deprecate AngularJS once ... vad vibes 😆 it was a good decision for several reasons back those days of Angular2 but the big G has a big graveyard of projects and I wouldn’t risk my neck for they not doing it again.

TLDR; tech decisions are not made only from the tech point of view.

Thread Thread
 
polterguy profile image
Thomas Hansen • Edited

Does fewer choices compensate the lack of being able to choose the right tool for each job?

Wrong question, it's like asking if your car is married. The correct question is; "Does fewer choices leads to higher quality, better performance, and less resource requirements?" - At the end of the day, the only thing the companies I am referring to in the article care about is quality, time2market, and resource requirements.

tech decisions are not made only from the tech point of view

Correct, and once realising that, what the individual developers "feels is better", and or "wants to use" becomes irrelevant. Standardisations will force itself unto us, one way or another, and as it does, less power to the individual developer, and more power to the business decisions makers are a natural consequence. The only reason why business even cares about what devs "wants" is because they're terrified of devs quitting. That is a "local evolutionary optimum" destined to end, sooner and not later - Like it or not ...

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Hmm nice PoV, I've not enough data to answer this, would need to check whether Angular projects have more quality than React ones through different metrics.

On performance and resource requirements I'm confident saying NO, Angular produces heavier applications due to the many features of this framework, that can burden projects, translating into a heavier application with slower performance. I've tested it a couple of times; I prefer the minimal approach I explained before just for that reason.

I definitely need to check the quality thingy, I'll come back if I get an answer on that.

Thread Thread
 
polterguy profile image
Thomas Hansen

On performance and resource requirements I'm confident saying NO, Angular produces heavier applications due to the many features of this framework, that can burden projects, translating into a heavier application with slower performance

If the app spend 0.4 seconds or 0.8 seconds to initially load is irrelevant. When I speak about resource requirements, I am talking about manpower required to maintain the project, not CPU and RAM. The latter is (for the most parts) no longer of much interest due to Moore's law ...

I definitely need to check the quality thingy, I'll come back if I get an answer on that

Quality is erronously perceived here I presume. "Quality" from a business perspective is rarely the same as quality from a software developer's perspective.

Quality from a business perspective might for instance imply;

  1. How many hours will it take to train my staff for the new app?
  2. How is the recognisability factor of the app, and what effect does it have on context switches as my back office workers are switching between apps?

Etc ...

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇
I am talking about manpower required to maintain the project, not CPU and RAM

My bad but still the answer is no, in my experience, the amount of devs you need depends on what the client wants, at what speed and with the budget.
Of course the answer is usually "Everything", "Now" and "as low as possible" respectivelly but I mean after a refinement and viewing it from a realistic point of view 😂

But if you want X and it requires 3 people in average it will be the same in Angular, React or whatever. The amount of people is mainly due to parallelization of tasks, on the other hand if we talk about delivery speed, developing in React is faster than using Angular (according to my experience as dev and as TL).

Quality from a business perspective might for instance imply; 1. How many hours will it take to train my staff for the new app? 2. How is the recognisability factor of the app, and what effect does it have on context switches as my back office workers are switching between apps?

Those seem design factors to me and not related with the tech stack used.
If you design a bad application it will be crap either be Angular, React, Vanilla JS, Java, PHP, C or whatever 😅

I was thinking more on "how many bugs appear into production", "time to solve them" and so on.

Thread Thread
 
polterguy profile image
Thomas Hansen

developing in React is faster than using Angular (according to my experience as dev and as TL)

I suspect that's a highly subjective observation. I would say the exact opposite. However, the point is that Angular projects have less differences, implying moving people around from one project to another, and/or hiring new devs is by the very definition of the term easier ...

Those seem design factors to me and not related with the tech stack used

Not correct. All Angular apps (assuming they're using Material) ends up more or less the same. For enterprise back office administration apps that is a good thing ...

If you design a bad application ...

True ... :)

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇 • Edited
Angular projects have less differences, implying moving people around from one project to another, and/or hiring new devs is by the very definition of the term easier

That's undoubtedly true.
The only showstopper is the popularity of the framework. From my closest friends 5 are able to work in React but only 1 coded with Angular, counting me that's (+1 on each) 6 vs 2 and more or less the same can be observed in new hires. For each 10 frontend devs, ~2 have used angular.

To some extent it also has been recently (since the beginning of the pandemic) influenced on juniors due to the rise of several tens of codecamps teaching MERN stack around the world (see the increase in npmtrends).

Not correct. All Angular apps (assuming they're using Material) ends up more or less the same...

My bad, I meant the product design.

If you decide to have a button here or there, to have a 4 step process to reach some functionality instead on optimizing it to 2 (if possible), how many features it will have, how they interact between each other, which are the user journeys... and this kind of things.

On the other hand if you use Material and don't put a hard work on editing/overriding Material components it will look pretty much "stock" (Using a pre-built theme). Changing the colors for the corporate ones in the config neither make it an application designed for the purpose so you end up using Sass API to style as much as you can and then Overriding styles (bad yada yada) because it wasn't enough.

Contrary to that if your app is meant to be used in-house (corporate) which is the target of every single Angular App I worked in, using Material is a straightforward way to deliver considerably faster and lowering the maintenance (if you are able to say "that's not possible" when the designers want something that's out of Material's capabilities).

Earlier I forgot to mention that

If the app spend 0.4 seconds or 0.8 seconds to initially load is irrelevant.

This is not applicable to public web apps. It has been well proved that lowering load and response times increases conversion rates. After checking, @angular/core alone weights 76.2 kB kb (minified and GZIPed) which is ~2 times React's entire weight (~40k).

Worth mention, If you need SEO I'd rather use Next JS (79.46 kB) for the SSR and SSG thingy and/or if I need to code a monolith so I've Node and React in the same place, lightweight and smooth (a good option for PWAs as well).

Thread Thread
 
polterguy profile image
Thomas Hansen

For each 10 frontend devs, ~2 have used angular

Is this true? I know React is more popular, but I suspect the above is slightly inflated ...

This is not applicable to public web apps

Of course not, my bad, I should have specified back office apps ...

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇

Well It was said by a colleague that usually handles tech interviews, I don't know if he was exaggerating or not and
if yes, to what extent 😂

Thread Thread
 
polterguy profile image
Thomas Hansen

The last figures I saw was that React was 1.5 times as popular as Angular. These numbers are a bit old, and I know React has a lot of momentum though, so things might have changed since then ...

Thank you :)

Thread Thread
 
joelbonetr profile image
JoelBonetR 🥇 • Edited

Speaking more seriously with the same guy that's what I can extract:

  • Depending on the niche you'll find more Angular than React devs.
  • Sometimes there's a company with projects already made with Angular so they want the same stack on following projects.
  • It's happening a new wave of React projects (the pandemic increase is being reflected into the market thus the amount of React projects and clients that prefer React are increasing as well).
  • This increase in React projects in big companies also retro-aliments the community (which makes sense).
  • Some of projects that require a framework are now being made with Next, which is chasing Angular.
  • Depending on the country you'll find more people that is used to Angular than React or vice-versa (so that's a point to check if you need new devs with Angular for any new project in Aista 😁).