News for hackers. Stuff that matters.
Re:Do not build your Gov.uk service as a single-page applica... by mentalgear on Sunday September 29, 2024 @08:10AM (#41686776)
This advise may have been correct for old-school SPAs, but most if not all points should be fixed in the current generation. E.g. first page load is static or SSR, and then the page is hydrated as a accessible SPA including url manipulation. Also automatic a no-js fallbacks are provided with many.
Re:Do not build your Gov.uk service as a single-page applica... by wild_egg on Sunday September 29, 2024 @08:29AM (#41686866)
Having to deploy a dedicated server unit to render your frontend is a lot of additional complexity for zero benefit when you still require an API server to actually drive everything.

Have your API server render the HTML itself and your entire stack becomes radically simpler. Iteration speed goes through the roof.

If you're not building Google Sheets, skipping the entire SPA universe provides massive benefits with no notable downsides. The same UX can be provided either way but often with improved performance which actually means a better UX

Re:Do not build your Gov.uk service as a single-page applica... by mrthrowaway999 on Sunday September 29, 2024 @08:39AM (#41686922)
Why bring in all that extra complexity in the first place, even if it works?

Unless there's a good reason to, like long-lived sessions or a complex, updating UI, then I can't think of a reason to send a truckload of js to the user that eats through their CPU like a baby eats through a tub of icecream.

Not everyone in the world is sporting the newest MacBook and iPhone. Hell, I'm using a pixel 8 and some sites or components take _seconds_ to load (eg. Twitter search drop-down).

Re:Do not build your Gov.uk service as a single-page applica... by pylua on Sunday September 29, 2024 @08:42AM (#41686946)
Yeah— I was thinking the article was not being fair. That said, try using a website across a wide variety of browsers and os and you will get a wide variety of interpretations. Since it’s a government website that is not acceptable.