Migrate to Netlify Today

Netlify announces the next evolution of Gatsby Cloud. Learn more

ContactSign Up

What is the Jamstack?

Have you heard about the Jamstack yet? Looking for an introduction to the web paradigm that’s changing the way the modern web is being built? Read below for a quick overview!

Jamstack is a modern architecture for building websites and applications. The JAM in JAMStack stands for JavaScript, APIs, and HTML markup. Unlike websites built using WordPress or Drupal, Jamstack sites do not require a database. You can even skip the webserver, and opt to host your site using an object storage service and a content delivery network (or CDN).

With more traditional websites, such as those built using WordPress or Drupal, content is stored in a database. There’s also a presentation layer of template files that mix HTML markup with template tags. Template tags are placeholders for pieces of content, e.g. {{ title }} for the title of the page.

A software layer then pulls it all together: it retrieves content from the database, replaces template tags with the appropriate chunks of content, and returns it all to the browser. A single page gets regenerated each time the server receives a request for that URL.

In this type of architecture, the frontend (what you see in the browser) and backend (the database and software layer) are tightly coupled. Both the content and how it’s presented are part of the same code base — sometimes called a monolithic architecture. Content is only available as HTML and can only be consumed by clients (e.g. web browsers) that can parse HTML.

In a Jamstack architecture, however, the frontend and backend are decoupled. A JAMStack frontend consists of JavaScript, HTML, and CSS. Gatsby generates these files during the build process.

A Jamstack backend is a content API that returns JSON or XML. This API can be a hosted datastore, a headless CMS, or a custom application. It’s only concerned with serving JSON or XML, which means you can use the same API for your Gatsby site and native applications.

Advantages of a Jamstack Architecture

JAMStack sites, such as those created with Gatsby, offer four key advantages over other website architectures.

Speed & Performance icon

Speed & Performance

Jamstack sites offer surperior performance by optimizing the way they are delivered to the end user. They lack the overhead caused by software and database layers and as a result, they render and load more quickly than sites that use monolithic architectures. They are also loaded from a Content Delivery Network closer to a user than a traditional web server.

Security icon

Security

No database and no software layer means that Jamstack sites are not vulnerable to SQL injection or server-side code injection attacks. Pages are compiled in advance, so they aren’t at risk of a server-side includes injection attack. Hosting your site on a content delivery network offers protection from denial of service attacks. Shifting to a Jamstack architecture limits or eliminates entire classes of vulnerabilities.

Developer Experience icon

Developer Experience

Frontend developers can build sites without needing to know a server-side language. Backend developers can focus on building APIs. Decoupled development teams can work in parallel, allowing each team to focus on what they do best. Using a third-party CMS service also means that your developer-operations team doesn’t have to manage a separate stack for content.

Affordability icon

Affordability

Because they are made up of mostly static files, Jamstack sites have a much lower hosting cost. Files and images bundled and delivered via a CDN can bring down hosting bills by 90%.

Get started in minutes

Launch your Gatsby website in Gatsby Cloud for the optimal experience.

Get started free
© 2024 Gatsby, Inc.