What makes a site JAMstack?

shortdiv

Divya

Posted on January 4, 2020

What makes a site JAMstack?

You may notice that the JAMstack isn’t really a new concept. Developers have been building static sites that leaned on JavaScript for decades. So what differentiates a JAMstack site from a traditional static one? For starters, the JAMstack is a methodology rather than an outcome. You could say that a JAMstack site is a static site but a static site is not necessarily a JAMstack one. To understand this distinction, it’s worth examining the build process of a JAMstack site as opposed to a strictly static one.

A JAMstack site is characterized by content living in a git repo alongside code and templates. This allows them to follow a generate-deploy cycle where a site is rebuilt each time a content or code change is made. Because of the git based workflow, every change is a valid commit to git and by extension deploys are immutable. The ability to revert is a key distinguishing factor of the JAMstack. In the past, it was commonplace to deploy sites via FTP, which meant your server and files within it were mutated with each new deploy. Mutable deploys present a host of challenges. These include ever changing and unpredictable server environments and issues with invalid caches. JAMstack sites do away with this by taking advantage the ability for modern CDNs to invalidate your cache completely.

Though JAMstack sites generally include JavaScript, API and prebuilt markup, a site doesn’t need to have every one of these elements to be considered JAMstack. The JAMstack is a direct response to the growing complexities of building for the web and strives for a return to simplicity. It does this by taking advantage of modern build tools, developments in the CDN space (hello edge compute) and a growing API ecosystem to outsource complex functionality. The JAMstack is effectively a movement away from servers. A site can therefore be considered JAMstacks when this architecture is embraced and browsers are given free rein to run the show.

For more on what makes a site "JAMstack", check out the comprehensive guide to the JAMstack published by O'Reilly Media

💖 💪 🙅 🚩
shortdiv
Divya

Posted on January 4, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related