DEV Community

Cover image for Client-side Vs. Server-side Rendering: What to choose when?

Client-side Vs. Server-side Rendering: What to choose when?

Karan Shah on December 17, 2019

The web page rendering dilemma The discussion about a web page rendering has come to light only in recent years. Earlier, the websites a...
Collapse
 
exadra37 profile image
Paulo Renato • Edited

This an awesome article about the trade-offs between SSR and CSR, thanks.

For developers doing Elixir, this is not such a huge issue once we have Phoenix Live View that brings together the best of SSR and CSR. I really recommend to watch this talk for some cool demos/examples, and this talk for some more insights into how it can be used, and for when to not use Phoenix Live View, all by Chris McCord, the author of it. Want more? Just see here some crazy demos, like games, real-time htop like linux console, etc.

Collapse
 
karan_shah89 profile image
Karan Shah

Same with Gatsby I guess. Will check out the talk - thanks :)

Collapse
 
exadra37 profile image
Paulo Renato

Let me know what is your impression on Phoenix Live View vs Gatsby and others you are used to. Thanks.

Collapse
 
kmwill23 profile image
Kevin

I am CSR to the bone. Offload as much work as possible to the client. Server is for data crud and security.

I know there are legit reasons for architecting SSR, but I've found in my teams it always comes from someone who doesn't have the ability or willingness to know and abuse the client to it's fullest extent.

Collapse
 
karan_shah89 profile image
Karan Shah

I agree but sometimes it depends on what the application is. Hacking your way around SEO for CSR applications is a huge pain and demands way too much time and energy.

Times like these, you would want to just re-write the whole thing.

Collapse
 
kmwill23 profile image
Kevin

Having flashbacks to when I handled more e-commerce clients =) Google is getting better at crawling dynamic content. I always hated designing for SEO only to have to redesign for SEO when the rules changed.

At this point I only work enterprise. I can't honestly say I don't touch SSR code since a lot of time I am in legacy systems (old ASP, webforms). But I do tend to convert anything I touch =)

Collapse
 
jdnichollsc profile image
J.D Nicholls

BackEnd for FrontEnd is for security but it can be used for a better SEO and Performance as well, so it depends. CSR is more for Webapps instead of Websites, and you can have REST APIs or Microservices for data crud and security as well.

Collapse
 
fly profile image
joon

CSR vs SSR has been an issue that I've always been pondering about - ever since react introduced dynamic hydration and lazy loading. The post summed up the pros and cons nicely and convinced me enough to put Gatsby on my try-out list in the future!
Thank you for the post :)

Collapse
 
karan_shah89 profile image
Karan Shah

I'm glad it helped! Hope you rock it with GatsbyJS

Collapse
 
ashfaqshuvo007 profile image
Ashfaq H Ahmed

Awesome article! Thanks mate!

Collapse
 
karan_shah89 profile image
Karan Shah

Thank you :)

Collapse
 
katieadamsdev profile image
Katie Adams

This is exactly the article I wanted to read today. So glad I found it. Thanks for writing it! 😁

Collapse
 
karan_shah89 profile image
Karan Shah

Thanks for reading it :) Glad you liked it!