In web development, a “tech stack” is the underlying technologies you use to build your websites or apps.
The most ubiquitous is the LAMP stack, which stands for Linux-Apache-MySQL-PHP. More recently, the MEAN stack has risen in popularity, particularly among JS devs looking to do backend development. It stands for MongoDB-Express-Angular-Node.
But I think a slightly less well known tech stack, the JAM stack, is one of the strongest choices for modern front-end applications and websites.
What’s a JAM stack?
Practically speaking, that means…
- You serve static HTML files that are rendered before the user requests them rather than dynamically.
- You rely on APIs for content instead of databases and dynamic server-rendered markup.
Is this just a fancy term for Single Page Applications?
Single page apps are built on the JAM stack, but not all JAM stack sites are single page apps.
They all also have the ability to call APIs and use the content they get back to generate HTML at build time.
Why should you consider building a site with the JAM stack?
A few reasons…
First, sites built this way are often insanely fast. Since the markup is pre-generated, you’re not waiting around for database calls and server rendering. The markup is already there, and gets sent back to the visitor as soon as they visit your URL.
And because there’s no need to generate files dynamically on each visit, you can easily distribute your entire site or app on CDN if you want to further improve performance.
Second, they’re far less vulnerable than a database-driven site. They can still be compromised, of course, but the surface area that can be attacked is a lot smaller.
There’s no database to hack. Someone would need direct access to your markup or one of the services providing your API data.
Also, it’s fun to build websites this way! Templating is easier. Setting up a local test environment is easier. It’s a delight to work with versus some of the other stacks.
How do I get started?
If this is something you find interesting, I’ve written a handful of articles about my migration from WordPress to Hugo.
Feel free to reach out with any questions.