A few years ago, there was a lot of talk about Isomorphic rendering of JavaScript, but seems to have died down recently.<p>Are any products still using it? What happened?
Phoenix.LiveView — you can't ignore it, the coolest thing happening right now about server-side rendering.<p>Demo: <a href="https://youtu.be/Z2DU0qLfPIY?t=2628" rel="nofollow">https://youtu.be/Z2DU0qLfPIY?t=2628</a><p>Links: <a href="https://leveljournal.com/why-phoenix-liveview-is-a-big-deal" rel="nofollow">https://leveljournal.com/why-phoenix-liveview-is-a-big-deal</a> <a href="https://elixirforum.com/t/phoenix-liveview-info/16569" rel="nofollow">https://elixirforum.com/t/phoenix-liveview-info/16569</a><p>PS please stop calling it isomorphic — this is disgrace for the mathematics.
The main advantage of server-side rendering of client-side templates is cutting your initial load time to a bare minimum (not having to wait for scripts to load/compile, taking advantage of page caching, etc.). However, this usually only matters when you're afraid of users getting impatient and bouncing, which tends to be true of sites that mainly display content and don't have a ton of interactivity, and sites like that usually shouldn't be using client-side rendering in the first place.<p>So you have two buckets: web apps that don't care too much about shaving milliseconds from the initial load, and content sites that shouldn't be shipping heavy JavaScript in the first place. The target market for hybrid rendering is the tiny slice of sites in-between those two, so it's a minority of use-cases. Though it is also used by sites in the latter category that are shipping heavy JavaScript anyway and having regrets.
Universal rendering is widely used in the React ecosystem, in large part thanks to Next.js[0] making it simple to set up and run.<p>Many large sites like Marvel.com, Nike.com, Invisionapp.com, hulu.com and many more run on server-side rendered React, see the Next.js showcase for a more complete list: <a href="https://nextjs.org/showcase" rel="nofollow">https://nextjs.org/showcase</a><p>[0]: <a href="https://github.com/zeit/next.js/" rel="nofollow">https://github.com/zeit/next.js/</a>
At my team, we use next.js for pretty much every 'web-based' product.<p><a href="https://github.com/zeit/next.js/" rel="nofollow">https://github.com/zeit/next.js/</a><p>It gives you SSR with React out of the box. It's really nice to work with, and flexible enough that we haven't had issues with more customized situations.
While not JavaScript, there's now Razor Components[1]. It doesn't work exactly like isomorphic JS, as it operates more like a terminal session (the server sends down VDOM mutations to the client). I'm not entirely sold on the approach yet, but I am going to be keeping an eye on it.<p>[1]: <a href="https://docs.microsoft.com/en-us/aspnet/core/razor-components" rel="nofollow">https://docs.microsoft.com/en-us/aspnet/core/razor-component...</a>
I've had great success with Vue's builtin SSR -<p><a href="https://vuejs.org/v2/guide/ssr.html" rel="nofollow">https://vuejs.org/v2/guide/ssr.html</a><p>Great for FB/twitter share scraping, google scraping, etc. Also much better startup speeds.<p>Once you get it configured it's very little additional work to maintain.<p>I have it set up to do things like determine mobile/desktop depending on the `user-agent` to determine the prerendered page to serve, and then the client side JS takes over depending on the viewport size and will either a) Rebuild (less than 1% of the time) changing the markup from desktop->mobile of mobile->desktop or b) Continue happily
I built a solution for server side rendering using Elixir / Plug and Chrome Headless via Chroxy. It simplifies server side rendering greatly since it doesn’t care about the client side library you use. I have been using it to power my site[1] which is written in React.<p>I also happen to make the Elixir Foundation series of videos[2] that show how to do serverside rendering using elixir. So I’m dog fooding the dog food.<p>[1] <a href="https://www.codemy.net" rel="nofollow">https://www.codemy.net</a><p>[2] <a href="https://www.codemy.net/sets/elixir-foundation" rel="nofollow">https://www.codemy.net/sets/elixir-foundation</a>
For sites using React, Angular, Vue, and Ember, the "talk" has died down because it's just a standard feature of the platform. Server-side rendering is part of the table stakes at this point for JS frameworks.
Obligatory plug for Phoenix LiveView: <a href="https://github.com/phoenixframework/phoenix_live_view" rel="nofollow">https://github.com/phoenixframework/phoenix_live_view</a><p>edit: This actually has examples <a href="https://dockyard.com/blog/2018/12/12/phoenix-liveview-interactive-real-time-apps-no-need-to-write-javascript" rel="nofollow">https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera...</a>
My two cents:<p>1) Lack of reliable real time ability to detect device and compute size.
2) Increased computation complexity of what to render - why put that load on the server when devices are now commensurately as fast - or even faster given the trend to distributed services that maximize network throughput over power.<p>I'm not even sure why it was so popular in the first place; client server separation is a good thing, IMHO.
Remember that Google Bot uses Chrome 41[1]. So some features from ES6+ might not be supported. It's always a good idea to use Babel during compiling a SPA without SSR.<p>[1] <a href="https://developers.google.com/search/docs/guides/rendering" rel="nofollow">https://developers.google.com/search/docs/guides/rendering</a>
I would say is more relevant now, the time to build and complexities of SPAs has make many companies switch more to multipage SSR react with additional react JS for the browser, for SSR, SSR react is superior (because of components) to stuff like pugs IMO.
> There was a lot of talk about Isomorphic rendering of JavaScript, but seems to have died down recently.<p>It's no way near dead, just look at nuxtjs/nextjs/Gatsby. they are getting more popular day by day. Recently I worked on an E-commerce platform using next.js and Gatsby.<p>I have to say its really cool and good user experience overall. the only issue I had was the complexity of the code. You have to think about backend/frontend at the same time. I will definitely use it where it makes sense.
I believe a significant motivation of SSR was to be indexed by Google, then Google said they will start crawling JS rendered pages:<p><a href="https://webmasters.googleblog.com/2014/05/understanding-web-pages-better.html?m=1" rel="nofollow">https://webmasters.googleblog.com/2014/05/understanding-web-...</a><p>So maybe that took the wind out of the sails.
It's still relevant, just difficult. I think the herd jumped into SPAs before they understood the implications.<p>I was one who jumped in, then tried to automate my way out of client-side slow renders with <a href="https://www.roast.io/" rel="nofollow">https://www.roast.io/</a> (uses a headless browser to server-side render a JS app)
I can integrate js in a viewengine in asp.net MVC for reuse of HTML components ( yes, server side rendering based on the v8 js engine)<p>I also use razor though, but this is a neat workaround instead of using a headless browser.<p>The right mix of using scaffolders in. Net ( server side) and client side components can decrease development time exponentially
I'm still surprised how many people are not aware of client-side rendering being unstable, because they don't see the final result per visitor, but a prediction most of the time. Testing cross-browser is another story, though it can help a bit, is also usually omitted.
The talk died down because it became a standard way of doing things now. It isn't something special anymore and the tooling has evolved to make it more seamless.
1) What do you mean by server-side rendering of JavaScript? It sounds like you mean executing JavaScript on the server that otherwise is destined to execute on the client-side. I execute JavaScript on the server/terminal all the time and don't call it <i>server-side rendering</i>.<p>2) What is your motivation? What problem do you think you are solving with <i>server-side rendering</i>?