Skip to content

Instantly share code, notes, and snippets.

@tdd
Last active December 18, 2024 15:33
Show Gist options
  • Save tdd/5ba48ba5a2a179f2d0fa to your computer and use it in GitHub Desktop.
Save tdd/5ba48ba5a2a179f2d0fa to your computer and use it in GitHub Desktop.
Angular: Just Say No

Angular: Just say no

A collection of articles by AngularJS veterans, sometimes even core committers, that explain in detail what's wrong with Angular 1.x, how Angular 2 isn't the future, and why you should avoid the entire thing at all costs unless you want to spend the next few years in hell.

Reason for this: I'm getting tired of having to explain to everyone, chief of which all the indiscriminate Google Kool-Aid™ drinkers, why I have never believed in Angular, why I think it'll publicly fail pretty soon now (a couple years), and why it's a dead end IMO. This gist serves as a quick target I can point people to in order not to have to parrot / compile the core of the articles below everytime. Their compounded reading pretty much captures 99% of my view on the topic.

This page is accessible through http://bit.ly/angular-just-say-no and http://bit.ly/angularjustsayno, btw.

@FailedChecksum
Copy link

I just did a project with ASP. NET MVC on Linux. Vanilla Javascript. Used barba js for navigation without flickering. This is great for large projects with lots of authorization in it because it's handled on the server. No Angular needed or whatever framework. I use some material design for form fields. What's wrong with MVC.? The great thing is it has server templates etc.

I was kind of waiting for the "why not SSR" argument. Did not disappoint. Going to apologize for the book on tape up front.

re: aspnetcore mvc, why not MVC?

Angular is an MV* as well, but that's beside the point. The server-side MVC architecture tends to be bloated an expensive in actual large applications; performance solutions always inevitably devolve "moar caching" when your issue turns out to be 'markup takes too long to compute' and you fail your SLA/SLC in load testing.

At the end of the day, you're using your own hardware to generate markup on the server, and that's just cost you don't have to take on, in addtion to redundant bandwidth expenses (before even talking about the absence of minification). I've seen too many companies with MVC apps, million dollar/year redis clusters that could be replaced with a small API, a JWT token and a few dozen lines of front end code, all to enable this particular golden hammer. All the commodity labour cost-compensation in the world won't solve that.

re: auth is better on the server, so say we all?

You're dealing with a token one way or the other. In a well-designed front end, you'll get the same role validation and policy that you get with aspnet (route guards, etc). The token -> claims blood-brain barrier is pretty much the same as it's always been, there's no inherent superiority there for a server scenario.

aside: if you ever find yourself saying, "BUT JWT HAS VISIBLE CLAIMS, IT'S NOT SECURE!!!," I might suggest that you're probably putting the wrong data into claims to begin with. Bonus: the token body can be an encrypted string, which gets some people back to their comfort zone but does not invalidate the first statement.

re: vanillajs blended with SSR (aka, the 2005 pattern)

Hot, fresh(,) sports opinion: Ime, this approach seems to always rapidly turn into spaghetti code, completely leave modern optimizations (chunking, lazy loading, budgets, etc) on the cutting room floor, or both. Some would say this is just sensible YAGNI; some are also probably skeptical about the efficacy of seatbelts, profilactics and other such hipster tech.

I've never seen this pattern implemented in a way that thoughtfully coordinated DOM updates to avoid layout thrashing and unncessary work on the browser. Rather, it almost always results in large interactive data features blowing right past the 100ms update window and being a generally terrible user experience. This pattern usually dovetails with the "render and scrape" anti-pattern where a well-known or contextualized queryable grabs some json data that was rendered to the markup and the js code then binds to it.

Agree to disagree though. At least we both think dotnet core is awesome :)

disclaimer: our org angular on the front end, scale-to-zero aspnetcore api on the backend, on linux, and have been for years, as well as some micronaut graphql lately. We're what I consider to be a "large" application, with 100+ top-level routed features. We even handle SEO fine without SSR.

@metaperl
Copy link

Correct the "Introducing Aurelia" link to https://groups.google.com/g/durandaljs/c/_1MTnSZiuGU

