Live data from Hacker News

It's time for modern CSS to kill the SPA

jonoalderson.com

201–210 of 516 posts

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

#201
post #145

Earlier quoted context omitted.

You mean a chat cliënt? That seems a good worse case scenario. If you limit history to the most recent message (and have an link to the archive at the top) you could simply reload the entire page on some interval that declines with message frequency (and when you submit the form) Since the html document is pretty much empty the reload happens so fast you won't see the flashing. With transitions it would be perfectly…

> You mean a chat cliënt? Calling Discord "a chat cliënt [sic]" is barely one step removed from "I could build that in a weekend". So go ahead. Wait, what is stopping you?

No audience.

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

#203
post #148

Earlier quoted context omitted.

Generally speaking, companies don't want you to download their entire catalog. They don't want competitors to be able to analyze it easily like that. And if a store is selling books, it might have hundreds of thousands of them. No, it's not a good experience to transfer all that to the client, with all the bandwidth and memory usage that entails.

That's really weak argument. If it's one their website the competitors can write a simple crawler and create that catalog. And you don't have to send every single field you have in your database. Once the user selects a category you can send a metadata that enable the client to scaffold the UI. Then you cache the rest while user interacts with the site. Barnes and Nobles - according to their FAQ - has 1 million uniqu…

>I'll leave it as an excercise to figure out how much data you can fit into 30kb to make usable filtering system.

Not even 1 bit per item in the Barnes and nobles catalog? So not much.

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

#204

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…

SPAs are nice when your app requires complex state; multiple rows of nested tabs, modals, multiple interlinked select inputs which load data dynamically, charts or graphs which can lazy-load data and update on the fly in response to user actions. There is a certain level of complexity beyond which you need to load data on the fly (instead of all up front on page load) and you literally cannot avoid an SPA. Choosing t…

i remember seeing web components years ago, it sounds like they've improved a lot.

what do you do about the lack of (i assume) ecosystem? due to the ready ubiquity there's practically a library for everything. do you find that using WC you are having to hand roll a lot? i don't mean to be a package slave but for complex and tedious things like graphs / charts.

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

#205

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…

> and load up a giant pile of jQuery spaghetti I'll have you know I spent time on organizing and structuring my code with early JS design patterns like IIFEs to limit scope, lazy loading of modules, and minification. Anyway, in my experience, AngularJS was the biggest attempt at making structured front-end applications, and it really appealed / appeals (Angular is still very popular apparently) to Java developers; bi…

Wasn't there the Google closure compiler before angular?

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

#206
post #148

Earlier quoted context omitted.

Generally speaking, companies don't want you to download their entire catalog. They don't want competitors to be able to analyze it easily like that. And if a store is selling books, it might have hundreds of thousands of them. No, it's not a good experience to transfer all that to the client, with all the bandwidth and memory usage that entails.

That's really weak argument. If it's one their website the competitors can write a simple crawler and create that catalog. And you don't have to send every single field you have in your database. Once the user selects a category you can send a metadata that enable the client to scaffold the UI. Then you cache the rest while user interacts with the site. Barnes and Nobles - according to their FAQ - has 1 million uniqu…

> I'll leave it as an excercise to figure out how much data you can fit into 30kb to make usable filtering system.

Into 30kb? That's just 300 items at 100 bytes each. So not a lot?

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

#207

Earlier quoted context omitted.

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.

Honest question: Where are the places with low-bandwidth internet? Are we talking about cruise ships and satellites internet use cases?

Anyone attending a major event, or in a disaster zone. Things are getting better, but if you live near a ball park or something, there will be periodic times when your cellular Internet is unusable

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

#209
It's time for...

No, you found some tradeoffs and decided that the drawbacks are worse than the advantages. If industry disagrees, they tend to have their reasons, but as we love being tortured artists and really feeling our individualism, offbeat hot takes are always in demand.

That's all I see in quite a few HN titles ;D

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

#210
This article is getting a lot of pushback from the SPA champions, deservedly so, but it makes some good points to. I can’t be the only one, but I myself am getting very tired of the amount of websites where I have to sit and look at a skeleton loading for way too many seconds, then the data loads and it looks nothing like the skeleton. There is an over abundance of really crappy SPAs out there. Sorry not sorry
Post reply on HN