Hacker News new | ask | show | jobs
by hyperhello 352 days ago
You can make a perfectly effective UI in vanilla HTML5 and it will work forever, just like you can roll up for your date wearing practical clothes driving a 2002 Honda Civic, but you’re not guaranteed to look impressive enough to snare the targets. I think the point of all this JavaScript library evolution is not to be a good coder or a practical husband.
1 comments

HTML5 as in no JS? So full page loads after every click?
View transition API helps mitigate this.

But datastar (they just released v1 2 days ago) is even better.

MPA, server-rendered, but with client-side reactivity pushed from the server via SSE.

It's pretty impressive - better than HTMX imho.

Progressive. Enhancement.

Yes, it needs to work, fully, without CSS or JS. Then, use CSS to make it look nicer, and use JS to make it behave nicer.

The total failure of most people who build professional web sites to follow standards and make them pain-free continues to baffle me, when it’s not that hard to do right and helps ensure the site is maintainable going forward, regardless of which new JS library or framework becomes popular.

If by 'nicer' one wants to avoid the flash of blank between clicks, then I don't see how you'd avoid recreating an SPA
This doesn't happen for me when clicking around sites like HN or my blog, both are server side rendered and I'm on a pretty flakey connection right now. Browsers solved this a long time ago with how they deal with page changes.
your connection is not flaky enough. for me the average page load on HN is a full second. i just had one page take 1.8 seconds...

(edit) submitting this comment took 1.5 seconds.

I read the server-side-rendered forums of DLang, and everything happens so fast, in around 200 ms, that I don't feel I am losing anything by the forums not being an SPA.
The View Transitions API (https://developer.mozilla.org/en-US/docs/Web/API/View_Transi...) is intended to let you control transitions between clicks.
I mean, is this really a legitimate problem? Full page reloads don't bother me very much at all, and they actually come with a lot of niceties. Like URLs and the back button working normally.
For me personally, not usually. But having worked on a few different companies with embeddable widgets, yes it is. The page-based (SSG) routing is not an option there. And even in CRUDs the product folks want WYSIWYG and smooth uploads of assets. With more and more bling it's just inevitable that one will need a JS framework eventually.
Browsers haven’t left a flash of blank for decades.
That's what frames are for!