Modern Frameworks and Server Side Rendering
I’m a big fan of Separation of Concerns (SOC), yet the modern era of Web Development is made of really lazy developers who do not want to maintain their project in a long run.
But we are where we are. Your write CSS in JS, you write
html jsx in js and build your dynamic landing page.
This is super cool but you now have a couple of serious problems.
The Elephant in the room SEO!
Well, gladly there are a bunch of solution for this.
- Is this an application that will require a lot of UI updates in real-time?
- Is this an application that will cover your stories? Like a blog?
- Is this an application that will eventually transform into a mobile app?
- Are you choosing this tech for the hype around it?
There are many criteria that particular from project to project, but you should think before you make a decision.
The not so easy but I’m too deep to reconsider using a different framework way: I’ve been like many of you in situations where I should’ve gone for an SSR framework but I realized that too late. 6 months after we’ve started developing our project we were given a new requirement, and that was server-side rendering, we had to come with a fast solution, that wouldn’t cost 1 month of re-development and re-testing. The solution was React Snap. It’s a small npm package that is set-up on post-build as a part of the deployment process. In a nutshell, it launches a headless chrome engine, crawls your site and renders as HTML all your pages as HTML files, then you updated your index file to hydrate or render your app as necessary and you’re done. Highly recommend if you don’t want to go for the hard way (see below).
The not so easy way: Before you begin your project start building it with some frameworks that have that out of the box. My prefference here has Next.js, but you should definitely consider alternatives like Gatsbyjs, Nuxt.js. These are the main alternatives and the best out there that you should definitelly consider.
If you should always consider your options and the tech stack that you’re going for. It doesn’t matter what are you building, it matters what you want to achieve. Here at Emerald Solutions, we consider very well our options and our client’s desire and we build what is the best for our clients. In case you want to say hi to us, feel free to use the link below.
Published on Mar 6, 2020
Feeling inspired?Let's talk
Written by Constantin Melniciuc
Founder of Emerald Solutions. An experienced web developer with expertise in areas of all sorts. Tech enthusiast and tech geek.