Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

401–410 of 516 posts

Re: It's time for modern CSS to kill the SPA

#401

Earlier quoted context omitted.

It’s connected with the questions around occupational licensing of programmers, unions, and similar structures which would not be so much about getting paid more but about getting quality up, squashing bullshit, and getting our quality of life up. Without a cohesive community, mutual respect, and recognition of a shared body of knowledge, we don’t have the solidarity to make it happen. As for Laravel, I’d say people…

> The OG web was missing a few things. Forms were usually written on one HTML page and received by a separate cgi-script. To redraw the form in case of errors you need one script that draws the form and draws the response and a router that choose which one to draw Yes, I was there, I wrote and used these pages. It sucked. Things are better now. > So the knowledge to build the form applications we were building in 199…

I've been in a happy place with React with some projects.

I've worked on some where it was valid choice but boy the annoyances, like not being able to test your components because you're on an old version of React where your test framework can never know when the last render happened because you depend on a large number of components which don't believe they'd run on the current react but probably would if you could just vendorize 30 or so packages and patch their package.json files.

Or depending on a test framework that refuses to look up components by class, id or selector because they want to force you to use aria, even when it doesn't make sense such as in three.js.

Or depending on a routing framework that doesn't get maintained, instead they've been through 7 incompatible versions of it which leaves me thinking that they didn't ever believe in what they were doing.

Or having to understand the internals of 5 CSS frameworks (including JS-heavy frameworks like Emotion) to handle all the components you've sucked in and still understand raw CSS through-and-through to fill the gaps.

I worked on one system which was frankly experimental at a startup that was doing two week sprints building a tool called "Themis" for building ML training sets. The thing was that we were always having to add new tasks and between Docker and an overengineered back end and front end it took 20 minutes to go from source code to being able to interact with the thing, so it took a 20 person team and lots of coordination between FE and BE engineers to do the simplest things.

I sketched out an alternative called "Nemesis" which grew into an HTMX-based system where it takes one programmer an hour to code a task and there is no build, and between Flask and the 15-or-so helpers it is easy. I've hacked it to be an RSS reader, an image sorter, and several other centaurs:

https://mastodon.social/@UP8/114887102728039235

this feels like a desktop app when I am on the LAN and loads well under a second on a mobile hotspot the first time and every time. The key is that the tasks are nearly completely independent of each other, there are no builds and no dependencies, so writing a new task can't break old tasks. That system has plenty of screens that use d3.js for awesome visualizations and if I wanted to make a task that did something complicated which would really deserve React or Svelte or something I could do it, again, without breaking the the other tasks.

Re: It's time for modern CSS to kill the SPA

#402
post #237
post #10

SPA is not only about seamless transitions but also being able to encapsulate a lot of user journey on the client side, without the need of bothering server too much. Let me give you an example - one of my biggest gripes about web ux is the fact that in 2025 most shops still requires you to fully reload (and refetch) content when you change filters or drill down a category. A common use case is when you come to a sho…

Please no. Whenever I see an online store as a SPA catalogue I shudder, because it usually breaks after browsing a bit in a weird state. And it resets to somewhere random should you hit back, refresh or try to send a link to somebody.

Yes, SPAs should store simple user state in the URL as well.

Re: It's time for modern CSS to kill the SPA

#403

"It’s faster, simpler, and better for everyone." For who? In the modern day and age most devices can handle some JavaScript just fine. The DX provided by front end frameworks/libs is just unrivaled. Vanilla JS/jQuery work fine for small stuff, things quickly get out of hand in complex projects, when you have to bake in things like UX, validations, and have to program around the limitations of HTML. I'm confused as to…

> The DX provided by front end frameworks/libs is just unrivaled

How? I spent 6 months exploring React, Vue, Node, Next,...

The DX for all of them sucks. The documentation sucks. Everything is wrappers of wrappers of npm scripts of wrappers of bootstrappers of boilerplate builders of...

Seriously. The worst.

Re: It's time for modern CSS to kill the SPA

#404

Earlier quoted context omitted.

Developer experience - Yes, in most cases. Performance - No, in most cases. User experience - No, in most cases. What are you talking about. Majority of SPAs have abysmal performance compared to regular HTML rendered websites and that reflects poorly on user experiences.

