3 ms·
Some of the tradeoffs are paid more by different parties. For example, sending out scripts instead of content was (presumably? I don’t do webdev) easier for the
by bee_rider 3y ago
Some of the tradeoffs are paid more by different parties. For example, sending out scripts instead of content was (presumably? I don’t do webdev) easier for the developers. But it has a cost to the customers (wasting battery, starting up this crazy ecosystem where the expectation is we’ll just download scripts from the internet and run them).
When only one side pays the price, I think it isn’t that surprising that it gets dogmatic. Because there isn’t any trade off, really, for me as a user, getting scripts is simply bad, and getting plain old documents is simply good. Where’s the nuance or tradeoff? I don’t care if setting up a static site generator takes more time or is harder or whatever, I only see the output, which is obviously better in one case.
In the case of web devs talking to web devs, I’m not sure, having not been in that room. But from an outsider point of view, it seems like some sites care about this sort of thing and others just don’t. Maybe which parties are included in the cost calculation is basically an axiom, not really something that can be logic-ed out, and so it tends toward dogmatism and statements of preference? (hopefully I’ve accurately represented the fact that this is 100% a comment from the user point of view, so heap of salt and all that).
- joshuaissac 3y ago> I don’t care if setting up a static site generator takes more time or is harder or whatever, I only see the output, which is obviously better in one case. Don't these static site generators serve the scripts that you do not like? On a statically-generated site, the dynamism of the site is in the script and is evaluated in your browser. On a non-static site, the server does the evaluation, so your browser does not have to run as many scripts for the same level of dynamism.
- throwbadubadu 3y agoNope, you got it mixed around..
- foolswisdom 3y agoSounds like you're using the concept of statically served files vs dynamically generated, but that's a different conversation to whether content files are generated at all.
- miki123211 3y ago> getting scripts is simply bad, and getting plain old documents is simply good This isn't that simple IMO. On one hand, JS-heavy apps take longer to load on underpowered devices and slow connections, which should be treated as an accessibility concern. On the other, approaches like LiveView, HTMX or even plain old HTML struggle on high-latency or spotty connections. A well designed SPA can cache data locally and push changes whenever internet connectivity comes back, making it feel a lot snappier in these situations. SPA apps are harder to write because you have an extra API layer, but you need one anyway if you're also writing a mobile app, so they may even become slightly easier in that situation. Every solution has its tradeoffs.
- klysm 3y agoYou’re getting at just one axis of a larger trade off space. Yes serving scripts move compute cost to the browser, but you can also gain a lot of latency wins (which are sometimes critical) by having more compute on the client.