Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

31–40 of 516 posts

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

#31
post #22

Earlier quoted context omitted.

You really don’t need the frameworks for web apps either.

I guess you never worked on a complicated web app that was 100% jQuery, because web frameworks were not a thing yet.

I did, around 15 years ago. It was honestly not that bad.

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

#32

SPAs make sense when your users have long sessions in your app. When it is worth the pain to load a large bundle in exchange for having really small network requests after the load. Smooth transitions are a nice side effect, but not the reason for an SPA. The core argument of the article, that client-side routing is a solution for page transitions, is a complete misunderstanding of what problems SPAs solve. So absolu…

Low-bandwidth/spotty connections (combined with aggressive caching) are one of the strongest cases in favor of SPAs (emphasis on the A for Application, not website). Visit (and cache) the entire frontend for the app when you have a good-enough connection, then further use of the app can proceed with minimal bandwidth usage.

Latency might even be more relevant than bandwidth. Especially if it's a good SPA, that uses optimistic updates (or sync), and some kind of caching for fetching data (tanstack query or similar).

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

#33
Websites and apps that feel like quality are generally made by people who can achieve it. You'll get shit static sites or shit SPAs if you have shitty devs. It's not beyond reason. If you are shitty chef, your food is going be shitty. So yeah, here's the big secret about programmers:

They are mostly shitty

---

Interestingly, every landing page or website for recent AI apps have looked AMAZING. Designers and standard website developers are totally on point. It's just, crappy developers who can't create a rich experience on top of incredible design that's the issue. CSS is not going to fix what can't be fixed (some people are not supposed to be in this profession, but hey, it pays ... for another three or so years).

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

#34

SPAs make sense when your users have long sessions in your app. When it is worth the pain to load a large bundle in exchange for having really small network requests after the load. Smooth transitions are a nice side effect, but not the reason for an SPA. The core argument of the article, that client-side routing is a solution for page transitions, is a complete misunderstanding of what problems SPAs solve. So absolu…

I don't know if a bunch of sloppy jQuery modules were ever really a viable option for an SPA. People tried to do it, sure, but I'd say the SPA era really started with backbone.js

[deleted]

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

#35
post #17
post #8

Earlier quoted context omitted.

What do you mean by 'interactive like a native app'? The article is focusing on two main parts of making things feel like an app: page view transitions and speed/preloading. To me, those seem like a big part of what makes a site/app feel interactive. And letting the browser do the work and having real URLs has other huge benefits I appreciate. But agree that for things like GMail, etc, a SPA approach definitely makes…

Imagine Gmail, ChatGPT, Slack, and so on as server side rendered websites, but with smooth transitions. This wouldn't work at all. Let's take slack as an example. We had those chat websites 20 years ago. The thread was in it's own frame and got periodically reloaded. It's just bad UX.

I think you're using "single-page app as opposed to no or limited JS on the client" while an alternative would be "single-page app as opposed to multi-page app". There's no reason you have to implement something like Slack by reloading an iframe.

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

#36
post #22

Earlier quoted context omitted.

You really don’t need the frameworks for web apps either.

I guess you never worked on a complicated web app that was 100% jQuery, because web frameworks were not a thing yet.

What if I told you that you didn't need jQuery either.

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

#37

This argument is tired and ignorant. Try building linear.app without a SPA framework. The idea that "Native CSS transitions have quietly killed the strongest argument for client-side routing," is dubious at best.

This doesn't seem fair to say. Linear is special even among SPAs; it's by far not the norm. No one said "ban SPAs and remove javascript from the browser".

Linear's speed comes from being "offline-first", but I challenge you to name almost any other product in common usage that does it that way. It's just not common. On the other hand if I want to buy tickets I'd rather most of that website be SSR and do SPA where you actually still need it. Or forums, news sites, blogs, and informational sites.

There is so much out there that would be better developed with SSR and then use CSS to make it feel SPA-like than to actually be a SPA.

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

#38
post #35
post #17

Earlier quoted context omitted.

Imagine Gmail, ChatGPT, Slack, and so on as server side rendered websites, but with smooth transitions. This wouldn't work at all. Let's take slack as an example. We had those chat websites 20 years ago. The thread was in it's own frame and got periodically reloaded. It's just bad UX.

I think you're using "single-page app as opposed to no or limited JS on the client" while an alternative would be "single-page app as opposed to multi-page app". There's no reason you have to implement something like Slack by reloading an iframe.

Not reloading the document via HTTP while updating the content is the definition of a SPA.

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

#40
SPAs are not about view transitions. TFA implies that fancy transition is important between pages (wrong!) and blames a "CMO" or "brand manager" rather than challenging their own preconceptions and exploring the value an SPA does add:

- excellent frameworks for client side logic (interactivity) - separation of concerns (presentation logic vs. backend) - improved DevEx => inc. speed of development => happiness for all

The sad thing is that an article like this will get plenty of eyeballs due to comments like my own adding to the algo, but it should have never made it above the fold.

Post reply on HN