Live data from Hacker News

Angular 9.0

blog.angular.io

31–40 of 308 posts

Re: Angular 9.0

#31
post #12

Why is Angular so less popular than React?

Angular: Learn about property binding, event binding, pipes, templates, views, metadata, attribute directives, structural directives, services, modules, components, injectors. React: Write a function that generates a piece of HTML. Use standard event handlers to manage user interactions. Update state via setState methods. Ship it.

The first time I saw this in Angular's material implementation I was completely floored: https://material.angular.io/components/dialog/overview#shari...

The method for passing data to a dialog component is to import a magic constant and inject a data field into it's constructor? It's a completely over-engineered, nonsensical solution for a problem that doesn't even exist in React. There's so much stuff you have to be familiar with in Angular just to build the simplest features.

Re: Angular 9.0

#32
post #21

Earlier quoted context omitted.

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway: The mental model for React is much simpler than Angular's. In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar. In Angular, you need to understand: the binding syntax;…

You don't need to understand hooks to use react.

You have a looser definition of "to use" than me. Let's agree to disagree.

Re: Angular 9.0

#33

Why is Angular so less popular than React?

Because of the whole debacle between Angular 1 and 2. During that time, React gained a huge foothold, and the momentum has continued to today.

That's part of it but to be honest if they hadn't Angular would have died completely.

Re: Angular 9.0

#34
post #21

Earlier quoted context omitted.

I am in no way the whole crowd, but having used both legacy AngularJS, React, and Angular 4+ in production for medium-sized apps, this is my main takeaway: The mental model for React is much simpler than Angular's. In React, There are two concepts one needs to understand: Components, and Hooks. JSX too, but as a web dev the HTML-like syntax was already familiar. In Angular, you need to understand: the binding syntax;…

I think that's pretty well correct, but my preference has been the opposite in terms of more concepts vs cognitive complexity. I find that to do the same stuff with react and redux and so on, you end up decoupling and abstracting in such a way that the 5 or concepts in something like Angular or Vue end up being a more manageable mental model. In the sense that the main purpose of React is lost in the weeds of trying…

I have found good success with React + RxJS, in fact. They have some overlap, but with the benefit of interop outside React, and Rx is excellent at both message-passing-style events, as well as general-purpose "data binding".

And the total load is still in my perspective smaller than Angular. I have never even casually used Vue (I've since switched to gamedev as a profession), so I cannot comment on it, but from a cursory on its docs, it seems like a leaner Angular, which is good.

Re: Angular 9.0

#35

I just upgraded and got 'Failed to load module script: The server responded with a non-JavaScript MIME type of "text/plain".' from my S3 through CloudFront. Seems like it's not adding 'type="text/javascript"' to in index.html. When adding this manually, everything works. Just FYI if others upgrade and seem to get the same errors.

Normally type=“text/javascript” is strictly unnecessary. You should try to configure whatever is uploading your site to S3 to set the Content-Type correctly as I believe that will also resolve your issue.

Re: Angular 9.0

#36
post #26

I just updated my mid-size app from v8.2 to v9 with Ivy, and the total es2015 bundle size decreased from 973 KB to 669 KB. An over 31% improvement with no effort on my part!

Thats exceptional, I wonder if it was a really clever optimization they found or if it was a really lazy bloat they let into an earlier build. It reminds me of a great hack where game developers used to hide a large memory allocation early in the game development process and when they ran into memory constraints towards launch they'd just comment out the line and instantly save the day. Artificially constraining the…

Most improvements come from the more compact JavaScript we generate from a template.

We also worked on making the runtime tree-shakable, so in your final bundle you can get only what you use.

Additionally, we made sure the code we generate compresses well with popular algorithms.

Re: Angular 9.0

#37
post #7

Earlier quoted context omitted.

Probably because its a larger learning curve and its a lot more "framework".

Saw a 2 man team that got features done in a couple of weeks on jquery move to angular and turn into a 15 man team that took months on each feature. Management was very happy with how modern the stack felt Sales came to a halt for 2 years since features came to a halt. Turns out Angular is freaky hard to do right.

on the other side, we went from jquery messes with a bunch of state machine issues to being able to comfortably add client-side interactivity with a lot less worries when moving to Angular 1.x

There were definitely Angular-related issues, but they were replacing a lot of "my state machine is out of sync" issues that just scopes and watching mostly solve (except for the prototype inheritence gotcha)

Re: Angular 9.0

#38

Why is Angular so less popular than React?

9 major versions in ~7 years indicates that it's not remotely stable enough to be taken seriously, particularly for corporate stuff that will likely never get an upgrade. Even the "LTS" releases are only supported for 18 months.

React seems a bit better, but they don't seem to support older releases at all.

Re: Angular 9.0

#39
post #12

Earlier quoted context omitted.

Angular: Learn about property binding, event binding, pipes, templates, views, metadata, attribute directives, structural directives, services, modules, components, injectors. React: Write a function that generates a piece of HTML. Use standard event handlers to manage user interactions. Update state via setState methods. Ship it.

Having suffered on a large Angular code based on Angular 7 and then Angular 8 for a couple of years, I just wish Angular would fucking die. Every small thing is a giant shit-pile of services, components and HTML templates that are all accidental complexity.

[deleted]

Re: Angular 9.0

#40
post #12

Why is Angular so less popular than React?

Angular: Learn about property binding, event binding, pipes, templates, views, metadata, attribute directives, structural directives, services, modules, components, injectors. React: Write a function that generates a piece of HTML. Use standard event handlers to manage user interactions. Update state via setState methods. Ship it.

It reminds me of the whole .NET ecosystem. All of these custom magical special ways to do everything, compared to ‘dumb’ setups like node/ruby/go where the actual logic is just right there in front of you

And every release .NET just keeps moving closer to the dumb systems. Simple and raw is good, keep the magic away

Post reply on HN