What happened to JAMStack?
Contents
The year is 2017. A young and (moderately) ambitious IT Intern starts delving into the Front-end Web Development world for the first time. As he learns more about this world, he hears whispers of various technologies and trends. His mind is ablaze with wonderment and fear as he tries to comprehend them and how they relate to his HTML files written in Notepad. GraphQL, Markdown, and Static Site Generators (SSGs). All sound important. All are beyond comprehension for this web development nooby. With his ear to the grindstone, he hears one word that ties them together. One word dominates the podcasts, YouTube channels and Udemy courses he learns from. That word is JAMStack.
Seven years have passed since I started learning Front-end Development. As all crazes do, the JAMStack craze has diminished - replaced by other new and exciting technologies. So, what happened to JAMStack? Does it still hold a place in Web Development? Or, has declined into the slag heap of outdated, old and irrelevant web development trends? In this article, we find out.
What is JAMStack?
Many of you may not know what JAMStack is. For those that don't, let's first define it.
A stack is a group of technologies used to build stuff. It is often called an 'architecture' but 'stack' is easier to say. JAM stands for JavaScript, APIs and Markdown. Again, we may need some more definitions.
JavaScript is a programming language used to build web apps and websites. It gives us real-time access to data and page elements. It enables us to create powerful, real-time experiences.
An API is what connects a database to an application. It acts like a data vending machine providing access points for selected pieces of data for use by the front end of an application.
Markdown is a lightweight text file that stores information about a page. The information is roughly the same as in HTML files without all the metadata.
The beauty of combining these three technologies is creating fast, powerful and secure web applications. JAMStack decouples the front-end and back-end of applications. The front-end runs almost entirely with static JavaScript files, providing a much faster user experience. The APIs bring more security by limiting data access. The markdown files deliver page content much faster than the classic method of expensive database queries. Generally speaking, JAMStack is a blazingly fast and super secure method of building websites and web apps.
Why Was JAMStack So Popular?
At the end of the last decade, JAMStack was all the rage. No one wanted a slow and clunky PHP-based website anymore. JAMStack promised the death of WordPress (like WordPress could ever die - LOL). So, what was better about JAMStack websites than other architectures?
JAMStack is fast
It's faster than almost anything else. JAMStack apps use static files which render almost instantaneously in browsers. Other website architectures require slower and more expensive server-side computation before rendering. JAMStack's use of static files allows them to take advantage of CDNs (Content Delivery Networks). These are a series of servers located across the world. They cache static files and deliver them faster to users close to their location. That means a user in Australia can have the same speed experience for a UK-hosted website as a UK-based user.
JAMStack is very easy to scale
The use of CDNs makes JAMStack applications super scalable. If you run a website or app on a single server, scaling the product requires constant hardware upgrades, which are very expensive. In the JAMStack world, you only need to buy more CDN hosts, which is very cheap.
JAMStack is secure
JAMStack decouples the front and back ends of websites. That reduces the 'attack surface'. Using APIs to interact with databases allows for much stricter access to the data. Eliminating any server-side logic from the front end eliminates vulnerabilities like SQL injection.
JAMStack does not eliminate all security vulnerabilities. It does reduce the number, making the remaining ones more manageable.
Emergence of Key Technologies
JAMStack arose out of the emergence of several technologies. Cloud computing enabled the use of CDNs. Static Site Generators, like Gatsby and Gridsome, made it easy to export JavaScript frameworks to static files. Headless CMS platforms, like Hygraph, Sanity and Contentful, made it easier to manage site data independently of the website code. All these contributed to the birth of JAMStack.
JAMStack offers great DX (Developer Experience)
I know nobody cares about a Developer's feelings 😢. But, we do have them.
JAMStack makes our lives easier. Completely separating the front and back end, eliminates all blurred lines between the two. That makes development simpler, which is great for Devs - Yay!
Is JAMStack Still Popular Today?
There's always a new toy to play with - especially in Web Development. As such, JAMStack's initial hype diminished. But, less hype does not mean JAMStack is dead. It is still alive and kicking. It has found its niche. Now, its main use is simple websites like blogs, marketing sites and documentation portals. Anywhere that prioritises speed and easy content management, JAMStack thrives.
Its time in the sun is over. It is certainly no longer the golden child of Front-end Development. Today, it competes with hybrid frameworks like Next.JS and Nuxt. They blend static and dynamic rendering. They are far more adaptable to complex web applications. They offer flexibility to developers that JAMStack can't compete with.
Conclusion: There is a future for JAMStack but it had its time.
JAMStack is not dead. It is not dying. It has its use cases, but they are few. We do owe a debt to JAMStack. It gave birth to a new way of thinking about Web Development. It brought an era of simplicity. In the end, its simplicity was its downfall. Web Development is complex. The modern, dynamic JavaScript frameworks better adapt to this complexity. JAMStack will live on but never in the glory of its early days.