Author: Cassidy Williams
Chances are, if you’ve been interested in web development lately, you’ve heard the term “Jamstack” thrown around. It can be confusing and hand-wavey, so let’s learn about what it actually is, why you want to use it, and how you can apply it to your projects!
A little history
What makes a site “Jamstack?”
My favorite definition to wrap my mind around Jamstack is the following:
Jamstack is about building web applications in the same style as mobile applications: the UI is compiled, and then data is pulled in as needed.
- Me, Cassidy, hello
I didn’t fully understand what the big deal was about Jamstack until I started thinking of it this way. Data can be pulled in whenever you like (e.g., when you build the site, when you load the site, when content is visible, when content is interacted with). It’s about the separation of concerns when you build it!
The phases of rendering
In a Jamstack website, there are two phases of pulling and compiling pages, content, and data: Build time and run time.
- Run time: This part of Jamstack is similar to a single-page application or a client-side rendered application. The data may be more user-specific or need to be updated frequently, so it has to be run in the user’s browser. This may be something like the current inventory of a product on a website, the current logged-in user’s avatar, or the weather at a user’s given location. Server-less functions can be particularly useful for querying data here, as well.
Brian Rinaldi , editor of the Jamstacked Newsletter, phrased these concepts of data very well: “Dynamic data isn’t just a client-side thing in a Jamstack application, and Jamstack developers need to think about each piece of content/data in terms of when it should be retrieved and rendered.” Once again, it’s all a matter of when!
The real power behind Jamstack development is decoupling your systems and services. By giving them a clean separation to run your site, each of them can be independently swapped out or upgraded and can own a certain domain of what you’re building. You can have one service handle authentication, one handling content, a couple handling the database and even different parts of your front end in different repositories. The massive amount of services and tools that you can use to put your sites together is growing daily and it’s an exciting time to be building in this way.
Start your own Jamstack website
You can start implementing the Jamstack style of development today. Your work has probably, at one point or another, fallen under this definition without your realizing it! The shift away from large, monolithic applications is happening in a big way and the future of web development is bright.
Here’s a set of resources that may be useful for you as you go off to build your own Jamstack-style sites:
- Jamstack Conf
- JAMstacked newsletter
- Jamstack Themes
- Site Generators for Jamstack sites
- Jamstack Slack and in-person events