> Developer experience - Yes, in most cases. I think if people remembered how productive you could be before the SPA frontend/backend split they'd reconsider. Being able to take a feature from A to Z without either context-switching between ecosystems or, even worse, involving other people, was incredibly productive and satisfying. Not to mention a much more streamlined dev env without a bloated js ecosystem of bundl…

I write an SPA for my day job. I write Postgres queries myself. I create endpoints and background workers and cron jobs myself, and I build out the UI myself. It’s all typescript with static types end-to-end. It’s a fantastic developer experience. Much, much better than I ever had in Rails or ASP.NET.

Also, I love components for UI as opposed to templates. And I don’t think I could ever really go back to the way I did things in my MPA days.

Re: It's time for modern CSS to kill the SPA

#406

Earlier quoted context omitted.

The toupee fallacy strikes again here. Gmail, slack[0], Netflix and Spotify are top tier examples - they actually work. Most are true garbage though. [0] I am firmly on the slack-performance-is-a-disgrace train, but their web client is a great example of a well done SPA - it’s miles better than the app other than notifications.

Gmail really? The same one that takes 10-20 seconds on 5G to even show the loading page? What is it doing in that time? Loading emails or downloading an AAA game? It is not just a one time penalty either, you reload and get the same loading page again. Just a few days ago I had to get an OTP via email and it was completely frustrating. No indication nothing, just a loading circle. The old MPA version was much better.

If it was built like we were in 1995, with tables and html 3.2 without JavaScript and just the old school inline attribute styles, it would be way more usable

Re: It's time for modern CSS to kill the SPA

#407

Earlier quoted context omitted.

It’s extremely hard to use reliably. Anyone enthusing about this API hasn’t done much with it.

What exactly hurt the reliability? Early on, I often ran into false starts because I did not pay enough attention to proper render blocking.

It’s a ridiculous API that is way too complex.

Try using it and you'll see.

It takes huge amount of setup which it then seems to pay attention to or not, depending on his knows what factors.

Go ahead try it for something beyond basic usage then tell me how reliable and easy it was.

Re: It's time for modern CSS to kill the SPA

#408
It is possible to deliver a lite, PWA/SPA with vanilla JS and no loading spinners. Users can install it on their mobile device. I've done as much with blockchain dApp front ends. It isn't necessary to hijack the address bar or abuse the back button to achieve this. Modal dialogs, collapsible elements, tabs and simple anchor elements are enough. Yes, you can allow in-app back buttons to return to the previous modal's state, although that might suggest that the UI pattern should be simplified.

"State management" from a framework seems ridiculous. Developers should be able to handle their application's state with JSON objects representing reasonable abstractions of concerns. Typically, this would be similar to the data you query from the web. Therefore, upon launch, you can populate your document using elements from cached data in localStorage or some of the newer options. When network connectivity is available, you can update the state using the same functions.

Perhaps this isn't something you would trust your large enterprisey team to do competently, but for a solo developer with a distaste for React and heavy frameworks, it seems like the obvious approach.

Interested to hear how others building sans frontend frameworks. If you love React and loading spinners by all means feel free to ignore this. To each their own.

Re: It's time for modern CSS to kill the SPA

#409
But designers will always find a way to make our live miserably. They are told to never accept same behavior and always press users to there way of navigation and thinking. The bullshit they call design is there way of expression

Re: It's time for modern CSS to kill the SPA

#410
post #10

SPA is not only about seamless transitions but also being able to encapsulate a lot of user journey on the client side, without the need of bothering server too much. Let me give you an example - one of my biggest gripes about web ux is the fact that in 2025 most shops still requires you to fully reload (and refetch) content when you change filters or drill down a category. A common use case is when you come to a sho…

> SPA is not only about seamless transitions but also being able to encapsulate a lot of user journey on the client side, without the need of bothering server too much.

True, but as a user, I don't want you encapsulating my journey. You can wax poetic about hypothetical book categories, but the reality of SPAs is that they break back buttons, have terrible accessibility anti-patterns, attempt to control my attention, and expose my computer to all your bad security practices. SPAs usually contain half-assed implementations of half the features that ship standard in a modern browser, and the only motivation for all that effort is to make the site more favorable to the server's owner.

When a site is implemented with simple HTML and careful CSS, I can configure it to my needs in the browser quite easily. That's a site that favors me, not your opaque blob nonsense.

Post reply on HN