Earlier quoted context omitted.
I'm probably not in your target demographic but when a website pushes computation to me for simple things like displaying text and images I close the tab.
>when a website pushes computation to me for simple things like displaying text and images I close the tab How will you even know without looking at the source or blocking JS across the web? Like, sure, if they've fancy animations across all elements from the moment you open the page should be obvious. But what about something like https://rhodey.org/ ? It opens instantaneously in my ancient laptop connected to a ter…
The future (and the past) of the web is server side rendering
231–240 of 371 posts
Re: The future (and the past) of the web is server side rendering
#232I think that biggest issue with page size is not due to client side rendering, but rather thanks to bundling and idea that you need to download the same minified Lo-Dash on each and every page. Why can’t we just use public CDNs is beyond my understanding. I really like client side apps. They are so much more responsive. The only problem is with bundle sizes.
Re: The future (and the past) of the web is server side rendering
#233Earlier quoted context omitted.
> Isn't it also nice from a computation cost standpoint to let the client do the rendering? Aside from all other implications, letting each client render the same stuff is a massive waste of energy and compute.
No? Each client may be receiving the same document, but based on their device, view port, preferences, etc… the rendered result may be different. Either way, the measurement of Joules/page is likely to be such an astronomically small number compared to the constant cost of simply having a server at all IMO.
Re: The future (and the past) of the web is server side rendering
#234If you don't do server side rendering, you don't (almost) automatically get a set of nice REST endpoints that return JSON/XML/ETC? I get that the abstraction might be nice for security, but at least for corporate intranet applications, a nicely structured, secured (e.g ODATA) webapi you query for client side rendering has the added benefit that it can be invoked programmatically with REST by other authorized parties.…
> Isn't it also nice from a computation cost standpoint to let the client do the rendering? Aside from all other implications, letting each client render the same stuff is a massive waste of energy and compute.
Re: The future (and the past) of the web is server side rendering
#235Earlier quoted context omitted.
Web page design will have to fundamentally change to accommodate surgically updating web pages, for the large overhead to disappear.
It already exists for several popular frameworks/languages. One example is [1] Laravel livewire. [1] https://laravel-livewire.com/
Re: The future (and the past) of the web is server side rendering
#236Earlier quoted context omitted.
Yep. DOM manipulation can be done to server-rendered views to do that kind of thing, just fine. No SPA js framework required.
So now you've got two templates? How do you keep modifications in sync?
For sending data, you would just have a reply that instructs HTMX to display a success message. On an SPA you'd have the same. With both, you can interact with the page while the data is being sent.
Of course, sometimes you want purely 'cosmetic' actions, such as an "add row" button that pops open some data entry fields. For something like that you should not use htmx itself, but instead basic vanilla JS or a simple library such as https://alpinejs.dev/ which complements htmx nicely for client-side stuff.
Re: The future (and the past) of the web is server side rendering
#237 But all that code is necessary to make our sites work the way we want.
It's necessary to make shitty websites that are impossible to load on slow/flaky connections.Re: The future (and the past) of the web is server side rendering
#238Earlier quoted context omitted.
So any change in the UI means sending a request to the server, waiting for it to render, and waiting for that response with the new markup?
Yes indeed! The core aspect, however, is that your server is returning fragments of html that htmx places in the DOM extremely quickly. They have pretty good examples on their site illustrating some "modern" UI patterns. As an example, you may have an HTML table on your page that you want to insert a new row for some reason on let's say a button click. You place some attributes that htmx understands on your button th…
FFS, people, learn to write proper software that does everything locally!
Re: The future (and the past) of the web is server side rendering
#239“Server side rendering” is such a terrible term. The server isn’t doing rendering, the browser is. The server is sending a complete well-formed DOM for the client to render. Well done, modern devs! A plain .html file does that. I really hope some of the heavy front-end frameworks die a death, some common sense prevails, and we get a lighter, faster loading, more responsive web. I can dream.
yeah people demand this overkill without understanding what they are demanding. Everyone seems to use react so we must also use react, then the site no longer works for mobile so then you also need react native. All when you can use vanilla js to do the small bits needed for a PWA from one simple codebase.
Re: The future (and the past) of the web is server side rendering
#240I think it's a bit ridiculous to call it "server side rendering". It is called HTTP
It is ridiculous. It's pretty much newspeak. Like calling installing applications "sideloading" when you're not using some megacorp's walled garden. Also, I'd say "HTML" not "HTTP". What's HTTP(/3) these days is not what HTTP(1.1) was in the past.
The amount of ignorance of the newer generations it's astounding.
They keep reinventing the wheel over and over.