and small worthwhile addition to the links is the Angular Sucks website.

@br-matt
Copy link

br-matt commented Sep 9, 2021

JSX is the reasons react is so loved / got to where it is. Funny not mentioned once in here :D It makes life so easy to solve most problems in a concise way

@hhvdblom
Copy link

hhvdblom commented Sep 9, 2021

The discussion is interesting to follow what people think about Angular. I am just over it. Happy with VS Code now. I start two projects at once. First I start the Backend: Node/Express/MongoDB, then the frontend in VS Code, it opens the browser. Both client and server code are debuggable, same as in Visual Studio. I developed enterprise projects with MVC and was looking for a Linux replacement. And guess what I did found it. I use SSH on a windows machine with native VS Code on it. With SSH it connects to the Linux box. It starts on the Linux box but I work/debug remote on the Windows box. Its really a great solution, no VM shit! As I said before I dont use libraries. I use class modules and they work great. No pasta code :-)

@StackUndertow
Copy link

The discussion is interesting to follow what people think about Angular. I am just over it. Happy with VS Code now. I start two projects at once. First I start the Backend: Node/Express/MongoDB, then the frontend in VS Code, it opens the browser. Both client and server code are debuggable, same as in Visual Studio. I developed enterprise projects with MVC and was looking for a Linux replacement. And guess what I did found it. I use SSH on a windows machine with native VS Code on it. With SSH it connects to the Linux box. It starts on the Linux box but I work/debug remote on the Windows box. Its really a great solution, no VM shit! As I said before I dont use libraries. I use class modules and they work great. No pasta code :-)

That just sounds like Linux containers with extra steps.

What does VSCode and the standard remote workflow most modern IDEs support have to do with angular? Seems fairly non-sequitur.

@hhvdblom
Copy link

A lot of People use VS Code with Angular. I did too but changed. I had Angular for a project on the Client side and .Net Core on the Backend. Changed to Linux with native Javascript and NodeJS on the Backend. And no its not a Linux container, its a real Linux machine with remote SSH comunication from a Windows 10 laptop to it. Its native! Both sides have VS Coce running on it. Wanted to share this as alternative to Angular and .Net .Core. Because there is no Typescript and other transpiling the debugging works also better.

@VladimirtheGreatest
Copy link

I can confirm that angular is trash for me. Documentation is terrible, no good examples. If you want to simply change some values in your forms it takes so much effort, even if you search on stackoverflow most of the best answers are marked as "this is a bad practice for angular". I dont really understand what is the point of all that rubbish but for simple project that requires some crap CRUD operations + dom manipulations jQuery serves the purpose.

@matthewekeller
Copy link

matthewekeller commented Sep 13, 2021 via email

@hhvdblom
Copy link

Mat I will look into it may be its something but for now I believe changing the a tags and form tags in Ajax calls does the trick for me. I use the history to push/pop parts of the screen.

@Shireilia
Copy link

I'm so sorry, i missed the 9th of July mark this year.

Is Angular dead yet ?

@matthewekeller
Copy link

matthewekeller commented Sep 14, 2021 via email

@acosonic
Copy link

Angular is just conceptually wrong! You are compiling stuff for interpreter!

It's like using diesel to power electric car...

@hhvdblom
Copy link

hhvdblom commented Dec 30, 2021

Yes, Javascript is starting to get better and better. So all those frontend shit will get replaced by native Javascript modules so you can roll your own. Thats much better as Angular because you will have to accept the whole package. I dont understand why Microsoft developed Typescript because some Smart guys overthere did a lot with "dynamic" in C# and thats what Javascript is all about, checking at runtime and not at compile time. Microsoft is losing it. NodeJS will be the right replacement for ASP .NET if it can keep up with Javascript standards ES/6/7/8. May be Microsoft used it because they want to develop the whole web Mail program in it but thats not what "normal" developers use it for, its just wrong. Why is Typescript also wrong and those Microsot guys knows that, its the data you transmit across the line. Many times that data is very "dynamic" by nature. Just send and object with data and receive that object with data. No class description is needed and is just a lot of overhead. The more different data objects you will have the more Javascript will shine.

@obeobe
Copy link

