The View Transitions API is beautiful and I can't wait for it to become widely available. I've soured on SPAs in the past few years. So much more can be done with standards than people realize. SPAs were best for specific use cases but we made them the default for everything. Marketing pages are built in React! Basic pages with marketing copy have a build step and require hundreds of megabytes of dependencies. Like t…
It's time for modern CSS to kill the SPA
361–370 of 516 posts
Re: It's time for modern CSS to kill the SPA
#362Earlier quoted context omitted.
Every web framework is _literally_ a hack to make the web something it isn’t This sentence is doing an awful lot of heavy lifting that doesn't fit with reality
Ya this is nonsense. The web is what it is. You could maybe say "every framework is a hack to workaround protocols primarily designed in the 90's before we really understood the full application of the web"
Re: It's time for modern CSS to kill the SPA
#363(I do agree that SPA is waaaaaay overused and most of them would work just as well with server side logic with less complexity.)
Re: It's time for modern CSS to kill the SPA
#364Earlier quoted context omitted.
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…
> You miss the whole point and the author is correct about this: your comment is funny, because you are so wrong you aren't even aware how and why you are wrong. It's in "not even wrong" territory. I'll explain you why. > Modern CSS is powerful, and HTML is the way to deliver web content. Irrelevant. That's not why the world uses JavaScript frameworks. It seems you aren't even aware of the most basic reasons why the…
> The most basic reasons are performance (and perceived performance), not only because the require less data to be moved around the internet but also every flow doesn't require full page reloads.
I can't keep a straight face at this one. If there's one thing the web isn't anymore, it's "fast." Presumably what you are getting at is server performance, because it's pushing all the work to the client.
Anyway there's a good talk on this - https://veryinteractive.net/pdfs/ceglowski-thewebsiteobesity...
> > Every web framework is _literally_ a hack to make the web something it isn’t.
> You are clearly talking about things you have no understanding over. It matters nothing if you specify a DOM with a static file or procedural
Don't be so dismissive. This is like the old anecdote about one fish saying to the other, "how's the water." The "something it isn't" is stateful. The web was not designed to be stateful, and every web framework is indeed a hack to work around that.
Re: It's time for modern CSS to kill the SPA
#365SPAs 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…
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…
Re: It's time for modern CSS to kill the SPA
#366Earlier quoted context omitted.
Every web framework is _literally_ a hack to make the web something it isn’t This sentence is doing an awful lot of heavy lifting that doesn't fit with reality
Ya this is nonsense. The web is what it is. You could maybe say "every framework is a hack to workaround protocols primarily designed in the 90's before we really understood the full application of the web"
Re: It's time for modern CSS to kill the SPA
#367Earlier quoted context omitted.
> in exchange for having really small network requests after the load. I'd love to see examples of where this is actually the case and it's drastically different from just sending HTML on the wire. Most SPAs I've worked on/with end up making dozens of large calls after loading and are far far slower than just sending the equivalent final HTML across from the start. And you can't say that JSON magically compresses som…
With HTML you have to send both the template and the data. With json, it's just the data. So it's less information total. It should compress a little better, but I don't have stats to back that up.
Re: It's time for modern CSS to kill the SPA
#368Everyone is completely missing the point of this article, which I find amusing and terrifying in equal measure. He is _not_ talking about a SaaS dashboard SPA. He's talking about marketing sites and other content heavy stuff like blogs, landing pages, etc. It mentions this in many places if you go past the headline. He is completely correct. SPAs should not be used for marketing sites full stop. Perhaps there are som…
You of course don’t need 10MB of JS for a React blog or 120MB for an e-commerce site. You’re not mad at SPAs, you’re mad at bad developers.
Re: It's time for modern CSS to kill the SPA
#369Earlier quoted context omitted.
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…
> You miss the whole point and the author is correct about this: your comment is funny, because you are so wrong you aren't even aware how and why you are wrong. It's in "not even wrong" territory. I'll explain you why. > Modern CSS is powerful, and HTML is the way to deliver web content. Irrelevant. That's not why the world uses JavaScript frameworks. It seems you aren't even aware of the most basic reasons why the…
If you call every hierarchy of visual items with some kind of layout manager(s) a DOM, then yes. Notably, the D doesn't really apply because GUIs aren't documents, and that's exactly why HTML is kind of awkward for GUI programming: it was initially designed for documents.
Edit: Sibling comment makes the good point that the main difference is that GUIs have mutable state while documents don't. I would add that GUIs also have controls to change that mutable state, which is a more superficial difference, but well, web-based GUIs are still extremely varied in their interaction styles, which not necessarily good.
Re: It's time for modern CSS to kill the SPA
#370Earlier quoted context omitted.
HTMX (and similar) solves a lot of this. It so happens that we end up building two apps one frontend and one backend with SPAs as built today. I'd rather build a lot of it on the server side, and add some dumb interactivity on the client (show/hide, collapse/expand, effects). There is still a place for SPA though.
HTMX does the opposite of this, it requires many more round trips to the server instead of using client side JS to do work.