logoalt Hacker News

bruce511last Friday at 5:03 AM3 repliesview on HN

I concur that most web sites could use less JavaScript. And a lot of (but not all) cosmetic uses for JavaScript can be done in CSS.

Of course for web apps (as distinct from web sites) most of what we do would be impossible without JavaScript. Infinite scrolling, maps (moving and zooming), field validation on entry, asynchronous page updates, web sockets, all require JavaScript.

Of course JavaScript is abused. But it's clearly safe and useful when used well.


Replies

sebbadklast Friday at 6:29 AM

Infinite scrolling is JavaScript abuse. Pagination is much better for letting people keep track of their progress and time.

show 1 reply
thunderforkyesterday at 10:49 PM

HTML does provide the ability to use some client-side form validation without JavaScript.

https://developer.mozilla.org/en-US/docs/Learn_web_developme...

Not saying your broader point is incorrect, but useful to know.

LorenDBlast Friday at 1:40 PM

> web apps

See, that's where we went wrong. IMO the web is for web sites. Co-opting the browser for full applications has led to the significant degradement of modern software. If we must have a "write once, run anywhere" approach for modern development, can we at least use WASM bytecode and build a dedicated runtime that doesn't use the browser for GUI output?

show 1 reply