Live data from Hacker News

Angular v8.0

github.com

131–140 of 210 posts

Re: Angular v8.0

#131
post #104
post #96

Earlier quoted context omitted.

I'm not a fan of Angular, but how many times are we going to have this conversation. At this point, this is a completely off-topic comment that has no place in this thread. I'm getting javascript fatigue fatigue. > With some exceptions, there is really no benefit This is just a contradictory sentence of hyperbole. Who cares if there are plenty of use-cases to not write a SPA. There are also plenty of use-cases for it…

> There are also plenty of use-cases for it, and many benefits. I obviously disagree, but please elaborate.

I would like to read your elaborate opinion of why there's no use-cases for it.

Re: Angular v8.0

#132
post #69

While the effort by the Angular team deserves praise, I think for the vast majority of use cases it is a mistake to do it all client side. With some exceptions, there is really no benefit in making a SPA but there are many drawbacks. I don't say this lightly. I used AngularJS in 2015 and since then I've been making SPAs in React, Vue, and Inferno + Mobx.

SPAs aren't classic websites, they are web applications and should only be used when you need to create a web application. If a SPA is created for every usecase a regular website would do is a bad management decision but nothing wrong with SPAs per see. And yes, in this particular case is a waste of resources.

Re: Angular v8.0

#133
post #72

Angular is really a great framework. I think a lot of people complaining about Angular haven't actually built an app in Angular 4+. I also wish the Angular team had just called Angular 2 something else, since the 1 -> 2 transition frustrated a lot of people who jumped ship and never looked back. I also understand that people just have different preferences, which is fine, too. Out of the box, you get: routing with la…

> a component-based approach to UI development

This is actually something that bothers me a lot about Angular. Yes, you can extract components, but the process of doing so is a lot more... heavyweight than in React.

In React, I can trivially extract any piece of UI into a stateless functional component in the same file (and later on I can move it to another file for wider reuse if needed). It's just like extracting a method in non-web programming, it's something you do without even thinking about it.

In Angular, that component needs to live in a separate file with a bunch of boilerplate and it needs to be registered in the module. This is OK for big components, but it's enough work that it's not practical to create tiny helper components frequently.

Re: Angular v8.0

#134
post #72

Angular is really a great framework. I think a lot of people complaining about Angular haven't actually built an app in Angular 4+. I also wish the Angular team had just called Angular 2 something else, since the 1 -> 2 transition frustrated a lot of people who jumped ship and never looked back. I also understand that people just have different preferences, which is fine, too. Out of the box, you get: routing with la…

I cannot upvote this enough. We have long decided what to do with our painful angularjs application with thousands of beginner mistakes due to people learning a framework while using it.

In the end, we were able to partially migrate to angular 4 at the time using ngUpgrade while still using parts of the application in angularjs 1.6. luckily we started looking into typescript beforehand, making it even easier.

It took us 3 months to completely migrate with only a tiny fraction of legacy bundle of code now still running on angularjs until it's being converted

Since then I have done every major upgrade without fears. I wholeheartedly recommend it for medium-large applications (we have around 50k cloc typescript now).

Angular + Typescript keeps us and our frontend saner than before.

One thing I sorely miss is the performance of my manual webpack / angularjs build, with 15seconds initial build and 1-2 seconds incrementals... It's now at least double with the angular cli, but at least fully managed.

Re: Angular v8.0

#135
post #105
post #98

Earlier quoted context omitted.

I'm kind of with you. I think SPA's can be suitable (sometimes) for internal line-of-business applications, where you have a degree of control over the environment the end user will be using your application on (ie the device/browser (+version)/etc) and bandwidth isn't a big issue. In this sort of environment, Angular can work pretty well. For public facing applications, where you can't say with confidence that your…

You can do severside rendering with Angular Universal. Also Angular has helped me a lot with bowser compatiblity in the past (IE 9).

True, you can also do it with more mature frameworks such as Rails/MVC Core/Django etc.

