Learn what Jamstack really means and what are the benefits of Jamstack over traditional solutions like running your own server for back-end using the likes of NodeJS or Ruby on Rails.
If you have ever created a full-stack web-app you would be familiar with the complexity of the project. There are three major components in it -
Problems you face -
Legacy web architecture
Jamstack simplifies everything 👇 -
JAMstack architecture
Jamstack offers the simplicity of creating a dynamic website. No more maintaining a server and a frontend application. It offers everything at the same place. Let's learn how.
JAM in Jamstack stands for -JAMstack stands for JavaScript, APIs, and Markup.These can be termed as the basic building blocks of any Jamstack application, however, this is not an exhaustive list of components in a Jamstack application.
Although Jamstack has the word stack in it, it's definition is bound to a particular tech stack. It's more about the the architecture or shall we say, philosophy -
Legacy websites are slow, clunky, and highly complex. A jamstack website, in comparison, is highly modular, scalable , delivers better performance, higher security, lower cost of scaling, and better developer experience.
Here are two possible methods to identify whether a website is using Jamstack architecture -
It's hard to change the status-quo but Jamstack architecture is doing it, one-site at a time. Here is why people prefer a Jamstack architecture over legacy web architecture -
Speed of a website is the single most influential feature to decide user experience and Jamstack takes care of it like no other. When you deploy a website with Jamstack, the whole site is hosted on CDNs and allow faster access because every page is prebuilt and served from the Edge network.
Since you don't have to maintain your own server, it's a mitigated security risk in itself. Moreover, every server-side process is abstracted into a microservice API which makes it more secure. Since these APIs are working on the server you don't have to worry about your security keys getting exposed as you would expect in an all client-side implementation. For example, you can create an API endpoint for your site to communicate with Firebase and can store Firebase Config credentials in the same API file safely, because these credentials won't be bundled in your client-side code.
Since you aren't hosting any servers, all you have to do for scaling is serving static files that you built, on more points of CDN. As for the microservices that are mostly Lambda functions, they are highly scalable, thanks to domain expertise of services like Vercel, AWS, and others.
Since your site and API microservices are decoupled, you have tons of options to choose from, for your CMS like- Firebase, Sanity, Contentful, and others. Also you don't have to maintain your own server, hence removing your Devops problems.
For getting started with Jamstack, you have to choose 3 different components -
Although you can find the complete list of static site generators from https://www.staticgen.com, I personally would suggest you using NextJS for the following reasons -
If you have to manage a lot of content and that too frequently, you have to choose a CMS according to your need. You can find the one that suits you from https://headlesscms.org. I would personally suggest using Firebase for the following reasons -
You need an infrastructure to continuously watch for changes you commit to your repository and trigger a build on changes (CI/CD). Then host your static generated files on their CDN. I personally find Vercel extremely easy and powerful to use for the following reasons -
Now if you want to learn more about Jamstack or found anything incorrect, feel free to contact me on Twitter or maybe subscribe to my newsletter. Thanks and keep rockin'.
If you liked this post I'm sure you'll love what I usually share on Twitter, I share a lot of Growth & coding tips there ✌️