Server-Side Rendering Is a Thiel Truth
timr.co
timr.co
There are similar projects for Phoenix/Elixir and Django:
In server-rendered apps, the client/server boundary plays the role of a natural boundary between transient and domain-model state. Of course the pain points come when that approximation is wrong, but in most cases that's a pretty rare occurrence.
This is actually the primary thing I like about server-rendering. Not the performance side, but the reduction in state. The reduction in contingencies and in the potential for broken cases. When most of your state gets thrown away on every view change, there's so much less to keep track of.
Given how long I have to wait for the ever fashionable JS heavy SPA's to do _anything_, I'd almost be willing to bet it would still take less time.
My home server was more responsive when I was half way across the world.
HTML+CSS is a beautiful thing for ui. Its JS thats holding it back. If we had, say C# on the client side, imagine the web landscape by now.
> By itself, WebAssembly cannot currently directly access the DOM; it can only call JavaScript
https://developer.mozilla.org/en-US/docs/WebAssembly/Concept...
Sometimes all the work is client-side with third-party services as back-ends.
The only other solution I like is to have server-side rendering with live updates like Phoenix/Elixir, Vaadin/Java, or Rails/Ruby. These have scaling limitations but probably beyond what most of our apps need to support.
This was achieved using their fork of DustJS: https://github.com/linkedin/dustjs
Asynchronous Javascript templating for the browser and serverWhile I understand it's easy to make the argument that SSR is better, lighter, etc. It's easy to quickly violate the "Single Responsibility Principle" in that you now have two systems with little knowledge of each other both in control of rendering the UI.
I lived the era of jQuery with apps just being a bunch of jQuery extensions + SSR. Eventually the app needs to make XHR (type ahead search, nested picklists, etc), and you end up in a situation where there was just one thing controlling presentation.
server owns it at first, and generates the base system
client-side js then owns it, and does whatever it wants
there's no back and forth, or dual simultaneous control of the UI. There's only one owner at a time; just two different systems who ever own it (and single-responsibility-wise: separating static UI from dynamic UI)
It’s still a matter of preference, you might still prefer that over a full frontend react codebase. But having seen both nightmare jquery messes and react messes, they can both be painful to work with. I definitely don’t agree that things were much simpler in the old days.
With server side rendering of course you can still not-secure user input, but at least with template rendering, what you see is what you can see.
But then again, that's also IMHO
Infrastructure has direct and indirect costs, must be built maintained scaled monitored paid for etc etc.
You need a very very good reason to choose to implement optional back end infrastructure.
None of these reasons would be strong enough to convince me to start building and maintaining and paying for that infrastructure.
A well done native app is always, faster, more robust and more enjoyable to use than a web UI. Even if your app is used relatively rarely, offering a significantly better user experience means it will be used more. And that’s a very important thing.
Unless I'm using your service daily I'm not going to bother with an app and just use the website.
Do you have data that shows otherwise?
But getting regular visitors to your web to install your app is by far the easiest way to get installs.
Oh no, you say. The article didn’t say “all” apps should be done with server-side rendering, it said “many.”
OK then, which ones? Well since we’re quoting the article, I’ll just put this here:
“the less complex your client-side is ... the less justification there is for client-side rendering.”
Now again, tell me, how is this site implemented?