Hacker News new | ask | show | jobs
by grovegames 3285 days ago
How is angular making the web slower. An angular project can sit somewhere in the 130kb range, with lighter frameworks like vue sitting at 30kb. These are smaller than most images or gifs used on the web. So the trade-off is one image on your page, or a robust RIA experience, with much more maintainable code. If you build it correctly, you're decreasing the amount of bytes on the wire significantly when using client side frameworks, over re-rendering each and every page on the server for every interaction. I also maintain a large vanilla javascript application that was written before I arrived, and the javascript weighs in at almost 5MB, and we have a general no touch policy on it because of how fragile the vanilla javascript is. It was poorly written, but even a poorly written vue app, would come in at much less than the 5mb JS. I just don't buy this as the reason the web is slow.
3 comments

> So the trade-off is one image on your page, or a robust RIA experience

If I had the choice, I'd take an additional image in that trade, thanks. The 'rich' 'experiences' I've been offered so far are inferior to bog-standard web pages. I'll grant you that it is friendlier to coders whose applications fit the model. Beyond that, they don't work without Javascript[1]. The "richness" is usually useless animation and similar, frequently employed because it is there, rather than actually adding any value (Anyone remember the Jquery animation explosion?). It breaks a lot of automation; see the JS comment. These are all things that are important to me.

I get that folks are fine with losing me as a user/customer, and that's their choice. But they should know why, thus my explanation.

[1] Which means I usually go elsewhere when I encounter it, because I default to leaving it off.

If I understand you right, your contention seems to be more with animation and 'fluff' rather than with MV* frameworks like Angular specifically. To which I'll simply say: in some cases animation is as important to the user experience as an additional image would be, and in some cases the additional image just contributes more 'fluff' than the animation or interactivity would. There are many dimensions to the problem (and the article only hints at some of them on the protocol side), and pinning JavaScript frameworks as the cause strikes me as unfair.

What you're really asking for is for the components being used, be they images, animations of frameworks, to be used with a deliberate purpose. Which I think is what everyone is asking for, and what good developers and designers strive for.

You're actually picking up the smaller of my two complaints. If everything else about Angular were sensible, I'd probably grumble about dumb overuse of trendy visual primitives, but that's about it. And I absolutely agree that, used sensibly, animations and whatnot are very useful. This complaint basically boils down to wishing all web designers were actually as good as a lot of them think they are.

You missed my complaints about the uselessness of Angular apps without a JS interpreter. That's important, because it means they're basically worthless for consumption by nonhumans. (Sure, I can run Chrome headless, but that's an entirely different can of worms that play poorly with pipelines, not to mention an enormous, absurd runtime for what should be a trivial file transfer.)

Web automation on a personal scale is enormously useful. Angular breaks the underlying assumptions that make it work for sites that don't go out of their way to accommodate it. I get that may be an unintended benefit to some people who want to be control-freaky about how their offerings are used , but it enormously reduces the value of the web.

A connection just hit me - it is similar-ish to way back when, when some misguided designers wanted to publish PDFs on the web instead of HTML. They wanted full layout control, at the cost of basically everything else. Angular is similar, in that doing anything the creator didn't anticipate is very difficult, despite complying with the letter of web standards.

And also, as I said, I default to browsing with JS off. When I hit a blank page, I curse "Angular" and go back to the search engine. So that's annoying, but I've yet to encounter an Angular site I can't live without.

This past comment chain might be quite relevant: https://news.ycombinator.com/item?id=12692595
This comment makes my head hurt