Live data from Hacker News

Server-side rendering is a better choice for many applications (2020)

timr.co

171–180 of 286 posts

Re: Server-side rendering is a better choice for many applications (2020)

#171

One of the fastest, lowest latency websites I use is HN, and it’s entirely server rendered. It’s also a massively popular website with probably thousands of hits per minute. Anyone who tells you server side rendering is too slow, probably has no idea what they’re talking about.

Hitting the “Reply” button on HN takes you to a new page with a textbox, taking over 500ms and a complete page reload. On some websites, that amount of latency is acceptable. But that could be instantaneous.

Re: Server-side rendering is a better choice for many applications (2020)

#172
I mostly agree with the author. After working a couple of years with React client render and API a pure server render seems to be a way more productive. For my recent OSS project (https://github.com/docusealco/docuseal) I use server render everywhere except of the 2 most complex/dynamic UI parts (drag&drop form builder and the signing form). I think just figuring out which approach fits best for which part of the software is the most important thing, doing both SSR and CSR in a single project is completely fine when done right.

Re: Server-side rendering is a better choice for many applications (2020)

#174

The reason client-side rendering is so popular (IME) is that it creates a clear separation between frontend and backend devs. You can use separate repositories, languages, deployment flows/cadences, code review, etc, with an API as your connection point (and the fact that you get an API by default with CSR is also nice). I don't think CSR is going anywhere, mainly thanks to Conway's Law.

I think the trend these days is we are now going back to combining backend and frontend again. I'm looking at you Next.js.

Re: Server-side rendering is a better choice for many applications (2020)

#175
I am surprised that this topic keeps coming back and gets attention. I thought in the year 2023 this is a settled topic.

Lots of hype from people who obviously never managed a real website or a real-world software project.

On the non-technical side, traditional server/client separation is well understood by everyone and has all the tools any team ever needs, while SSR takes some learning -- it is added cost that does not transfer in many places.

On the technical side, SSR only has clear advantage for very specific scenarios, e.g. e-commerce site where rendering time and responsiveness across different devices is a top priority. For the vast majority of websites out there, SSR likely only increases your server load and cost when you could leave all the rendering to client which is free resource. As browsers and computers themselves get faster, you don't even need to do anything to get better performance on client machines. Otherwise, this does not matter any more than Pepsi vs Coca-Cola or vim vs emacs.

If SSR is clearly the better choice for a team/product, go ahead, otherwise don't waste time on it.

Re: Server-side rendering is a better choice for many applications (2020)

#176
post #160

This article misses the single most important reason to use SSR: single language applications are single build applications. Frontend builds are basically a requirement for any application with a UI. You're always going to have CSS, and some degree of user interaction for even the simplest website, which means JS/TS. One of the most important developments for frontend assets in the past decade is dependency managemen…

"Frontend builds are basically a requirement for any application with a UI" I disagree with this premise. Dynamic languages don't have builds either.

Since JS people target multiple browser versions and vendors, building is basically a requirement.

Re: Server-side rendering is a better choice for many applications (2020)

#177
Modern web development has become a wasteland of over-engineered solutions, and the real issue isn't client-side vs. server-side rendering; it's the industry's obsession with frameworks. Frameworks are not just tools; they're ideologies that developers subscribe to, often blindly. This has led to a monoculture where questioning popular frameworks like React is heretical. Ironically, this 'framework-first' mentality stifles the very innovation it claims to promote. The future of web development should focus on lean, framework-agnostic solutions, even if it means revisiting 'outdated' technologies. The most secure and maintainable code isn't necessarily wrapped in the latest framework; it's code that is simple, well-documented, and, above all, understandable without needing a 'decoder ring' of npm packages.

Re: Server-side rendering is a better choice for many applications (2020)

#178

This article misses the single most important reason to use SSR: single language applications are single build applications. Frontend builds are basically a requirement for any application with a UI. You're always going to have CSS, and some degree of user interaction for even the simplest website, which means JS/TS. One of the most important developments for frontend assets in the past decade is dependency managemen…

> single language applications are single build applications

I don't know your background but most teams don't view "single language" as an advantage over other options. People choose a certain language because of internal infrastructure, libraries/ecosystem, performance, and whether it is the best suited for a project etc, rarely because "we use that language for backend so we should also use it for frontend" or vice versa

Re: Server-side rendering is a better choice for many applications (2020)

#179
Key word: “many applications”, and I would be more specific to say many CRUD applications, but definitely not all web applications, there are so many cases that SSR is the worst choice, in my field, we do robotics/IoT/edge computing/etc., at the edge, most likely you will have an SBC with not so much resources (or resources you would like to save and use for edge computing like computer vision and such) to use to prerender a webUI for the user, one of the platforms I built it uses Cesium and WASM and the same time to control a swarm of drones, each SBC in there (and server) does the minimum load to serve some API requests while saving the rest for video/vision processing, while shouldering the rest to user’s machine. SSR might make sense for data centers building your average CRUD webapp but definitely not all.

Re: Server-side rendering is a better choice for many applications (2020)

#180
post #169

This article misses the single most important reason to use SSR: single language applications are single build applications. Frontend builds are basically a requirement for any application with a UI. You're always going to have CSS, and some degree of user interaction for even the simplest website, which means JS/TS. One of the most important developments for frontend assets in the past decade is dependency managemen…

I say save yourself the trouble and just avoid all "modern" web development tooling. Avoid "frontend builds" at all costs (everything except for esbuild is insanely slow anyway). Most websites do not need npm for frontend (or backend). Most web applications are barely "applications" at all but rather mostly-static content with a few forms, tables, and/or menus. I use vanilla html/css/js for frontend + golang for the…

Been there, done that. I don't agree. Go's native html/template and even pongo2 or quicktemplate etc have a big problem when it comes to conditional fragments of some text.

It's messy and you end up writing helper functions for pretty much everything. Need a href aware navbar? Custom function and macro time. Bleh.

Performance is great, maintainability isn't.

I dislike graphql because it's too mich overhead. RESTful is not good enough, only good for admin UI CRUD.

I moved to json rpc calls. So I can have the best of both worlds.

However what I'd really like to have is a proper SSR component framework that is interactive or rather reactive.

Post reply on HN