Modern Web Development on the JAMstack

In just the past few years, a flurry of advancements has greatly strengthened the web as a content and application platform. Brows‐ ers are much more powerful. JavaScript has matured. WebAssembly is on the horizon. It certainly feels like the beginning of a new chap‐ ter for the web. You’ve likely felt this as you’ve witnessed the explo‐ sion of new frontend frameworks and API-based services.

# Client-Side Processing # PWA # JamStack
Modern Web Development on the JAMstack

Introduction

From Book

In just the past few years, a flurry of advancements has greatly strengthened the web as a content and application platform. Brows‐ ers are much more powerful. JavaScript has matured. WebAssembly is on the horizon. It certainly feels like the beginning of a new chap‐ ter for the web. You’ve likely felt this as you’ve witnessed the explo‐ sion of new frontend frameworks and API-based services.

Although what’s technically possible in the browser has advanced, so too have expectations for immediacy. Videos must play instantly. Browser applications must launch faster than their desktop counter‐ parts. Users have become increasingly mobile and increasingly impatient—we are all fed up with slow pages and we vote angrily against them with the back button. (Google also seems to be losing patience, and now factors site speed into its famous ranking algo‐ rithms.)

Broadly speaking, this book covers new, modern approaches to building websites that perform as fast as possible. More concretely, this book shows you how to run any web property, from simple sites to complex applications, on a global Content Delivery Network (CDN) and without a single web server. We introduce you to the JAMstack: a powerful new approach for deploying fast, highly scala‐ ble sites and applications that don’t require traditional frontend infrastructure. If you tend to feel delivering great websites should be more about the craft of markup and JavaScript than server setup and administration, you’ve found your book.

And, if you’ve ever struggled with any monolithic system or frame‐ work—wrestling with hosting, deploying changes, securing, and scaling everything—you already understand why the JAMstack is becoming so popular. It’s one of those rare shifts in the landscape that delivers a productivity boost for developers and a large perfor‐ mance boost for users. The JAMstack is helping to bring about a more secure, stable, and performant web that’s also more fun to develop and create for.

Under this new approach, there isn’t a “server environment” at all— at least not in the traditional sense. Instead, HTML is prerendered into static files, sites are served from a global CDN, and tasks that were once processed and managed server side are now performed via APIs and microservices.

We realize that seasoned web developers might eye anything new with quite a bit of skepticism. There have certainly been countless other new ideas on how to build the web before. For nearly three decades, the developer community has explored ways to make the web easier and faster to develop, more capable, more performant, and more secure.

At times, though, the effort has seemed to trade one goal for another. Wordpress, for example, became a revolution in making content easier to author—but anyone who’s scaled a high-traffic Wordpress site knows it also brings a whole set of new challenges in performance and security. Trading the simplicity of HTML files for database-powered content means facing the very real threats that sites might crash as they become popular or are hacked when nobody is watching closely.

And dynamically transforming content into HTML—each and every time it’s requested—takes quite a few compute cycles. To mitigate all the overhead, many web stacks have introduced intricate and clever caching schemes at almost every level, from the database on up. But these complex setups have often made the development process feel cumbersome and fragile. It can be difficult to get any work done on a site when you can’t get it running and testable on your own laptop. (Trust us, we know.)

All these challenges have led the developer community to begin exploring the JAMstack as a modern refactoring of the way websites are developed and served. And like any good refactoring, you’ll find that it both advances and simplifies the stack. Being web developers ourselves, the authors of this book are more excited by the JAMstack than we’ve been about any emerging trend for quite a while. That’s because it uniquely solves for all these com‐ mon problems—developer experience, performance, and security— all at the same time, and all without one compromising the other. To us, it feels like the logical future of the platform.

It just makes sense.

Developer Jonathan Prozzi said it best on Twitter: “My learning journey leading to #JAMstack has re-ignited my interest and passion for web technology.” We think the JAMstack can do a lot to rekindle your own enthusiasm, too, and we’re eager to welcome you to the growing community of JAMstack practitioners. You’ll find develop‐ ing for the web has become fun and fearless all over again.

How to Get

Download From Netlify (PDF): oreilly-modern-web-development-on-the-jamstack.pdf