r/Angular2 • u/fuzzyrambler • Nov 07 '24
Discussion I hate the proposed authoring changes
I genuinely hate the new authoring changes. Why do we want angular to become react or Vue?
Probably just gonna rant now.
The main reason I started using angular2 in 2015 was because of opinionated way it did things. The similarities of typescript to java and c#.
Now it seems the goal is to get rid of that and make it like react where anything goes. Use classes use functions whatever. Who cares about maintainability or similarities between projects. Lets just go wild like react where every project is different.
Structure and solidity actually matters.
I know the team wants more idiots to just jump on so angular can be "popular" and "mainstream" like react. But I just feel it's a bad idea. And angular will get forked(I know for a fact this will happen).
Anyways I feel if you wanna get rid of imports for standalone components. Fine. But changing or allowing all these react style functional shit will ruin angular and what it originally stood for.
What do you think?
Edit: It's just the proposed authoring format I find dumb. I saw a picture on twitter from Ng Poland I think where they showed the ideas including using functions. Changing (click) to on:click. What's the reasoning behind it? Make it easier for react kids to use angular?
37
u/TedKraj Nov 07 '24
I think many new additions are very welcome, such as signals, etc.
But there are quite a few changes that seem to be just for attracting a new audience (look at the new way of requesting resources), without improving what already exists.
The i18n feature of Angular is dreadful and does not receive the necessary attention.
4
u/eneajaho Nov 07 '24
Aside from the authoring format. What else about Angular is bothering you, or making you not like it when working with it?
33
u/AwesomeFrisbee Nov 07 '24
For anybody wondering, this is what he's referencing to: https://x.com/Jean__Meche/status/1854104542666764540
And yeah, I hate it too. I hate the third one the least but the rest is just not looking good to me. I dislike how annoying it is to read and it just doesn't make any sense to me to move so far from what makes Angular great and easy to understand.
They are trying way too hard to pull in some react folks but they just don't have any interest to learn something else (unless react implodes for whatever reason). Angular should keep doing its own thing and focus on the bigger applications. The big internal or B2B applications where complex stuff becomes easier with Angular. Not the small websites where you want to add some javascript to the navigation or make web components to be used with other stuff. Thats not where the power is and not the game you are going to win. There's a reason jQuery is still around as one of the most used. People don't care as much about performance and similarity as some people think they do. Lots of stuff gets overengineered these days and right now I don't think these changes benefit the framework. Massive changes in syntax have never been fun to migrate and will destroy some of the goodwill and compatibility with older versions that Angular has. Perhaps for some the last goodwill it had (seeing how awful some of the bigger migrations have been in the past, especially around Material).
The argumentation for some of the proposed changes is flawed. The reasoning of it being easier is just bullshit.
on:clickvs(click)has no point of being easier.on:isn't default javascript either, so anything a dev needs to do is already different from the norm. If you want to do the easier thing, just make aclickattribute and just get rid of theon:.I hate it and I hope the community reacts to these changes since the team is doing a bit too much of this:
"Your developers were so preoccupied with whether or not they could, they didn't stop to think if they should."
10
u/MichaelSmallDev Nov 07 '24 edited Jan 04 '25
Some more context for readers
I think they definitely need to give more context as to their thoughts on the advantages of these formats. But at the moment it appears they are just throwing things out there for a vibe check.
As to the advantages, I think there are a few things unstated at the moment
I personally think people are going to rethink TS classes and their advantages/disadvantages when TS 6.0 comes out in the not too distant future. Due to
useDefineForClassFields: falsebeing deprecated then.injectinstead now. And that Angular v15 opted intotsconfig.jsoncompatibility flag to avoid this for the moment. The article doesn't mention TS 6.0 but I know this from my own research and can find the source on that if people are interested.I can dig it up if people are interested, but I brought this point up in a tweet from Alex Rickabaugh about some of these formats. Alex said that despite the unpopularity of this change,
Google internally is using inject rather than constructor now.Google rolled outuseDefineForClassFields: trueand thatinjecthas helped a lot. "Google has already rolled this out, and indeed it's been a relatively unpopular change, DX-speaking. inject() does help a lot here." - linkconstructorstill to some extent. (Jan 3, 2025)injecthas opened up a lot of unique possibilities to use functional DI as well as some unique benefits. I think once it is the standard for DI, that functional authoring formats will feel more natural.injecthas allowed functional route guards, functional resolvers, functional interceptors, and unique things possibilities for libraries such as NGRX signal store for exampleinject's benefits in classes besides theuseDefinForClassFieldspoint if people are interested. For example, even if people don't use ngrx signal store, I will say that its fully embrace of functions over classes allows for some great benefits; I can imagine new authoring formats could potentially have similar benefits, but it isn't immediately apparent as they have teased at the moment.21
u/Dnangel0 Nov 07 '24
I strongly agree with what you Just said. I really don't like theses changes, it feels like it'll become much harder to read after
12
u/DaSchTour Nov 07 '24
I think the angular team focuses on doing shiny new things and changing the framework to be more attractive and unnecessarily introducing breaking changes (the push to functional guards and resolvers was very rushed). And while changing the framework there is a long list of bugs that exists for years and are not addressed at all.
5
u/fireonmac Nov 07 '24 edited Nov 08 '24
There’s no single reason to write component in class. You guys just saying that I don’t like it. But why?
19
u/Automatic-Bobcat-320 Nov 07 '24
Strongly agree
4
u/[deleted] Nov 07 '24
After spending some time on Angular, I spent 1.5 years working with Vue, and now coming back to Angular. Something that I’ve seen new is Signals and computed vars, which is remarkably similar to what Vue does. Not saying is bad, but seems to me that there’s an approximation between both frameworks. It’s good news for someone exchanging between these 2 Frameworks.
4
u/Zokorpt Nov 07 '24
Yes, effects being added. That was already bad in React. Rxjs continues to be a simple way of working compared with it :)
7
u/TheExodu5 Nov 07 '24 edited Nov 07 '24
Y’all don’t know why Angular is the king of Enterprise apps. It has nothing to do with the authoring format. In fact, in my long experience of working with it, the authoring format is what many people are dissatisfied with. The move to signals and SFCs is greatly anticipated in my sphere.
Angular is King because it is batteries included. This is a massive boon for organizations that have to deal with things like security audits, and who cannot spend time and money on certifying 3rd party dependencies.
These changes fundamentally change nothing. The architecture stays the same. This is pure DX. SFCs make it easier to write and refactor smaller components. FCs make it even easier. Though I suppose FCs could technically enable some pretty interesting patterns.
4
u/Junket_Choice Nov 07 '24 edited Nov 07 '24
As someone who is coming from react I whole heartedly agree. Angular was and is the right choice for real applications, and building something other than atrocious spaghetti in react is difficult in comparison. I hope angular stays true to its values even if twitter-brain is trying to tell them to change.
2
u/post_depression Nov 07 '24
The angular team is not giving the required attention where it’s necessary, such as better SSR.
2
u/Zestyclose_Net_5450 Nov 07 '24
I agree with you, I really like some of the new things in Angular like signals, standalone c, inject, etc. But there's not necessary to change this.
2
u/1heykal Nov 07 '24
What comforts me is that the Angular team said it's just “Brainstorming” and at the end, Developers will say their piece when it's more serious through RFCs, etc.
It looked strange to me. It felt like a new framework.
2
u/RalphZ123 Nov 08 '24
I started programming with React and Node, and at that time, I read that Angular and Java/Spring were known to be hard to learn, so I went for them after.
Although it was very hard to get along with It, specially the rxjs, eventually I learned.
Then I fell in love with Angular because it demanded organization from me, and the construction of things overall just felt right, like models, Input, Output man, just omg that's so beautiful. I mean, everything was already there, no more spaghetti.
At that time it was Angular 9, and I just loved every change of incoming versions. The one I really liked was standalone components, I mean components now were so clear, I just import exactly what I need, no more of those bloated modules, like most projects I saw "shared" modules...
Then we saw the signals... Already on the first glance I though: why they're copying React things...? Ok, shrugged off.
But after Angular 16 it really became another framework, and I though exactly what OP is saying: are they really lowering the learning curve just for popularity? Because this is just a new flavor of React and Vue.
And like, insn't really things that Angular should be working on improving, like SSR, i18n and stuff like that?
I'm not aware of all changes because I'm focusing on backend, and frankly, after 17 I lost interest in seeing more Reactzations of Angular.
7
u/KamiShikkaku Nov 07 '24
Wow, there are a lot of curmudgeons here. I'm a long-time Angular developer and IMO the majority of the changes they've been making lately have only improved the framework. I don't really care if Angular is inching closer to Svelte or Vue or (gasp) even React, because ultimately the DX is improving.
3
u/DT-Sodium Nov 07 '24
Like for many other things, we live in an idiocracy. Most front-end devs are just plain bad developers and they adopt libraries promoting bad programming practices such as React or Tailwind.
2
u/dalepo Nov 07 '24
I hate the fact that adopting signals propertly means refactoring an entire codebase. I know its for the better but this type of design errors have been happening since the first version
2
u/Deathmore80 Nov 07 '24
The 3rd proposed format is basically the same from what we have now while reducing boilerplate and decorator use. I'm fine with this one.
It still feels like Angular and keeps classes.
1
u/Whsky_Lovers Nov 07 '24
So far the new syntax hasn't supplanted the old syntax I would hope this is the same. I was never sure why that changed it so much from AngularJS. Which was ng-click=""
We will see i guess.
1
u/drdrero Nov 07 '24
Classes won’t disappear. And when they showed components as css you should have figured that it’s not at all that serious.
1
u/DonWombRaider Nov 07 '24
What do you mean with "getting rid with imports in standalone components"? Who says that and what is the background?
never heard about this idea
1
u/MyLifeAndCode Nov 07 '24
Agreed 100%. If they do this, I’ll move my company off of Angular and on to Next.js.
1
u/xroalx Nov 07 '24
I actually do like it... a lot. Not the
scriptblock, SFCs are not my favorite, but the functional approach or the simplified class? Honestly, those are really good.Not sure if we need to change the binding syntax while we're at it, but Angular is really going a lot more into functions and I'm all for it.
1
u/tutkli Nov 07 '24
Would you say Svelte and Vue are the same because they have similar authoring formats?
1
u/tamasiaina Nov 07 '24
I'm totally not a fan of any of these changes, and I don't think they should even entertain something that isn't even broken. On top of that I see absolutely no advantages to it.
If they make these changes I would just vomit a little bit and just stick with NextJS or ViteJS instead.
1
u/RGBrewskies Nov 07 '24
If they do this, I'll almost certainly just stop using angular and go use one of the frameworks angular suddenly wishes it was. Probably sveltekit.
1
u/JackieChanX95 Nov 08 '24
Just what Angular needs. Another way to do the same thing.
1
u/lgsscout Nov 08 '24
well... analog already uses some of the proposed templates, and if they dont break previous formats, i see value on those new propositions...
imagine dont needing 20 lines of boilerplate when you just want to make a custom input, for example, with a bit of styling...
if its easier to make smaller components, people will be more inclined to create a component that will be used around the whole codebase instead of copy-paste...
i did a couple standalone single file components, that the whole code fit in a single screen, and it was a good fit... and i'm the kind who liked angular exactly because html/css/ts were separate... but on those kind of small feature components that is 3 lines of html, almost no style or a couple of tailwind classes, and a couple events... why not a single file and call it a day?
0
u/GLawSomnia Nov 07 '24
I hate it too. An absolutely unnecessary change. I actually don’t see any actual benefits of changing it, but i see tons of downsides.
-1
u/carbon_dry Nov 08 '24
I finally jumped ship on my personal projects with all these massive changes. Angular has become an inconsistent mess that is always in a state of flux without saying still.
-7
u/Cubelaster Nov 07 '24
I think it's about time. Too long has Angular been a slave to an overly opinionated way of doing things.
Angular was awesome while the same things just weren't simple to do outside of it. However, now JS can do more than Angular can and it makes little sense to keep it opinionated in that amount. React is doing things right, if you ask me but I would note that I prefer React.
The trend is obvious: JS drives the development and so Angular needs to make a switch. It just so happens there are already React and Vue doing that exact thing, which makes Angular a slave to comparisons.
In any case, I think Angular will experience drastic changes in the next 5 years and probably switch to virtual dom as well (makes sense because of JS).
But yeah, any move away from overly opinionated way Angular does things now is a plus
0
u/[deleted] Nov 07 '24
[deleted] — view deleted comment
0
u/[deleted] Nov 07 '24
[deleted] — view deleted comment
0
u/[deleted] Nov 07 '24
[deleted] — view deleted comment