Live data from Hacker News

Ask HN: What happened to server-side rendering?

news.ycombinator.com

21–30 of 74 posts

Re: Ask HN: What happened to server-side rendering?

#21

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 server-side rendering . 2) What is your motivation? What problem do you think you are solving with server-side rendering ?

He's talking about web apps.

He/she is probably talking about single-page apps. But it isn't clear.

Re: Ask HN: What happened to server-side rendering?

#22

Obligatory plug for Phoenix LiveView: https://github.com/phoenixframework/phoenix_live_view edit: This actually has examples https://dockyard.com/blog/2018/12/12/phoenix-liveview-intera...

Is there a demo server somewhere? wonder how well it will work if you are at 200ms from the server.

I don't know of any off the top of my head or a quick google search. I do know, from the latest ElixirTalk podcast, that it's very careful about what it sends over the wire, only the parts that have changed. If you're interacting with an API to get the same information for a SPA you're probably going to have similar latencies.

Re: Ask HN: What happened to server-side rendering?

#23
post #9

My two cents: 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. I'm not even sure why it was so popular in the first place; client server separation is a good thin…

Best practice would be to wrap anything that is both unnecessary for SEO and non-trivial into tags. No need to render a datetimepicker widget on the server, especially if Google bot is requesting the page.

Re: Ask HN: What happened to server-side rendering?

#24

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.

You can use pug with SSR with VueJS (and/or NuxtJS).

Re: Ask HN: What happened to server-side rendering?

#25
Phoenix.LiveView — you can't ignore it, the coolest thing happening right now about server-side rendering.

Demo: https://youtu.be/Z2DU0qLfPIY?t=2628

Links: https://leveljournal.com/why-phoenix-liveview-is-a-big-deal https://elixirforum.com/t/phoenix-liveview-info/16569

PS please stop calling it isomorphic — this is disgrace for the mathematics.

Re: Ask HN: What happened to server-side rendering?

#27

Most people have realized it's actually complicated to do it right and just gave up on server-rendering their React apps (e.g. Reddit).

If we are using reddit as the standard for what's difficult to do right, then apparently everything is too difficult to do right. Case in point, their two mobile websites before react are both unusable garbage. I write SSR JS apps and React/SSR is _not_ the one to blame in reddit's scenario.

Re: Ask HN: What happened to server-side rendering?

#29
It's still relevant, just difficult. I think the herd jumped into SPAs before they understood the implications.

I was one who jumped in, then tried to automate my way out of client-side slow renders with https://www.roast.io/ (uses a headless browser to server-side render a JS app)

Re: Ask HN: What happened to server-side rendering?

#30

I've had great success with Vue's builtin SSR - https://vuejs.org/v2/guide/ssr.html Great for FB/twitter share scraping, google scraping, etc. Also much better startup speeds. Once you get it configured it's very little additional work to maintain. 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 ove…

> Great for FB/twitter share scraping, google scraping, etc.

Google scraping? How/why can it be used for google scraping? Doesn't google return html result pages?

Post reply on HN