Many of you might have clicked on this link wondering if you were going to find a link on how to build the largest peanut butter and jelly sandwich possible.  I can’t say that this blog post will help with that but keep the dream alive!

JAMstack is a super cool web-based software architecture that uses only client-side technology.  The foundation of JAMstack is JavaScript, APIs and Markup/Markdown.  While this technology architecture seems small and simple it is unbelievably powerful, and we will discuss when and why someone should consider using a JAMstack.

Dynamic Content

I know what you are thinking.  How?  How could a website with only client-side technology be dynamic?  JAMstack can be dynamic, but it requires external APIs/microservices to accomplish this.  You can build a custom external microservice or use existing services.

Commonly JAMstack developers opt to use Content Management Systems (CMS) to create dynamic content.  Content Management Systems with RESTful API endpoints are a good fit for JAMstack.  Some CMSs that are used by JAMstack developers are familiar like WordPress or SharePoint.

In addition to the familiarity, there is a new breed of CMSs called Headless Content Management Systems.  A headless CMS has the admin interface of a CMS without a web interface for users to consume the content.  They are designed specifically for applications that use JAMstack-like architectures.  Contentful is a great example of a headless CMS.

Performance

JAMstack is a type of static website.  Because of this fact they can be hosted by almost any server or Content Delivery Network (CDN).  Serving up content this way creates a really great user experience because our user is not waiting for some server-side code to completely finish building a page on the server before getting a response in the browser.  Faster responding web pages keep users on your website.

Cheap

JAMstack doesn’t require an expensive server hosting plan.  You won’t need to learn about how to stand up a web server in Amazon Web Services or Azure to get a site running.  In fact, you can deploy a JAMstack site completely free using Github Pages as long as you don’t mind your content being hosted in a public Git repository.  Github Pages is a CDN that delivers 99.9% uptime for free and I think it is one of the best-kept secrets on the internet.

Security

Security is super important to everyone on the internet today.  Everyday there are new vulnerabilities being discovered in server-side architectures.  Fortunately for the JAMstack community, they don’t have to worry about this.  Being that JAMstack is composed of static content there is very little that can be done to attack the website.

There is a small footnote that if you use an insecure or unstable microservice in your JAMstack site the content coming from that resource might be vulnerable.  While it is not a security vulnerability with JAMstack it can affect the user experience, so it is something that you will want to keep in mind when including external API/microservice resources.

Getting Started

One of the easiest ways to get started with JAMstack is to start with a static site generator.  Jekyll is the most popular static site generator built on top of Ruby, but my favorite is Gatsby which is built on top of JavaScript, React and GraphQL.  Static site generators build entire websites before the website is deployed.  They usually use Markdown to write pages and they already fall within the JAMstack architecture.

Wrapping it up

JAMstack is a powerful development stack to have in your toolbox as a web developer.  Being able to build a cheap, secure, performance-driven web applications is going to sound great to anyone when you pitch the JAMstack architecture.Joe Fehrman

You May Also Like These Topics