I received this email recently:
Subject: multi-page web apps
Hi Jeremy,
lately I’ve been following you through videos and texts and I’m curious as to why you advocate the use of multi-page web apps and not single-page ones.
Perhaps you can refer me to some sources where your position and reasoning is evident?
Here’s the response I sent…
Hi,
You can find a lot of my reasoning laid out in this (short and free) online book I wrote called Resilient Web Design:
https://resilientwebdesign.com/
The short answer to your question is this: user experience.
The slightly longer answer…
For most use cases, a website (or multi-page app if you prefer) is going to provide the most robust experience for the most number of users. That’s because a user’s web browser takes care of most of the heavy lifting.
Navigating from one page to another? That’s taken care of with links.
Gathering information from a user to process on a server? That’s taken care of with forms.
This frees me up to concentrate on the content and the design without having to reinvent the wheels of links and form fields.
These (let’s call them) multi-page apps are stateless, and for most use cases that’s absolutely fine.
There are some cases where you’d want a state to persist across pages. Let’s say you’re playing a song, or a podcast episode. Ideally you’d want that player to continue seamlessly playing even as the user navigates around the site. In that situation, a single-page app would be a suitable architecture.
But that architecture comes at a cost. Now you’ve got stop the browser doing what it would normally do with links and forms. It’s up to you to recreate that functionality. And you can’t do it with HTML, a robust fault-tolerant declarative language. You need to reimplement all that functionality in JavaScript, a less tolerant, more brittle language.
Then you’ve got to ship all that code to the user before they can use your site. It might be JavaScript code you’ve written yourself or it might be a third-party library designed for building single-page apps. Either way, the user pays a download tax (and a parsing tax, and an execution tax). Whereas with links and forms, all of that functionality is pre-bundled into the user’s web browser.
So that’s my reasoning. At least nine times out of ten, a multi-page approach is leaner, more robust, and simpler.
Like I said, there are times when a single-page approach makes sense—it all comes down to whether state needs to be constantly preserved. But these use cases are the exceptions, not the rule.
That’s why I find the framing of your question a little concerning. It should be inverted. The default approach should be to assume a multi-page approach (which is the way the web works by default). Deciding to take a JavaScript-driven single-page approach should be the exception.
It’s kind of like when people ask, “Why don’t you have children?” Surely the decision to have a child should require deliberation and commitment, rather than the other way around.
When it comes to front-end development, I’m worried that we’ve reached a state where the more complex over-engineered approach is viewed as the default.
I may be committing a fundamental attribution error here, but I think that we’ve reached this point not because of any consideration for users, but rather because of how it makes us developers feel. Perhaps building an old-fashioned website that uses HTML for navigations feels too easy, like it’s beneath us. But building an “app” that requires JavaScript just to render text on a screen feels like real programming.
I hope I’m wrong. I hope that other developers will start to consider user experience first and foremost when making architectural decisions.
Anyway. That’s my answer. User experience.
Cheers,
Jeremy
61 Shares
# Shared by Khalid ⚡ on Wednesday, September 13th, 2023 at 3:53pm
# Shared by Jeff Sonstein on Wednesday, September 13th, 2023 at 4:29pm
# Shared by Justin Ferrell on Wednesday, September 13th, 2023 at 4:29pm
# Shared by Brian LeRoux 💚 on Wednesday, September 13th, 2023 at 4:29pm
# Shared by Ashur Cabrera on Wednesday, September 13th, 2023 at 4:29pm
# Shared by Sara Joy ✨ on Wednesday, September 13th, 2023 at 4:29pm
# Shared by michel on Wednesday, September 13th, 2023 at 4:29pm
# Shared by James Nash on Wednesday, September 13th, 2023 at 4:29pm
# Shared by DNKrupinski on Wednesday, September 13th, 2023 at 4:29pm
# Shared by Jeremy Neander on Wednesday, September 13th, 2023 at 4:30pm
# Shared by Morbi on Wednesday, September 13th, 2023 at 4:30pm
# Shared by Leonidas Tsementzis on Wednesday, September 13th, 2023 at 4:30pm
# Shared by roughiain on Wednesday, September 13th, 2023 at 5:00pm
# Shared by Simon MacDonald on Wednesday, September 13th, 2023 at 5:00pm
# Shared by Eric on Wednesday, September 13th, 2023 at 5:00pm
# Shared by Joost van der Borg on Wednesday, September 13th, 2023 at 5:00pm
# Shared by Mario on Wednesday, September 13th, 2023 at 5:32pm
# Shared by Jean-Philippe Sirois on Wednesday, September 13th, 2023 at 5:32pm
# Shared by Cole Robison on Wednesday, September 13th, 2023 at 5:32pm
# Shared by rubenwardy on Wednesday, September 13th, 2023 at 5:33pm
# Shared by Sami Määttä on Wednesday, September 13th, 2023 at 5:33pm
# Shared by Minh Tran on Wednesday, September 13th, 2023 at 5:33pm
# Shared by Ville V. Vanninen on Wednesday, September 13th, 2023 at 5:33pm
# Shared by Ben Myers 🦖 on Wednesday, September 13th, 2023 at 5:33pm
# Shared by Robert Wetzlmayr 🇪🇺 on Wednesday, September 13th, 2023 at 5:59pm
# Shared by Saaste on Wednesday, September 13th, 2023 at 6:00pm
# Shared by Marius Gundersen on Wednesday, September 13th, 2023 at 6:00pm
# Shared by marie destandau - ototoï on Wednesday, September 13th, 2023 at 6:00pm
# Shared by Apple Annie :prami: on Wednesday, September 13th, 2023 at 6:00pm
# Shared by Robb on Wednesday, September 13th, 2023 at 6:31pm
# Shared by ZiyaWild on Wednesday, September 13th, 2023 at 6:31pm
# Shared by Simeon Nedkov on Wednesday, September 13th, 2023 at 6:31pm
# Shared by Šime Vidas on Wednesday, September 13th, 2023 at 7:01pm
# Shared by Chriztian Steinmeier on Wednesday, September 13th, 2023 at 7:01pm
# Shared by Carsten Bach on Wednesday, September 13th, 2023 at 7:31pm
# Shared by Joren on Wednesday, September 13th, 2023 at 7:31pm
# Shared by Manuel Matuzović on Wednesday, September 13th, 2023 at 7:32pm
# Shared by mrtnvh on Wednesday, September 13th, 2023 at 7:58pm
# Shared by Chase Seibert on Wednesday, September 13th, 2023 at 7:58pm
# Shared by akazzop@pouet.chapril.org on Wednesday, September 13th, 2023 at 8:25pm
# Shared by Simon Praetorius on Wednesday, September 13th, 2023 at 8:25pm
# Shared by Jamie Matthews on Wednesday, September 13th, 2023 at 8:25pm
# Shared by Thomas Broyer on Wednesday, September 13th, 2023 at 9:39pm
# Shared by g on Wednesday, September 13th, 2023 at 10:11pm
# Shared by Oblomov on Wednesday, September 13th, 2023 at 10:38pm
# Shared by Valtteri Laitinen on Wednesday, September 13th, 2023 at 10:38pm
# Shared by Anthony Bosio on Thursday, September 14th, 2023 at 12:12am
# Shared by Adam Perfect on Thursday, September 14th, 2023 at 1:07am
# Shared by Mathieu on Thursday, September 14th, 2023 at 1:37am
# Shared by jlebleu@framapiaf.org on Thursday, September 14th, 2023 at 3:43am
# Shared by Tony Mottaz on Thursday, September 14th, 2023 at 4:07am
# Shared by Okko Ojala on Thursday, September 14th, 2023 at 4:40am
# Shared by Martin B on Thursday, September 14th, 2023 at 5:39am
# Shared by Ronnie André Bjørvik Sletta on Thursday, September 14th, 2023 at 5:39am
# Shared by Ange Chierchia on Thursday, September 14th, 2023 at 11:39am
# Shared by thebigreason on Thursday, September 14th, 2023 at 2:13pm
# Shared by Duncan Lock on Thursday, September 14th, 2023 at 10:51pm
# Shared by Chris Taylor on Friday, September 15th, 2023 at 6:34am
# Shared by Åke Järvklo on Friday, September 15th, 2023 at 8:09pm
# Shared by Graham Harper on Saturday, September 16th, 2023 at 9:24am
# Shared by Kolombiken on Saturday, September 16th, 2023 at 2:55pm