Chapter 5. Shifting the Mental Model

A Mindset and an Approach

To adopt the JAMstack for your next project, your team will need to have a good mental model of what the JAMstack means. There’s one commonly held mental model to watch out for, as it’s not quite correct:

The JAMstack delivers static sites.

This is a convenient, bite-sized summary. But it misses the mark.

Sites designed for the JAMstack are sites that are capable of being served with static hosting infrastructure, but they can also be enriched with external tools and services.

This small shift in mindset is a powerful thing. A static site is a site that does not often change and does not offer rich interactions. But JAMstack sites go far beyond offering static experiences—whether that be through rapid iterations thanks to build automation and low-friction deployments, or through interactive functionality delivered by microservices and external APIs.

The ability to serve the frontend of a site from CDN infrastructure optimized for static assets should be viewed as a superpower rather than a limitation.

Although traditional, monolithic software platforms need to introduce layers of complexity for the sake of performance, security, and scale, JAMstack sites embody this by default. And because their technical design is based around the premise of being hosted statically, we are able to avoid many of the traps that traditional infrastructure can fall afoul of when being scaled and hardened.

The six best practices presented ...

Get Modern Web Development on the JAMstack now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.