News for hackers. Stuff that matters.
Re:Server-Side Rendering Is a Thiel Truth (2020) by vlovich123 on Wednesday August 23, 2023 @07:42AM (#37234383)
I think the next major change will be unified hybrid rendering. Render the initial view via SSR for speed, framework automatically injects more and more of the page transparently as user-driven events happen. All of this will be transparent and you only write the app once.
Re:Server-Side Rendering Is a Thiel Truth (2020) by tommy_axle on Wednesday August 23, 2023 @07:52AM (#37234474)
That's what frameworks like NextJS do.
Re:Server-Side Rendering Is a Thiel Truth (2020) by eddd-ddde on Wednesday August 23, 2023 @12:51PM (#37238841)
No, I think it's more like qwik, no hydration, just html. SSR plus client logic when needed.
Re:Server-Side Rendering Is a Thiel Truth (2020) by Joeri on Wednesday August 23, 2023 @08:09AM (#37234633)
This is what react server components is: the component tree renders on the server and is sent over a chunked http connection, gradually filling the page. The code is not sent to the client because events that necessitate a rerender go back to the server in a new request.
Re:Server-Side Rendering Is a Thiel Truth (2020) by europeanNyan on Wednesday August 23, 2023 @07:48AM (#37234433)
Re:Server-Side Rendering Is a Thiel Truth (2020) by sanderjd on Wednesday August 23, 2023 @07:46AM (#37234414)
So, I was trying to do this literally a decade ago (as in, I remember it being 2013 when I started trying to make an angularjs site work this way). I haven't been doing front-end or "full stack" for awhile, so I'm a bit out of the loop. Why has this seemingly failed to progress in the last decade?
Re:Server-Side Rendering Is a Thiel Truth (2020) by badestrand on Wednesday August 23, 2023 @07:53AM (#37234479)
This is already here and in use. See Next.js using React.js for example. Server-side rendering out of the box and small next needed pieces are loaded continuously when they are needed.
Re:Server-Side Rendering Is a Thiel Truth (2020) by sanderjd on Wednesday August 23, 2023 @08:00AM (#37234572)
Nice! Anecdotally this still doesn't seem to be the dominant way that web apps I use are implemented. Is this just taking awhile to get mindshare, or are there some drawbacks keeping most people from using it?
Re:Server-Side Rendering Is a Thiel Truth (2020) by alexanderchr on Wednesday August 23, 2023 @12:40PM (#37238687)
Because it adds a lot of complexity for the small benefit of shorter initial load times. There are many issues, for example you need to make sure that all your front end code runs both in the browser and in node. You need to mark parts of your UI to not server render, you need to be aware of the timing between the site being loaded and hydration being finished (a text input might have some value prefilled from the server and may be changed by the user before hydration finishes). Just from the top of my head.

My experience is that most of the time it’s better to make your public facing site fully SSR and then make the actual app fully client side rendered. You usually don’t need that much interactivity for your public site and your app users don’t mind a few seconds startup time. You also usually don’t need SEO for your app because it’s behind authentication anyway.

Exceptions exist of course.

Re:Server-Side Rendering Is a Thiel Truth (2020) by sanderjd on Wednesday August 23, 2023 @01:14PM (#37239124)
Very helpful!

Those are basically the same drawbacks as a decade ago.

I guess my question to the folks here saying hybrid is the way to go nowadays is: Have these problems been solved in your view?

Re:Server-Side Rendering Is a Thiel Truth (2020) by PhoenixReborn on Wednesday August 23, 2023 @07:50AM (#37234456)
Most of the more modern Javascript SSR frameworks support hybrid in some capacity (Remix, Next, Svelte). I can't speak for Angular as I've never used it.
Re:Server-Side Rendering Is a Thiel Truth (2020) by sanderjd on Wednesday August 23, 2023 @07:56AM (#37234530)
Oh, I didn't mean to focus the discussion on angularjs; that "angularjs" that I was using was essentially a totally different and now-deprecated framework from today's angular. I just meant it as an example of why I don't see this as an up-and-coming idea, but rather something that has been the clear best path for a very long time, but doesn't seem to have taken off.

I don't know enough about any of the frameworks you mentioned to evaluate whether the "hybrid in some capacity" actually does mean this approach has become widely used, but I guess from my experience of using the web, it doesn't seem like it is common, it seems like most applications are still sending a skeleton and then filling the data in client-side, rather than rendering the initial page load server-side.

Re:Server-Side Rendering Is a Thiel Truth (2020) by xu_ituairo on Wednesday August 23, 2023 @07:46AM (#37234411)
Do you mean something similar to Svelte becoming dominant?
Re:Server-Side Rendering Is a Thiel Truth (2020) by sanderjd on Wednesday August 23, 2023 @07:59AM (#37234552)
I think from the comments here: probably? I don't know anything about Svelte, so I can't really say, but you're the third person I've seen say "this sounds like Svelte", so I'm inclined to think you're all right :)

So has it taken off / is it taking off? If not, why not? Or more to the point of my original comment: Why is something like this just now taking off? Has something new enabled this in the last few years?

It's not a new idea was my point in my comment, so I'm curious why the idea never seemed to take off in the past, and why it might be poised to now.

Re:Server-Side Rendering Is a Thiel Truth (2020) by dinoreic on Wednesday August 23, 2023 @10:23AM (#37236427)
I can't understand how Svelte is not more popular. From first time I saw it 4y ago I thought it was game changer, did not change opinion.
Re:Server-Side Rendering Is a Thiel Truth (2020) by pathartl on Wednesday August 23, 2023 @12:41PM (#37238696)
I have been using Blazor for the past year and I've got to say it's pretty incredible. It has some downsides and .NET 8 with Blazor United is going to be a very welcome change, but I can have my cake and eat it too. I finally get to use components, write some client-side stuff in C#, and I don't have to touch a lick of JavaScript or TypeScript. I get how irritating it is for people to beat the "JS IS BAD" drum, but man, it's nice to use proper typing in a language that has some pretty damn good syntax.