What is Jamstack

Updated:

I started teaching myself to code, because I wanted to have a unique place where I could share my thoughts, some side projects and pictures of my vacations. Having a blog sounded like a wonderful idea!

Initially, I considered using WordPress, due to its widespread usage, support of the community and cheap hosting options. However, while reading blogs online and watching some talks on YouTube, I stumbled across the static site generators and I was impressed by their speed.

I configured my first blog using Jekyll, and I was quite happy with it, but at the same time I was diving into React and I decided that I wanted to focus my career on JavaScript as a main language and React as my framework of choice. This decision led me straight into the arms of Gatsby and that was the moment when I fell in love with the Jamstack approach.

What is a stack?

In the web development world, a “stack” refers to the underlying technologies you use to build websites and apps. One of the most famous stacks is LAMP, a combination of the Linux operating system, the Apache HTTP Server, the MySQL relational-database and the PHP language. An alternative to LAMP is WAMP, which is quite similar, with the exception of using Windows as operating system.

More recently, we’ve seen an increase in popularity of the MEAN stack that includes MongoDB, Express.js, Angular.js, and node.js. Its popularity is related to the ubiquitous diffusion of JavaScript, since it involves the usage of JavaScript in both front-end and back-end development, in addition to a modern NoSQL database.

What is Jamstack?

With the term ‘Jamstack’, we no longer talk about operating systems, specific web servers, backend programming languages, or databases.

The Jamstack is a new approach of building websites and apps that delivers better performance, higher security, lower cost of scaling, and a better developer experience.

Mathias Biilmann, CEO & Co-founder of Netlify, defines it as “a modern web development architecture based on client-side JavaScript, reusable APIs, and prebuilt Markup”. JAM stands for JavaScript, API and Markup.

JavaScript

Dynamic functionalities like request and response are handled directly by JavaScript. It can be vanilla JavaScript or any frontend framework or library.

API

Any kind of server-side process or action that involves the database is abstracted into a reusable API, which can be a custom function or a third party service.

Markup

Static site generators will use Markdown, as a source file, in order to serve websites and web apps as static HTML files.

What all Jamstack sites have in common is that they don’t have to depend on a web server. Additionally, in order to build a Jamstack site, we don’t need to include all attributes of JavaScript, APIs, and Markup.

Why the Jamstack?

Combining JavaScript with API and Markup allows us to pre-built files and serve them over a CDN. No need to wait for database calls and server rendering. This translates into an amazing performance and blazing fast initial rendering.

Using a CDN, means that we can also serve our stack of files anywhere and scaling will consist of just serving these files in more places.

Not only the final website or app is faster, cheaper and easy to scale, but it’s also more secure than the so called monolithic websites. Since we are using APIs to abstract all the server-side processes, an attacker will have a difficult time to attack our server or database.

All these features, translate into an overall better developer experience. Being a Jamstack developer means that Javascript is the only programming language that you need to master. There will be no need anymore for maintaining a separate stack for the back-end or for the content and marketing.

Conclusion

A Jamstack website will help you as a company or single developer both in the present and in the long run.

It will reduce your infrastructure costs, since you don’t have to pay unnecessary servers and bandwidth and it will be easy to maintain due to fewer moving parts and fewer things that can break.

Moreover, if you want to add any new functionality to your site, there will be an enormous selection of specialized APIs that focus on that specific feature that you want to implement and so you don’t have to build it from scratch.

Join the Jamstack community to learn more and keep building stuff!

References

Make sure to check out also these links: awesome-jamstack, jamstack.org, jamstack.wtf, static site generators, headless cms, Gatsby.js and Netlify.