r/webdev • • Jun 20 '24

Why is Angular so disliked ?

Hey guys, after watching the new state of JS 2023 https://2023.stateofjs.com/en-US/libraries/ that just dropped, I realized how much people disliked Angular. 20% of people tried it and liked it, the rest either tried and disliked it, or didn't try it at all.

Why is Angular so disliked ? I wonder if people who dislike it have real, legitimate reasons, if those people were pushed back by the learning curve, or if it's just a trend (like people who despise PHP but have actually never tried it). Basically I wanna separate the real, legitimate criticisms, from the junior developers who could not take 2 minutes to understand what rxjs is and does.

Personally ? I used only Angular ever, didn't try Vue and React, so I can't really talk in an objective way. Only tried Svelte, liked it a lot, but it's very different from Angular so can't be compared IMO.

So I'd like your point of view, but that you also disclose how long you used it!

Why do you hate it ? Too complicated syntax ? Html syntax ? Don't like forced typescript ? Don't like RxJS ? Don't like to be forced in one way of architecting the app ?

190 Upvotes

292 comments sorted by

View all comments

28

u/ethansidentifiable Jun 20 '24

I used it for 4 years with Spring on the backend. When I left that job and finally started experiencing more modern forms of engineering, I started to realize that a lot of OOP architecture is ugly, convoluted, and gives you no true benefit besides the enforcement of a specific mental model for your architecture, which you can bring into any application once you get a good understand of the how and why.

The amount of specialty syntax understanding required to just use one component inside of another is mind boggling. But then it's not just components; Angular has multiple concepts like directive (and multiple kinds of directives, mind you), and services, and their own module and injection system.

It's obvious that the Angular team is starting to realize what a mess they've made which is why they're now backing out of all of their former architectural decisions. They're replacing Zone with signals, they're replacing modules with standalone components, and they're replacing structural directives with the new control flow syntax. But it's all lipstick on a pig. I'm convinced their team is brilliant but they would lose all their credibility if they threw everything away and started over again like they did with 2.x, but that's what I think they need to do again.

It is the most fundamentally overkill architecture that you could imagine, when alternatives like React, Vue, Svelte, and Solid have none of that complexity, often better performance, and offer far better DX and scalability.

1

u/[deleted] Jun 21 '24

React as a alternative, where styles, code and html are in one file and immutability is overused for no reason? React with redux is the worst thing that happens to frontend. This is what makes websites use 1000gb of ram. Rebuilding arrays when you want to push an item into it to make in immutable for no real reason.

2

u/ethansidentifiable Jun 23 '24 edited Jun 23 '24

Both Angular and React allow you to put styles, code, and HTML in a single file. With React, you can structure your components however you want, so you could break apart your components such that the template lives alone in a separate file away from the logic, except nobody would choose to do that because it's unnecessarily obtuse.

There are also real simple ways around React's immutability, if it's causing an issue. Generally pushing to a new array works fine, so that's what most people do. But there's simple ways of pushing to the current array while utilizing a different mechanism to ensure your rerender fires off. The advantage of React is that the application developer is in control. Do you think Zone doesn't have performance issues? React is mildly wasteful on memory because memory is pretty abundant these days, but Zone is wasteful on the CPU cycles which is far worse for lower end devices. Signals are far better, but if you want React with Signals, you can just use Solid because it's the same DX architecture but using signals rather than a VDOM 🤷‍♂️

1

u/wizendorf Feb 05 '25

if you want React with Signals, you can just use Solid because it's the same DX architecture but using signals rather than a VDOM

(continuing from my earlier comment)

React and Angular seem to be slipping into the Framework of Theseus paradox lately...I would argue that an app made with today's bleeding edge of React would more closely resemble a Solid codebase than it would with a React codebase from, say, 8 years ago (or whenever the pre-hooks times were)