Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

311–320 of 516 posts

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

#311

Earlier quoted context omitted.

But this bank's old MPA worked pretty well. By trying to modernize it they completely broke it instead.

I’d put big money on it not being the same team that made the new app.

Probably. The old website was several decades old.

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

#312

Earlier quoted context omitted.

Gmail takes 3s to load. And HN is a website, not an app.

How is HN not an app? All the content is user generated. Everything is interactive. What's the difference?

Most of the time spent is content consumption (viewing html documents), rather interaction (which is only 2 simple actions).

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

#313

Lots of pushback here in the comments. But I can't think of the last time I enjoyed using a SPA website over a multi-page one. The initial loading feels delayed, the page scrolling feels unnatural and jarring (completely opposite of how a native app feels). Also, one of my banks recently changed their old website to a new SPA one. And it is now completely useless. It can't load information in time, so most of the for…

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.

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

#314

It's worth noting that the Speculation Rules API and the View Transition API are not stable in Firefox and therefore aren't supported by all major browser.

yeah, if it's not in firefox it doesn't count. https://bugzilla.mozilla.org/show_bug.cgi?id=1823896 also mobile safari so basically all iphones.

It does appear to be supported by iOS Safari 18.2+, which is the majority of iOS users.

https://caniuse.com/?search=view%20transitions

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

#315

Earlier quoted context omitted.

This article is full of misrepresentations and lazy takes. The author has had other anti-JS polemics widely upvoted on HN, which were just as carelessly written. But people upvote it anyway. What is the cause of this? 1. Bad experiences with JavaScript apps that have aggregated complexity (be it essential or incidental complexity)? 2. Non-JS developers mystified and irritated at a bunch of practices they've never rea…

You miss the whole point and the author is correct about this: Modern CSS is powerful, and HTML is the way to deliver web content. Every web framework is _literally_ a hack to make the web something it isn’t. People who haven’t seen the evolution often pick up the bad habits as best practice. For thise JavaScript people, I recommend trying Laravel or Ruby/Rails. And then once you realize that JavaScript sucks you’ll…

Laravel is fine. It's not amazing. Like most "Modern PHP" it exhibits a Java fetish and when used carelessly can degrade into an upside-down impression of Enterprise J2EE patterns (but with an almost non-existent type system).

What I find interesting though is the assumption that web dev is done by "JavaScript people", that even the best "JavaScript people" have no technical breadth, and therefore fester in a cesspool of bad ideas, unlike your median backend dev who swims in the azure lakes of programming wisdom.

Now, I've done plenty of SPAs, but I've also done plenty of other things (distributed systems, WebVR apps, metaprogramming tools, DSLs, CLIs, STB software, mobile apps, a smidgeon of embedded and hobbyist PSOne games). Which gives me the benefit of a generalist perspective.

One thing I have observed is that in each silo, there are certain programmers who assume they are the only sane group in the industry. They aren't interested in what problems the other siloes are solving and they assume any solution "over there" they don't understand is bad / decadent / crazy.

These groups all regard each other with contempt, even though they are largely addressing similar fundamental issues in different guises.

It's a social dynamic as much as any technical one.

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

#316

Earlier quoted context omitted.

This article is full of misrepresentations and lazy takes. The author has had other anti-JS polemics widely upvoted on HN, which were just as carelessly written. But people upvote it anyway. What is the cause of this? 1. Bad experiences with JavaScript apps that have aggregated complexity (be it essential or incidental complexity)? 2. Non-JS developers mystified and irritated at a bunch of practices they've never rea…

You miss the whole point and the author is correct about this: Modern CSS is powerful, and HTML is the way to deliver web content. Every web framework is _literally_ a hack to make the web something it isn’t. People who haven’t seen the evolution often pick up the bad habits as best practice. For thise JavaScript people, I recommend trying Laravel or Ruby/Rails. And then once you realize that JavaScript sucks you’ll…

Even with Laravel you will write lots of Javascript unless you go for blade templates or that other templating thing. Javascript is also great for making the web interactive. Maybe the sheer amount of SPAs out there shows us what we really want from the web. Most things ppl use in their day to day life cant be built with HTML and CSS only

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

#317
post #92

Earlier quoted context omitted.

> Startups and SV jerk each other off by promoting each other (think affiliates). None of it means shit. No, this is FB ceding the battle. They absolutely didn't want this. They dropped CRA because social media celebrities were shitting on CRA. Dan Abramov had to do a complete 180 in a single day, after writing a long thoughtful essay in defense of CRA.

Wars, battles, personalities on social media… I don’t want to sound too much like a grouchy old man but these frameworks are tools. Nothing more than that. I can’t understand why anyone would become emotionally invested in any of them. When starting a project the right move to examine what best fits your project, not which one was recently victorious in a war. I’ve grown to dislike React because I see it being abused…

> I can’t understand why anyone would become emotionally invested in any of them.

I think that's simple: because they are financially invested in them. That's obvious for the developers working on the frameworks themselves or building libraries / plugins / UI-themes for them, but I believe it's also correct for "normal" developers who build things with these frameworks.

They know these frameworks and can use them, and they've made an investment in time to get to that point. Likely they're also making at least some of their money _because_ they know these frameworks. Emotional attachment follows the economic attachment, and then you'll get plenty of rationalizations.

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

#318

Earlier quoted context omitted.

This article is full of misrepresentations and lazy takes. The author has had other anti-JS polemics widely upvoted on HN, which were just as carelessly written. But people upvote it anyway. What is the cause of this? 1. Bad experiences with JavaScript apps that have aggregated complexity (be it essential or incidental complexity)? 2. Non-JS developers mystified and irritated at a bunch of practices they've never rea…

You miss the whole point and the author is correct about this: Modern CSS is powerful, and HTML is the way to deliver web content. Every web framework is _literally_ a hack to make the web something it isn’t. People who haven’t seen the evolution often pick up the bad habits as best practice. For thise JavaScript people, I recommend trying Laravel or Ruby/Rails. And then once you realize that JavaScript sucks you’ll…

Are you aware that nowadays you can write SPAs in dozens of languages?

It's an entirely different concept. It's certainly not the right technology for a news site, but days ago in a different place, there was for example the discussion about how an SPA and minimalistic API services fit a lot better with your average embedded device.

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

#319

Earlier quoted context omitted.

> ...if you shared that misunderstanding of SPAs and used them to solve the wrong problem, this article is 100% correct. Agreed. The article was a frustrating read. The author is an SEO consultant. SEO consultants likely have a heavy focus on marketing websites. Actual apps and not marketing websites do benefit significantly from SPA. Imagine building Google Maps without SPA. You can animate page transitions all you…

to be fair to both points: he has a really warped view that SPAs are somehow purely about routing. he does correctly point out that a lot of sites could and should be treated as sites not apps.

SPAs are about APIs, and leaving the rendering entirely to the client.

It's a reimagination of ye Olde three tier approach. Perfect for apps.

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

#320
post #180

Earlier quoted context omitted.

Performance, developer experience, user experience

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 bundlers/compilers and whatnot.

Post reply on HN