chris aldred • web developer • chris aldred • web developer • chris aldred • web developer • avatar

Jamstack in a nutshell

Published on 04/11/2024


TLDR jamstack is a web development architecture pattern which focuses on simplicity, speed, and outsourcing backend functionality to API’s. It’s great for content driven sites with minimal requirements for interactivity but has some drawbacks that must be navigated!

Jamstack (Javascript, Api’s & Markup) burst into popularity around 2016 and has since been adopted by many large companies such as Paypal, Figma and Nike but what is it and what benefits does it bring?

Acronym breakdown with tech logos

At the heart of it all SSG (static site generation) is used to pre-build all pages which can be easily statically hosted. This is different to technologies such as wordpress, which require a backend server and a database. When a request is made to a WP site the page is dynamically generated using PHP which makes a call to a relational database, this data is then rendered server side and sent back as the response. In comparison statically generated sites dont need a backend as all the pages are pre-rendered, so when a user requests a blog/page its as simple as returning the relevant html file.

If pages have to be pre-rendered, how do I create new content?

This is where it gets fancy! Jamstack uses modern web technologies such as ‘serverless code execution’ and ‘CICD pipelines’ instead of databases and servers. All the sites code is stored in a version control system (usually GIT). When the sites sourcecode changes, such as when a new page or post is added a new build can be triggered. When the site builds, because its using a static site generator as mentioned earlier every page is pre-rendered. Including the newly added page or post! This can then be viewed on the live website.

How does it build if there is no server to execute code?

The term serverless is a bit of a lie. What it really means is you dont own a server, but you rent a server to temporarily execute some code! So instead of needing to pay to own a server 24/7 such as you do with Wordpress, you only need to rent the server when rebuilding the site, which takes minutes. This means we can greatly reduce running costs by harnessing modern technologies.