Jamstack: what and why?
TechJuly 30, 2021

Jamstack: what and why?

In a nutshell, Jamstack technology enables building websites that deliver excellent performance.

The term JAMstack was originally coined by Matt Biilman and is an abbreviation for using Javascript, API's and Markdown as technology stack. Nowadays the capitals in JAMstack are often dropped and the term Jamstack refers more to a software architecture style for web applications.

Jamstack is a new way of building websites and apps that deliver better performance, higher security, lower cost of scaling, and a better developer experience"

Jamstack.org

Key features of a Jamstack architecture are:

  1. excellent performance
  2. cheap and easy to scale
  3. better security
  4. outstanding developer experience

In the next sections we zoom in on each feature.

Excellent performance

To understand why Jamstack delivers excellent performance we compare it to a traditional web architecture.

Traditionally the web-browser or client performs a request to the web server to load a webpage. Upon this request the Web Server pulls the requested content for the webpage from the Content Management System (CMS). And at last step the CMS looks up the required data in its Database. As you can see each step involves a on-demand pull-based request and naturally each (network) request requires time to complete.

Let's now look at the Jamstack approach. Again the client performs a request to load a webpage, but this time it contacts a Content Delivery Network (CDN). Upon request the CDN directly serves the requested webpage to the client. It does not need to generate the page as the page was generated and pushed at build time from the Headless CMS to the CDN.

Pushing webpages at build-time instead of pulling content at run-time enables delivering excellent performance.

Cheap and easy to scale

Jamstack serves webpages from a CDN. A CDN is a geographically distributed network of servers that is build for performance and high availability. As a CDN is geographically distributed webpages are served from the nearest server to the client. By using a CDN you leverage the performance of a distributed network instead of doing your own scaling as is the case for a traditional solution.

Because Jamstack builds the pages once and serves pre-build pages from a CDN the required computation power is much less compared to a traditional approach where pages are calculated on-demand. This makes is your website cheap to scale.

Better security

As Jamstack based websites are rendered at build time the possible attack surface gets smaller. This is because a CDN only serves pre-build static pages and there is no CMS server running where you need to handle the security for.

There are of course dynamic aspects on your website that require runtime APIs. For these APIs you have two options: (1) use a SaaS-based service or (2) build your own API.

By using a SaaS-based service you leverage the expertise for a certain domain from a vendor and handling the complexity of security is done by the vendor. Although there is very large SaaS landscape, there is probably some domain specific code or integration glue you need to build yourself. The amount of code to write is however much less compared to traditional solution where you extend the CMS. Writing only a small number of custom APIs greatly reduces your security risks.

Outstanding developer experience

By loose coupling the front-end from the CMS, developers are free in their technology choice. This opposite to a traditional approach where the CMS dictates what front-end technology to use. By using the enormeous and vibrant Javascript based tool landscape, developers get a boost in productivity and developer experience. It enables front-end developers to use the latest tooling, like NextJS, and use Javascript throughout the whole front-end toolchain.

Javascript is the programming language that enables building Jamstack based solutions.

Related terms

Jamstack is strongly associated with other terms like Headless technology, microservice based architecture, static website generation, Content Delivery Network (CDN), Application Delivery Network (ADN), and the API Economy. There a lot of terms to learn when you are new to it.

Read our articles on e-commerce and Jamstack and personalization using Jamstack to learn how all these aspects are combined together.

Want to learn more about Jamstack?

Some good websites that describe Jamstack are:

Interested in a one-on-one discussion or want to see our exciting Jamstack based e-commerce demo? Use our contact form or drop us a mail: info@unplatform.io.

Joost Meijles
Written by Joost Meijles
On July 30, 2021