Comment: Jamstack’s modern approach to web development comes with a caveat. With Gatsby 4, that caveat is gone.
Much of what we consider enterprise software today was once thought of as hobbyist’s plaything. While not exclusively an open source phenomenon, it is perhaps most evident in open source projects like Linux or MySQL, which seem so unsuitable for serious enterprise use at first, and then become default values for enterprise use. Something similar happens in web development.
SEE: The best programming languages to learn – and the worst (TechRepublic Premium)
Not so long ago, static site generator (SSG) frameworks like open source Gatsby were considered limited to simple applications like blogs or documentation sites. The problem was performance. SSGs were lightning fast because they rendered websites as files, but that speed stopped once a website exceeded 10-1,000 pages and jumped to 10,000 or 100,000 pages. Suddenly the compilation process became very slow.
Well, that was then, and this is now.
Projects like Gatsby are increasingly challenging the idea that businesses need, let alone want, a robust, all-in-one but master-of-nothing CMS like WordPress or Sitecore. Not when they can get best-in-class: a headless CMS like Contentful as an API-driven back-end content store; Stripe for payments, Gatsby for front-end presentation, etc. Indeed, this relatively new approach to Jamstack could set a new standard for web development. Perhaps most importantly for developers, with Gatsby 4 there is no longer a need to rely on SSG over server-side rendering (SSR). With Gatsby 4, you can have both.
Start small, go big
But that’s not where developers start. The world has lived on traditional CMSs for so long that developers usually turn to something like WordPress for their work projects. WordPress, for example, is the CMS behind 39.6% of websites. However, when developers build for fun, they turn to something like Gatsby, an open-source framework for building websites with React. Gatsby is also the name of the company that does most of the development of the project, while offering a cloud service to make it easier to get started with Gatsby, and also to continue.
SEE: How to Build a Successful Developer Career (Free PDF) (TechRepublic)
As Gatsby project and company co-founders Kyle Mathews and Sam Bhagwat explained in an interview, the company continues to push to make Gatsby easier and more powerful to use.
On the “easier” side, for years the company has offered Starters, which are pre-built open-source Gatsby sites with mock content to get a developer started using Gatsby with a minimal learning curve. What is the use of Starters for a potential Gatsby user? “That’s where everyone starts,” noted Mathews. “They’re like, ‘What’s this Gatsby thing? I’m going to rebuild my portfolio.’ And they’re like, ‘Oh, that was fun. I’ll suggest it at work.’ It’s a story we hear over and over again, and it’s not going to stop.”
To ensure that developers don’t choose Gatsby for its ease of use and then abandon it due to performance shortcomings, the company has continuously (and dramatically) improved Gatsby’s performance, introducing things like than Gatsby Builds (resulting in up to 1000X build speed improvement) and more recently bringing improvements in Gatsby 4 through things like deferred static build and parallel query processing in Gatsby Cloud, resulting in a 10x performance boost by dramatically reducing the time it takes to compile the files needed to render the site. For developers, this means they are no longer left out of modern app development when it comes to website development.
No need to choose
Of course, this remains a step of faith for developers steeped in the SSR approach of a traditional CMS to delivering dynamic web pages. With the introduction of Gatsby 4, however, no faith is required. Gatsby added the ability to use SSR, in addition to static site generation. With a deft move, one of the main reasons not to use Gatsby was removed, creating an “escape hatch” for developers who wanted to use Gatsby but didn’t want to be blamed if SSR became necessary (or perceived Such as).
Developers will always choose SSG, the founders think, but “server-side rendering is the all-purpose escape hatch in web development because you can do anything in that mode.” His addition makes it easy to choose Gatsby…and stick with him.
SEE: You can learn web development with MySQL, PHP, GitHub, .NET, Blazor and Heroku (TechRepublic Academy)
This inclusion sticks to a central theme of Gatsby progression: increasing levels of developer empowerment. In fact, the whole principle behind Gatsy/Jamstack is to give developers back control of their development experience. According to Mathews, “developers want a more flexible way to build websites”; a way out of the traditional monoliths with their stack of vertically integrated tools that “locks you into this world”. The Jamstack, on the other hand, allows a developer to take a cutting-edge approach, using a preferred presentation framework (Gatsby or Vue.js or many others), headless CMS of choice, etc. “It’s like the CMS has been dismantled but people still want the CMS,” continued Mathews. In other words, they want the benefits of the CMS but not its inflexible approach.
And now, with the introduction of SSR, developers don’t even have to choose between their comfortable CMS approach to site rendering or the more modern approach of Jamstack. Bhagwat concluded, with Gatsby 4 “You can go anywhere on the [static vs. dynamic/SSR] spectrum you want. … You can render server-side so that a server can respond to every request if you wish, or you can render part of your pages each time the content changes and defer the rest.”
It’s about making it easier to choose a more modern way to build the web, and Gatsby is at the forefront.
Disclosure: I work for MongoDB, but the opinions expressed here are my own.