Great to see this, as I'm leaning the Fulcro/Pathom.
The idea of server-side rendering is fascinating. With correct abstraction, there's no extra code required for every component at all. And there's no more ad-hoc client-side script in order to rescue back-end HTML anymore.
It's just annoying currently it's only easier on Node.js until WASM decades arrives.
There's also JavaScript frameworks that have started adding more server side rendering. It's really interesting to see this switch back. But I think the performance benefit will be great.
Initially, I thought this was going to be about WASM, based on the title.
//
The thing about rendering and processing things server-side and relying on very little, if any, JavaScript is that it makes it possible to send very small amounts of data to the client but still handle demanding tasks.
There's something to be said for making a website usable for even the most anemic of client hardware.
I kind of agree, but once you need any JavaScript, you basically need it to pull in the entire modern JS tool chain, so adding server side rendering doesn’t replace complexity, it adds to it.
Having a system that would allow you to build server side rendered HTML that could seamlessly integrate client JavaScript seems like it would be a huge advantage. Not sure if there is anything like that though.
I think a culture has been created where anything resembling server-side rendering (other than Node spitting out JSON) is legacy to be avoided ..... until of course the Javascript creates its own convoluted version of server-side rendering, which is revolutionary and the new hotness.
Yeah, in theory it's pretty simple. If you're using Javascript on both the server and client, it's definitely easier. But I guess I'm conflating server-side rendering with "pages that don't require Javascript to work", which is definitely more work.
It's funny how devs feel threatened by a non-JS trend. Even when their favorite frameworks are providing tools to accomplish minimal functionality when JavaScript is off.
Server side rendering has been a big priority in React, Vue, Redux, ReactRouter, etc.
It sounds like you're describing Marko.js. Once v4 is released, I predict server-side rendering will become popular again. It's like a vue.js + server-side rendering + client-side rendering + a built-in automatic webpack, yet everything is easy to learn and use. Too good to pass up.
I'm excited for server-side rendering to return to the mainstream so that in a few years I can revolutionize the industry with my ingenious new idea to render things on the client with Javascript!
I am a huge fan of server side rendering with progressively enhancing Javascript. It simply feels right to me:
* Search engine indexing works as expected.
* Informational web pages don't need a lot of interactivity anyway.
* You don't need crazy amount of build tools.
* You don't need extra browser extensions just to debug the JS.
* If for some reason there's one JS error, most of the pages are still functional.
* I am unconvinced that SPA is faster than server side rendering.
* Separation of concern is natural, business logic is handled by BFF, UI interaction is handled by JS.
* If you super love Javascript, you can write the BFF in Node.js.
I am glad that Hey is another high profile app exemplifying this.
It's not common enough, but I think the situation is getting a bit better. Node and React made it greatly easier to render your pages on the server side, and I've seen a lot more sites do it.
I'm not an expert, but it looks like things are starting to move towards a nice optimum. Many of the hot new frameworks do server side rendering and only send JavaScript to the client as needed.
Completely agree. I still build websites with server-side rendering and just enough JS for Ajax, which changes innerHTML and occasionally adds an element. They are astonishingly fast, and they still function if the client has JS turned off.
I remain convinced that for 90% of websites, using React is shooting a sparrow with a cannon.
Thanks for the clear answer. I've previously heard of server-side rendering for JS frameworks but i was certainly not aware that several frameworks supported it, and that some people like you actually cared :)
“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.
this is from 2015. There is no absloute need for rendering server side. You have websockets and fallback to ajax. Dont forget, you can never replace the computing power of 10000 user browsers with a server.
The idea of server-side rendering is fascinating. With correct abstraction, there's no extra code required for every component at all. And there's no more ad-hoc client-side script in order to rescue back-end HTML anymore.
It's just annoying currently it's only easier on Node.js until WASM decades arrives.
reply