5 ms·
This. This gets us 98% of the way. The people that have to worry about the 2% are not you, because your web app almost certainly doesn’t need offline-first of F
by arbenpurben 4y ago
This. This gets us 98% of the way. The people that have to worry about the 2% are not you, because your web app almost certainly doesn’t need offline-first of FPS-like user interaction, so in 98% of cases, hypermedia + tech like htmx gets you 100% of the way.
For pete’s sake, just let your server serve html. Replace only the parts of the page that need to update… with html. From your server. The poor thing is just sitting there, idling, bored, borderline depressed because it doesn’t get much of chance to do what it is meant to do, which is, you know… serve.
“But it serves JSON” … is like buying a Bugatti Veyron, just to park it in your garage and use its exhaust fumes to dry your clothes 6 days of the week, with a 2 minute drive around the block on Sundays.
- nsonha 4y ago> For pete’s sake, just let your server serve html You do realize this means all the user data has to be sent to the cloud? Which is what we want to escape? Hypermedia was created for bots for discoverability, I don't know why anyone would think this is an user-centric concept.
- hutzlibu 4y ago"“But it serves JSON” … is like buying a Bugatti Veyron, just to park it in your garage and use its exhaust fumes to dry your clothes 6 days of the week, with a 2 minute drive around the block on Sundays." That is a very creative analogy, but not one I agree with. My servers should do as little as possible. They should not serve files just for the sake of it, because they have all these shiny serving features. And I like JSON as it is not as verbose as html and I can directly work with it in javascript. And then update my html where I need it locally. If you prefer it differently, than this is fine. The web supports many ways.
- brtkdotse 4y ago> My servers should do as little as possible. Why? It’s not like they wear and tear?
- _448 4y agoOne advantage of pushing the computing on the user-side is that it reduces the load on the server: less requests, less processing and smaller request sizes. Thus it reduces the bill for the developers/companies :)
- brtkdotse 4y agoSo by spending thousands of dollars on developer time we can save dozens of dollars on server costs? ;)
- hutzlibu 4y agoIt is all a question, of how big you want to scale it.
- sodapopcan 4y agoEeeeeeexactly
- mvolfik 4y agoI wouldn't say that it increases developer time. From my (sure, limited) experience of building both with Flask (Django-like, Python BE framework) and Svelte, the difference between developer time is negligable, if not in favor of building on the client - the component frameworks bring much more to the table, like scoped CSS, often better editor support for dynamic values in the HTML templates etc.