160 comments

[ 0.26 ms ] story [ 121 ms ] thread
Good post, but:

> A venerable web application pattern that has had a small modern renaissance thanks to Remix

Remix is not that popular. I don't think attributing this to remix is accurate. Next.js quite possibly.

People who built a crappy website using React are just as likely to build a crappy website using Astro, HTML-first approach or any other technology
I was a little confused by "doubled our users" since that's more about inbound traffic than site experience. I guess it's really shorthand for "halved form abandonment" which is still pretty great.
Empathy and respect for users is what product managers should be doing.

Shipping tens of megabytes per web page is impolite, if not outright disrespectful to users.

Maybe this is heretical in today's AI hype climate but...weirdly due to the rise of AI, then AI-slop polluting everything, a lot of old fundamentals are coming back. Clear, well-structured, descriptive content on a well-built page has a better shot of being picked up for SEO/AEO/whatever which are the same best practices from 2005. A lot of these tips and tricks and hacks just aren't going to move the needle as much anymore imo.
> this was a regulated monopoly, and if their customer satisfaction dropped below 96% (if I remember correctly) it could result in millions of pounds in fines.

OK, I'm still at the beginning and irrelevant to the article, but as a USA-ian, I am so jealous about that. Unheard of here.

Having been building websites since the mid 90's, I laugh at terms like "HTML-first website"
Interesting they went with Astro.Makes sense for a form-heavy site. No JS until you need it,and it handles page transitions cleanly.
Designing for failure modes (bad network, old devices, no JS) often leads to better systems even in the happy path. This is a good case study of that.
Most of my apps are now simply HTMX + Go + SQLite.

I've found it's enough for most projects.

One of my sites is image heavy and serves 10 TB of traffic per month. For this, I use the following setup:

1. S3 (I wanted reliable data storage) 2. In front of it, I have Cloudflare (with Tiered Cache enabled, which makes POPs prefer pulling from Cloudflare rather than the origin). I've set rules to cache everything on both the browser and Cloudflare for 1 year, ignore origin cache policies, ignore query strings, etc., and I simply use immutable objects that require revisioning. 3. BunnyCDN in front

Cloudflare will not let you run an image heavy site on its own, so I use this approach to massively cut the bills. Their policy says you cannot use it primarily for images; it must be used for HTML, CSS, JavaScript, and other site content.

And if you run only S3, the bills will be huge.

But yes, lately I’ve been building mobile apps. PWAs are limited; the OS can evict IndexedDB storage, so I cannot offer people reliable data storage in the app without sign up or involving a backend.

What can I do? So I was forced to switch to Flutter on Android, but I ran into another pain point: app updates sometimes spend a lot of time "under review," which is frustrating. For the same app, I maintain a web app that is very quick to update by comparison.

I wonder why there isn't a mobile OS that simply lets you build apps with JavaScript, HTML, and CSS and gives you reliable storage without all this effort.

I like how quickly you can update PWA app.

I've learned about several frameworks that are system language + web frontend. The general approach is, ship a small binary compiled for the specific platform, and use the platform's native browser (and whatever html frontend tech you like) for frontend. The whole binary can be 1mb or less.

There's a couple of Rust libraries like this; right now I'm building an app in Tauri+Svelte.

It looks like Wails might be a similar framework in Golang.

have you considered Capacitor? it works pretty well for cross platform web development
> Cloudflare will not let you run an image heavy site on its own

Cloudflare R2 object storage is S3-compatible, offers free egress, and does not share their CDN product's fair use policy against image-heavy use. Storage is 65% the per-GB cost of S3.

> I wonder why there isn't a mobile OS that simply lets you build apps with JavaScript, HTML, and CSS and gives you reliable storage without all this effort.

There WAS. Firefox OS phone! HTML+CS+JS apps! But Mozilla kicked it to the graveyard even though it was very popular in third world nations. I guess it was not $$$$$ enough for the Mozilla CEO of that era.

Recently I had to migrate an old SpringBoot app that had a React front-end to a new cluster. Not wanting to mess with super-old dependencies, I opted to rewrite it on a new version of Java/SpringBoot. When it came to the frontend, I paused. I couldn't come up with a single good reason why this app needed React. I rewrote the frontend in straight HTML with a little bit of JavaScript for DOM manipulation. I literally used `var` instead of `let/const` just to drive the point home... (yes, that was overkill). But you know what I didn't need? A BUILD PROCESS! No npm deps. No vite/rsbuild/etc. It was like I had forgotten we could even DO that.

Don't get me wrong, I actually have enjoyed React over these past 10 years. But, including it blindly is just silly.

If you're a "React person", as the article puts it, friendly reminder that you can render components to HTML and serve that to the user.

I have done exactly that on a project that was under similar constraints. The UI models live in .tsx files and the browser gets pure HTML with zero JS by default.

in the bio ... "has over twenty years of experience building highly accessible and usable web applications"

why not take the html5 standard (see https://html.spec.whatwg.org/ ) and if needed (dont think so for these use cases... "for clients ranging from energy companies to political parties") htmx or alpinejs ...

Totally agree, gov pages should be widely accessible. Also gov services should NEVER mandate internet access. There should always be a way for tech-illiterate people to ask someone, and fill their forms
My go-to for spinning up a site has been Jekyll + Bootstrap with the occasional bit of React for well over 10 years now.

While it still does the job, I'm a little curious to explore more modern options, if for nothing else to understand the choices a more junior dev would face/make today.

I'm seriously considering giving Atro a go. Is it worth it?

I built apps like these on GOV.UK over 10 years ago for the Ministry of Justice. We built our own form wizard library that let us validate long forms in steps and break them out into multiple pages because Ruby on Rails didn't support doing that out of the box. It was a very important principle back then that everyone should be able to make use of these digital services regardless of whatever users were using to access them.
Great work. The gov.uk site is a beacon of light on the web.
It shows just how far gone webshit is when the obvious must be stated time and time again
"I took a very bold decision and built a new version of the site using Astro"
It'll be replaced by a new react app within a few hires lol
> Javascript and modern CSS should be used to enhance the experience

When messing around with my blog's Javascript, this mantra is so thoroughly embedded into writing it, that I try to include "enhance" in function names where it makes sense. I might have to do likewise with my CSS.

All the text is invisible for me in Firefox on Linux when the `--font-body` is set to `"Atkinson", sans-serif`. Setting it to `"Atkinson Hyperlegible", sans-serif` fixed it.
> […] it always worked even without javascript. He was appalled and said, “but that’s a lot more work for us.”

Is it more work?