Future-proof your website.
Why not just use React?
React with server-side rendering, looks something like this:
- A browser requests a page
- The server responds with static HTML
- The browser immediately renders the page so the user can see it
- The browser loads additional JS in the background
- The client takes some action, like navigating to a different route
- The browser uses the additional JS to handle this action
Development flow :
- Describe your content in React.js Components
- During development, write code like a boss (hot reloading, modularised code, webpack plugins, etc…)
So what’s missing?
There is the need to parse content written in another format, like blog posts written in Markdown and generate code that will not bloat the client and will efficiently serve the content to the user. Thankfully, there are a few projects that took the initiative, the clear victor of these being Gatsby.js.
How Gatsby works
Speed past the competition – Gatsby.js builds the fastest possible website. Why wait for pages to build on the fly when you can generate them at deploy time? When it comes to minimising the time to first byte, nothing beats pre-built files served over a CDN, instantly to your users wherever they are.
Higher Security – With server-side processes abstracted into microservice APIs, surface areas for attacks are reduced. You can also leverage the domain expertise of specialist third-party services.
Bring your own data– Gatsby’s rich data plugin ecosystem lets you build sites with the data you want — from one or many sources: Pull data from headless CMSs, SaaS services, APIs, databases, your file system & more directly into your pages using GraphQL .
Scale to the entire internet – Gatsby.js is Internet Scale. Forget complicated deploys with databases and servers and their expensive, time-consuming setup costs, maintenance, and scaling fears. Gatsby.js builds your site as “static” files which can be deployed easily on dozens of services.
The Best Of Both Worlds
Let’s say you have a WordPress site but are experiencing performance issues and are looking for a more modern web site.
If you want to keep using the WordPress’ Admin UI to maintain your content, we can use WordPress as a backend, where clients can edit their content without the worries of insecure plugins or other methods of being hacked.
Using GatsbyJS with its “Bring Your Own Data” strategy makes perfect sense. Using the
gatsby-source-wordpress plugin, we can pull in data and build a totally secure website with some pretty impressive gains on loading time. We’ll also sleep better at night knowing insecurities in WordPress are no longer putting clients at risk.
When is your website project not suitable for the JAMstack?
- Monolithic server-run web apps that relies on Ruby, Node, or another backend language.
- A single page app that uses isomorphic rendering to build views on the server at runtime.
- There are gatsby e-commerce integration plugins for Shopify and Moltin, although currently, fully-featured e-commerce sites are best implemented using an alternative architecture.