I don’t have experience with Angular Universal, I do with Nuxt (Vue SSR) and it was great, but frustrating to work with as things got more complex.

Re: Angular v8.0

#136
post #95

Earlier quoted context omitted.

> There are reports of 40kb reduction in bundle size, which is a lot. It would be for libraries like react or vue that are already small. Angular is still big enough that even after being 40kb slimmer it's still fairly huge (I think the typical build is like ~550+kb).

It's just the first step. With both differential loading and Ivy, build sizes for a minimal app can drop close to 14kb, iirc. That's the goal, anyway.

Use any UI lib or anything of substance really and your app is going north of 500kb really fast.

Re: Angular v8.0

#137
post #64

I was recently at a Microsoft heavy tech conference and spoke to at least 50 .Net developers. Anyone who also did front end did so in Angular. I was surprised at how popular it is!

I work in the Danish public sector and we currently have 300 systems from various contractors. Almost all of them are moving toward a C#/JAVA api based backend and an Angular front. Only one of those systems uses Vue. None of them use React. Outside the public sector React is a bit more popular, but it’s still mainly used outside of enterprise and Vue rarely sees any use. The job-market doesn’t seem to follow the tec…

I can confirm this for the Dutch public sector as well. I'm saying this as a longtime React contractor. There's some React contracts, but very few and no Vue that I know of.

Re: Angular v8.0

#138
Angular is too abstract / has a steep learning curve. You need to learn too many design patterns at once (factory, provider, service, singleton, pipes, directives, observable, component, container, dependency injection). Trying something simple is trivial, but trying something more complex is overly difficult.

Re: Angular v8.0

#139
post #72

Angular is really a great framework. I think a lot of people complaining about Angular haven't actually built an app in Angular 4+. I also wish the Angular team had just called Angular 2 something else, since the 1 -> 2 transition frustrated a lot of people who jumped ship and never looked back. I also understand that people just have different preferences, which is fine, too. Out of the box, you get: routing with la…

I'm one of the people who've built apps with 1.x, and hasn't ever tried subsequent releases. The transition didn't help matters, but it wasn't the reason why I not only have refused to consider it again, I generally don't even consider working for organizations who list it as a part of their stack.

I tend to find that most libraries/frameworks have a few central notions about what the challenge of developing an application in their technical domain is. As far as I was able to tell from working on two projects, Angular's was that JavaScript applications were not written enough like Java applications, or put another way, there were not enough idioms from a static manifestly typed kingdom-of-nouns class-oriented language being used in a dynamically typed first-class-functions-from-the-start prototypes-too language.

TypeScript has its points, there's things to like about it, but its emphasis does the opposite of persuade me that central philosophy has changed. And while I get that complex applications are complex, and most need some organizing principles and Angular is one (or more) of several attempts to figure this out, this one struck me as... not one I wanted to live inside of, to keep things polite.

If I'm wrong about Angular's central philosophy at this point, I'd be interested to hear how.

Re: Angular v8.0

#140
post #89
post #65

Earlier quoted context omitted.

well 16.8 (which basically was the latest version) also btw: https://reactjs.org/docs/hooks-faq.html#do-i-need-to-rewrite... and I still have no idea how I only do stuff on the client in a SSR environment (stuff that i did in componentDidMount)

> and I still have no idea how I only do stuff on the client in a SSR environment (stuff that i did in componentDidMount) The 'useEffect' hook - it won't be executed if you use e.g. ReactDOMServer.renderToString() for SSR useEffect(() => { console.log('Client side only'); }, []); Codesandbox: https://codesandbox.io/s/peaceful-dew-nvw83

While you wouldn't want to leave "console.log" in your code in production, you can use them in function components just like a classes' render methods.

A better example (from the video "React Today and Tomorrow and 90% Cleaner React With Hooks" from October[1]) is something along the lines of updating document.title = `${some} Page` or possibly calling an API.

[1]: https://www.youtube.com/watch?v=dpw9EHDh2bM

Post reply on HN