News for hackers. Stuff that matters.
Re:Angular without SSR is faster than Next.js with SSR by pictur on Monday June 27, 2022 @04:53PM (#31900643)
what are the advantages of using angular right now? in terms of documentation, it doesn't look like an atomic reactor compared to the past. more like simplified
Re:Angular without SSR is faster than Next.js with SSR by Alex3917 on Monday June 27, 2022 @05:12PM (#31900873)
> What are the advantages of using angular right now?

A low total cost of ownership compared to other frameworks because:

- The code for every Angular project is structured the same way

- The code for components (and directives, services, etc.) is generally very readable

- Everything is easy(ish) to test

- 280k Stack Overflow questions, vs 95k for Vue and 19k for Next

And ease of hiring due to 170k Angular developers in the US (per Sales Navigator), as opposed to 50k for Vue.js and 48k for Next.js

And in general Angular seems much easier to learn. If you spend 20 hours watching the Udemy course then you pretty much know it, whereas I regularly see job ads looking for folks with 6+ years of React experience. Now obviously you always hear about job ads looking for folks with 10 years of experience with some technology that's been around for two years, and yet I rarely come across Angular job ads that implicitly assume it takes multiple years to learn how to use the framework correctly.

Re:Angular without SSR is faster than Next.js with SSR by acdha on Monday June 27, 2022 @06:28PM (#31901719)
> - 280k Stack Overflow questions, vs 95k for Vue and 19k for Next

> And ease of hiring due to 170k Angular developers in the US (per Sales Navigator), as opposed to 50k for Vue.js and 48k for Next.js

Listing large numbers without commentary is a bit of a red flag unless you can point to how you analyzed the raw data — e.g. does more questions mean more happy users or more problems which people can't figure out on their own? Does that developer figure exclude the people who said “I used Angular 1, hated it, and switched to React”? That last is related to the conspicuous absence of React, which has higher numbers in both categories.

Re:Angular without SSR is faster than Next.js with SSR by bryans on Monday June 27, 2022 @08:36PM (#31902744)
> The code for every Angular project is structured the same way - The code for components (and directives, services, etc.) is generally very readable - Everything is easy(ish) to test. [...] And in general Angular seems much easier to learn. If you spend 20 hours watching the Udemy course then you pretty much know it

You just described every frontend framework. None of these are unique to Angular. Any developer with an understanding of JS can learn and use any framework in the exact same way.

> 280k Stack Overflow questions, vs 95k for Vue and 19k for Next. And ease of hiring due to 170k Angular developers in the US (per Sales Navigator), as opposed to 50k for Vue.js and 48k for Next.js

These are false comparisons, and you're conveniently leaving out the largest competitor. A higher SO question count isn't necessarily a positive metric, and may even imply substantial confusion about the framework. More importantly, all of the surveys[1] show that both developer and hiring interest for Angular is waning.

> whereas I regularly see job ads looking for folks with 6+ years of React experience. Now obviously you always hear about job ads looking for folks with 10 years of experience with some technology that's been around for two years, and yet I rarely come across

You're using a popular meme about some notoriously bizarre job listings written by HR managers (or interns) to suggest that developers have a harder time learning frameworks other than Angular. There is no correlation whatsoever between these two things. When "you always hear" and "yet rarely come across," you are experiencing the effects of confirmation bias.

> Angular job ads that implicitly assume it takes multiple years to learn how to use the framework correctly.

If a job lists multiple years of experience as a requirement, why would that automagically mean the employer is "implicitly assuming" multiple years of training is required to accomplish a bare minimum? In reality, it means they're looking for someone who didn't spend last weekend watching a 20 hour Udemy course to obtain a cursory understanding.

They're requiring real-world experience in a similar work/project environment, and they are paying handsomely for that experience. If it were junior development jobs with these requirements, you'd maybe have an argument, but 100% of senior positions have minimum work history requirements, because that is the definition of senior.

[1] https://gist.github.com/tkrotoff/b1caa4c3a185629299ec234d231...

Re:Angular without SSR is faster than Next.js with SSR by NoNameProvided on Tuesday June 28, 2022 @02:09AM (#31904627)
> You just described every frontend framework. None of these are unique to Angular. Any developer with an understanding of JS can learn and use any framework in the exact same way.

You just summed up, why he said Angular is better in this regard. Yes any developer with experience CAN lean how to write good structured React apps. In Angular it is basically enforced.

Re:Angular without SSR is faster than Next.js with SSR by bryans on Tuesday June 28, 2022 @01:41PM (#31910681)
Doesn't learning the Angular structure require learning? If that's the metric and you have to learn good structure for both frameworks, I'm not seeing the advantage. In fact, Angular's rigidity is only an advantage if the developer finds that particular structure comfortable. And the reality is that the vast majority of developers don't find Angular comfortable to work with.
Re:Angular without SSR is faster than Next.js with SSR by trhoad on Monday June 27, 2022 @05:26PM (#31901029)
I worked with React almost exclusively for ~5 years. I got so fed up with everyone reinventing the wheel on every project, coming to Angular (late) was a massive breath of fresh air. I now spend more time building valuable features rather than discussing changing state management libraries and people banging on about hooks all day long. YMMV, and I'm certainly in the minority, but I'd probably choose Angular over React for any new projects now, personal or professional. The only thing I really miss is that JSX is much more ergonomic and the devtools for React are a bit better.
Re:Angular without SSR is faster than Next.js with SSR by moystard on Monday June 27, 2022 @07:40PM (#31902365)
My experience is very similar to yours, and I concur with your conclusion. After 5 years of React, I joined a new organisation as engineering lead, and the team had embraced Angular before I joined.

Coming from the React/Next.js world, I was really puzzled with that decision as I still had in mind the trauma of the Angular.js -> Angular migration and the breath of fresh air that React had represented at the time.

As most engineers out there, I had an urge to stick to what I knew would work, but I resisted that urge and gave Angular a chance. I do not regret it; Angular and the structure the framework provides is a game changer for a large project; the conventions make the code and the architecture predictable/testable/scalable. Our time is spent on delivering value for our users. This is, in my opinion, the best quality a technology can have when working on a fairly large project.

Re:Angular without SSR is faster than Next.js with SSR by jeremycarter on Monday June 27, 2022 @11:39PM (#31903797)
This is my sentiment as well. Although trying convincing people to give it a genuine try is difficult.
Re:Angular without SSR is faster than Next.js with SSR by coding123 on Monday June 27, 2022 @07:26PM (#31902256)
I would have to agree with this sentiment. I think one of the best things about hooks in general is that it put to rest all the third party state management libraries. At least now you can just agree with most people and move forward with hook state.

That being said, I think the ergonomics in React development (JSX) are SOO much better than Angular that I still prefer it.

Re:Angular without SSR is faster than Next.js with SSR by trhoad on Tuesday June 28, 2022 @05:00AM (#31905640)
JSX is the best thing about React, and the Angular templating is worst thing about Angular, so I can certainly empathise with that being the tipping point.
Re:Angular without SSR is faster than Next.js with SSR by InsaneOstrich on Monday June 27, 2022 @05:04PM (#31900772)
It's very opinionated compared to the alternatives and it has a "batteries included" kind of approach. There's a "right" way to do things and you don't need to pull in a lot of third party libraries for basic functionality. The native typescript support is really nice too.
Re:Angular without SSR is faster than Next.js with SSR by jeremycarter on Monday June 27, 2022 @05:09PM (#31900831)
I've worked on react apps where some features use different routers, state stores and component syntax. Angular gives you 2 ways to solve problems and keeps things consistent and on the rails.
Re:Angular without SSR is faster than Next.js with SSR by thm76 on Monday June 27, 2022 @09:40PM (#31903158)
Having stuff included does have advantages, but, in my opinion, some of those included things in Angular are really badly designed (I'm looking at you, Forms)

I never use Angular for personal projects, and I have been using TypeScript exclusively for years. I.e. other libraries work really well with TypeScript as well (sometimes actually better than Angular, in my experience)

Re:Angular without SSR is faster than Next.js with SSR by jeremycarter on Monday June 27, 2022 @05:06PM (#31900801)
Angular has great support. It is the front end to some absolutely huge apps like Google AdWords, Google Cloud Platform etc. Angular shines when you have 10+ devs working on the project. It's not slow, flexible and the boilerplate module code will be removed in the next version. Basically you just have to give it a go, so many people trash technology without giving it a unbiased go.
Re:Angular without SSR is faster than Next.js with SSR by steve_adams_86 on Monday June 27, 2022 @05:17PM (#31900930)
Having used Angular 1 then migrating to 2, and then trying it again very recently I wonder if a lot of people were burned by early Angular and unwilling to try it again.

It’s leaps and bounds ahead of what it was in terms of end user and developer experience. The tooling is dramatically improved. If you asked me 6 months ago what my position on Angular was, I probably would have said something like “I haven’t used it recently, but older version were pretty awful. Bad DX, incredibly slow builds, huge bundle size, etc”. Today I think it’s pretty compelling for the right projects.

Like anything that doesn’t just fade away, there’s a reason people still use it. There are some talented and intelligent people driving it forward. I’m not eager to use it, but I was really glad to see how much it has improved.

Re:Angular without SSR is faster than Next.js with SSR by zdragnar on Monday June 27, 2022 @06:48PM (#31901930)
The code quality of angular 4/5/6 and the add-on packages was so bad, I wouldn't want to lock myself into that ecosystem ever again. I don't remember exact numbers, but I'm pretty sure that about half the bugs that project had were due to angular, poorly designed Rxjs interactions, or angular flex-layout.
Re:Angular without SSR is faster than Next.js with SSR by steve_adams_86 on Wednesday June 29, 2022 @02:37PM (#31924053)
I love RxJS and the testing story is not bad, but it does manage to find ways to be buggy when I encounter it.

It seems like both a strength and a weakness of the Angular ecosystem. Maybe the testing story needs to improve? I can’t recall how exhaustive marbles are, and maybe fuzzing might help catch gotchas?

Honestly I thought RxJS would benefit a ton from a visual builder. They have this decision tree tool for helping figure out which operators you need to use, but you could go further and actually build out entire observables in a similar way, plotting out the system and behaviours visually along the way.

When you have such excellent boundaries and well defined behaviours, but observables can become complex so easily, it seems like a great opportunity to visualize and constrain things with tools which generate the code you need.

I know some might find that gets in the way of programming, but I have a feeling it would help those who struggle with RxJS produce far more stable observables.

This is actually why I began using XState for a lot of things. Although I can write out all of the logic myself easily enough, their tooling seems like it’s on a very promising path to making complex state management far more approachable to people with less experience. Having well defined state, transitions, and a great testing story is huge in avoiding the kind of buggy mess I’ve seen and you seem to be describing around Angular.

Re:Angular without SSR is faster than Next.js with SSR by zdragnar on Wednesday June 29, 2022 @05:19PM (#31925845)
Both RxJS and XState have some really seductive tooling and promises. It has been my personal experience (from 4+years ago for both libraries) that both will quickly swamp you in accidental complexity.

Point of fact, I just started a new job and am already being thrown into fixing their state machine code (not javascript / ts though). I can't say that what they're doing requires fewer lines, tests or has fewer bugs than if they'd just written it out without the whole state machine concept. I can say that it would certainly be a lot simpler and more flexible, though.

Re:Angular without SSR is faster than Next.js with SSR by steve_adams_86 on Friday July 01, 2022 @09:06PM (#31954998)
That's really interesting.

I've been hesitant to use state machines for anything complex... I find they work great for small-ish things like an image uploading component in the front end, where the states are very well defined, there is a sort of flow, predictable actions need to be taken, etc.

I've wondered a lot about composing machines. It seems like it could be extremely useful and powerful. The actor model is the approach the XState team is taking and it seems promising, but some things holds me back. The API is certainly one reason, but it's the mounding complexity that scares me more. Like you say, it seems like it could get really messy.

I have a feeling with a good enough API this problem could be reduced, but that's not a trivial thing to figure out at all. I'd love to see it happen, though.

Re:Angular without SSR is faster than Next.js with SSR by wdb on Monday June 27, 2022 @06:22PM (#31901653)
Yes, Angular 1 wasn't great and I haven't looked back
Re:Angular without SSR is faster than Next.js with SSR by wdb on Monday June 27, 2022 @06:22PM (#31901641)
Google Cloud Platform Console is really slow for me. Always painful experience to use especially switching products. Wouldn't say that's a good advertisement for Angular
Re:Angular without SSR is faster than Next.js with SSR by Alex3917 on Monday June 27, 2022 @06:50PM (#31901957)
> Google Cloud Platform Console is really slow for me.

While this definitely isn't because of Angular, I will note that it's currently deployed in development mode.

Re:Angular without SSR is faster than Next.js with SSR by aluminum96 on Monday June 27, 2022 @05:47PM (#31901301)
In my opinion, the biggest advantage of Angular is how batteries-included it is. Everything just works out of the box, and project configuration is very standardized. The framework owns everything from common UI components (Angular Material) to your build process (Angular CLI) to non-core packages (router, forms) to state management (RxJS).
Re:Angular without SSR is faster than Next.js with SSR by aluminum96 on Monday June 27, 2022 @05:53PM (#31901347)
I'm going to reply twice, because I'm a true believer (TM).

Another set of advantages comes from how declarative Angular is. With React and JSX, everything is super imperative (setState, loops to generate dom, etc). In Angular, RxJS gives you a really powerful reactive model for your state, directives give you a much more declarative way of describing application behavior, and the limited template microsyntax encourages you to put the complexity in your typescript, not in templates.

Re:Angular without SSR is faster than Next.js with SSR by EugeneOZ on Monday June 27, 2022 @07:34PM (#31902332)
Add OnPush + NgRx
Re:Angular without SSR is faster than Next.js with SSR by LocalPCGuy on Monday June 27, 2022 @10:04PM (#31903313)
Others have mentioned most of the big points, so gonna be a bit contrary and ay I like being able to actually write HTML/CSS and not JSX and whatever the current flavor of the month is for CSS in React is these days. I like marking up my HTML rather than writing JSX personally. I'm sure I'll have to embrace JSX as some point, but don't see it as the huge win that others seem to consider it when I have played with it.
Re:Angular without SSR is faster than Next.js with SSR by hinkley on Monday June 27, 2022 @10:52PM (#31903565)
> write HTML/CSS and not JSX

I don't know how much people have changed, but generally people don't change very fast so this is probably still relevant: If the HTML doesn't look like HTML and the CSS doesn't look like CSS, you end up with a bunch of problems that can only be solved by the people who aren't invested in it.

Designers and UX specialists end up being hobbled if they are expected to make heads or tails of the Turing Complete parts of the code. And once they feel hobbled they tend to shut down even more, and it's just pain getting any improvements in.

Mostly HTML with a little code is already at the very edge of their comfort levels. JSX and things like JSX have been abandoned more times than I can count, and there's always some necromancer who brings it back.

Re:Angular without SSR is faster than Next.js with SSR by LocalPCGuy on Tuesday June 28, 2022 @11:11AM (#31908747)
It also shuts down an entry into the world of web development (and development in general). Sadly, I know some see this as a feature, not a bug, but I know a number of people who are great developers who started out doing HTML/CSS and learned programming (JavaScript and much much more) along the way. Some are in very high positions now at companies most of us in this industry are aware of. I'm not saying they wouldn't have found another way into the industry, but it would have been significantly more up front learning before they could start working professionally. I know that entry-level positions of that nature (mostly just HTML/CSS) are getting more and more rare, but to me that is very sad and limits the potential for some really great people to be part of our industry.
Re:Angular without SSR is faster than Next.js with SSR by hinkley on Tuesday June 28, 2022 @01:00PM (#31910218)
Yep, we like to pull up the ladder behind us.