obeobe commented Dec 30, 2021

[1] I dont understand why Microsoft developed Typescript [2] because some Smart guys overthere did a lot with "dynamic" in C# and [3] thats what Javascript is all about, checking at runtime and not at compile time. [4] Microsoft is losing it. [5] NodeJS will be the right replacement for .NET if it can keep up with Javascript standards ES/6/7/8.

So:

  1. [3] is the answer to [1].
  2. [5] is wrong for various reasons, including [3].
  3. [4] is probably correct, but has nothing to do with Javascript, Typescript, or C#.
  4. [2] doesn't seem very related to either [1] or [3]... I suppose it could be a justification for [4], but that doesn't really make sense in light of claim [5]...

@hhvdblom
Copy link

hhvdblom commented Dec 30, 2021

@VladimirtheGreatest jQuery was great but its not needed anymore. Javascript can do now what jQuery can do. Not all plugins are available as Javascript modules. Thats the price you have to pay. But the reward without jQuery will make up for it. As I have said before ES6/6/7/8/etc is the way to go.

@hhvdblom
Copy link

hhvdblom commented Dec 30, 2021

@obeobe I do NodeJS and ASP MVC .NET at high level. Did also study Microsoft CMS Orchard. Those guys did a lot to make the ASP MVC .NET backend work "dynamic" with the Javascript frontend. With NodeJS Orchard CMS would be developed much easier because its dynamic by nature. But is just my thoughts about it. Did adjust my post, NodeJS will replace ASP .NET, not the Desktop .NET. I still see use for that. Its easier for a dynamic frontend to communicate with a dynamic backend. The Typescript idea is the other way around. And I do disagree with that and Microsoft did prove did themself with Orchard CMS.

@obeobe
Copy link

obeobe commented Dec 30, 2021

@hhvdblom But C# is not just ASP MVC .NET or Orchard...

Anyway, I use both C# and NodeJS. I think both are impressive technologies / ecosystems.
I also dislike Angular, though I don't think its conceptually wrong.
But Typescript... I find Typescript indispensable when working on large systems and targeting JS...

@hhvdblom
Copy link

@obeobe Yes you have to do it like that. You must make an static object in Typescript. Send that to the server. On the server create a static object for receiving. Do that with say 300 objects and that will make your life easier? With Javascript send a dynamic object to the server and receive a dynamic object in NodeJS. The Node JS solution just makes more sense. And thats why I use it now. Combine it with MongoDB and yes we have a winner. By the way I was a big Microsoft fan, but times change, make way for the new King NodeJS.

@obeobe
Copy link

obeobe commented Dec 30, 2021

@hhvdblom I guess that you are describing some Orchard-specific workflow. I can't address that because I have never even heard of Orchard until 39 minutes ago :) but it doesn't sound at all like how I work with Typescript...

@hhvdblom
Copy link

@obeobe The guys that developed Orchard CMS had to find a way to handle Javascript objects that come in on the Server. Javascript object are dynamic by nature, even the Typescript ones after transpiling. They put in Orchard CMS a self developed dynamic C# component that can handle them. Problem was just to be simple: dynamic vs static. With NodeJS you do not have this problem. NodesJS is not perfect it needs to go along with ES standards but both sides are dynamic.

@ElmouradiAmine
Copy link

6 years later, Angular still not dead

@Shireilia
Copy link

I'll go with a classic :

Is Angular dead yet ?

@EmmyMay
Copy link

EmmyMay commented Mar 31, 2022

Angular would have been dead if it wasn't for Google's infinite resources. The number of people using it are dropping like flies though.

@hhvdblom
Copy link

Angular will be replaced. Thats for sure. Technologies like html-over-the-wire seems promissing. Htmx and Hyperscript are brand new. Let see what that brings. They are developed by guys that know Angular etc and are not happy with it.

@Shireilia
Copy link

Angular would have been dead if it wasn't for Google's infinite resources. The number of people using it are dropping like flies though.

Source ?

@Shireilia
Copy link

Woopsies, missed the 9th of July again.

IS IT DEAD YET ?

@ng-druid
Copy link

Angular is alive and well thriving with powerful new features in the recent v15 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment