According to the official site, JAMStack means:
One of the key parts of JAMStack Architecture is switching to static. That means, using a Static Site Generator to build your site into plain old HTML, CSS, and JS, which does not change and can be served over CDN. If you need to make a change, you just rebuild the whole site. It is fast since most of the site remains the same. Moreover, the deploy takes very little time as it means only copying a bunch of files.
How to build with the JAMStack
We have already seen what the JAMstack stands for. So to build a project using the JAMstack, the project must meet the following criteria:
When building a project with the JAMstack, you should consider the following best practices:
- The entire site should be served on CDN.
- Employ atomic deploys.
- Instant caching invalidation.
- Everything should live on Git.
- Markup builds should be automated.
Your project is not built with the JAMstack if:
- Built with a server-side CMS like WordPress, Drupal etc.
- A monolithic server-run web app that relies on a backend language like PHP, Node, or any other backend language.
- A single page app (SPA) that uses isomorphic rendering to build views on the server at runtime.
The JAMstack is not about specific technologies. It’s a new way of building websites and apps that delivers better performance, higher security, lower cost of scaling, and a better developer experience.
Having seen what the JAMStack is, you might ask why go the JAMstack route? Below are some reasons you should consider the JAMStack:
Why wait for pages to build on the fly when you can generate them at deploy time? When it comes to minimizing the time to first byte, nothing beats pre-built files served over a CDN.
With server-side processes abstracted into microservice APIs, surface areas for attacks are reduced. You can also leverage the domain expertise of specialist third-party services.
Cheaper, Easier Scaling
When your deployment amounts to a stack of files that can be served anywhere, scaling is a matter of serving those files in more places. CDNs are perfect for this, and often include scaling in all of their plans.
Better Developer Experience
Loose coupling and separation of controls allow for more targeted development and debugging, and the expanding selection of CMS options for site generators remove the need to maintain a separate stack for content and marketing.
In this article, we saw what the JAMStack is, what is not JAMStack, how to build with the JAMStack, why we should consider using the JAMstack for our next project. To serve different purposes like scalability, clear separation, using best-fit technologies, etc. For websites and web apps built with the JAMstack, do check out these examples.
Subscribe to Logicwind
Get the latest posts delivered right to your inbox