What is JAMstack?
If you haven’t heard of JAMstack yet, don’t be worried.
As an IT company, we’re always trying to find ways to bridge the gap between the world of development and what our clients do.
This week we’re going to be taking a look at a development architecture that’s been taking our world by storm since it came to life in 2016 – JAMstack itself.
So, what is JAMstack?!
As a web development architecture, it’s there to make scaling up easy as it means you’ll no longer have to rely on a web server.
Finally, markup is something that should be pre-built at deploy time.
Just like any workflow, you have to be sold on the benefits before you start to roll it out.
Luckily, there are a number of awesome benefits that JAMstack can bring, just like:
- 🚀 Ultra Speedy Performance – you can serve pre-built mark-up through your CDN.
- 🛡️ Better security – no need to worry about server or database vulnerability.
- 💲 Less expensive – hosting static files is so much cheaper, and sometimes it’s even free!
- 🖥️ Improving your developer experience – JAMstack allows front end developers to focus on what they do best – front end development. Without being tied to a monolithic architecture, development is usually quicker and more focussed.
- 📈 Scalability – should your app take off, the CDN does all the hard work for you, compensating for the heavier load.
What does a JAMstack workflow look like?
Just like with any development practice, JAMstack has its own special workflow.
As you’ve probably gathered, it varies a bit from a traditional development workflow, so let’s take and compare the two.
Traditional Development Workflow
- Developer prepares – writes the website code, and then ships it to the server.
- Sever produces – renders HTML based on the developer’s templates and content from the database.
- The client visits the website and waits till the website is rendered and then provided to him.
- Using Static Site Generator (SSG), the developer writes the code and then ships them to the CDN as rendered HTML.
- The CDN then serves the rendered website.
- Your client can visit the website that is already rendered without waiting for the server.
First appearances can be deceiving, as these workflows don’t look as different as they really are.
To go into a bit more detail, building and hosting are coupled in traditional workflows, whereas they’re decoupled in JAMstack.
Traditionally, when a user is requesting a page, he will be served after a series of interactions between the database, backend code, server, browser, and caching.
With JAMstack, he gets served directly from the CDN. Traditionally, servers and databases have to be maintained (often via FTP) whereas JAMstack allows it to be pushed through Git and done through modern tools like static site generators.
Most popular JAMstack Static Site Generators
You can use different Static Site Generator, based on the language you use for coding.
The most popular ones I’ve listed below:
|Hugo||Go||Hugo is another leader of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.|
|Jekyll||Ruby||One of the originals in this generation of static site generator.|
JAMstack best practices
Having just taken a look at workflow, there are a number of JAMstack best practices, which you might recognize from the workflow above!
It’s important to keep these in mind as they’ll help you get the most out of your project. These are:
- Using a CDN – by using a content delivery network, all markups and pre-built assets can be easily served, which increases scalability and performance.
- Atomic deploys – helps eliminate the maintenance window so your app/site is always available.
- Cache invalidation – is done by the CDN, which means whenever your build is uploaded, it goes live in an instance.
- Version control – by doing everything in version control, you’ll get to see every tiny change and trace who did what.
- Automated builds – this works by notifying your server when a build is required. The server then builds the project, updates the CDN, and then makes the site live.
Is my site built with JAMstack?
If you’re unsure if your site is built using JAMstack, there are a couple of ways to check.
Websites that are built using a CMS like WordPress or Drupal isn’t JAMstack, and neither are monolithic-server apps that rely on Ruby, Node, or other similar back-end languages.
If you’re still not sure, though, we’d definitely suggest having a word with your development team.
How can Pagepro help?
We love getting our teeth into new and exciting projects, and helping your app or website come to life is no exception.
Our team is well-versed in JAMstack (especially Gatsby), and we’re here to help make it accessible to you and your company, too.
So, if you’d like to know more, how about getting in touch? Even if it’s just a friendly chat, we’re here for you.
Need help with JAMstack Gatsby project?