How JAMstack Is Shaking Up Static Application Development
In an API-driven world that is increasingly mobile, JAMstack is well-positioned to become a de facto method for application architecture and delivery.
The first generation of web applications that still impacts the internet was built with a stack that relies on web servers such as Apache and Nginx to deliver content. Now there is a more agile approach—JAMstack—emerging that no longer relies on a web server.
JAMstack is a stack that includes JavaScript, APIs and markup (JAM) for application delivery. It's a term that Netlify developers coined in 2016 to help define a movement that was already present at that time, with static site generators that weren't using traditional web servers. Today, JAMstack has been embraced by companies large and small.
Christian Bach, president and co-founder of Netlify, told ITPro Today that the growth of JAMstack is dependent on the world moving off monolithic web applications. The JAMstack web architecture is faster, safer, more scalable and more compatible with modern Git-based workflows, according to Bach.
"That movement really started over 10 years ago with the emergence of the API economy," he said. "Five years ago, we saw that this would inevitably come full circle and abstract away the web server."
Defining JAMstack
The term "JAMstack" came about because there was no easy way to explain the modern approach to application development, Bach said. JAMstack helps the community better explain the reinvention of workflows and hosting, he said.
For Brian Rinaldi, developer advocate at Stackbit, the term "JAMstack" is a bit confusing as the three main elements in the acronym don't really define what's unique.
"I think it's still a vague term because JavaScript, APIs and markup sounds like it describes almost any website on the internet," Rinaldi said.
JAMstack is more about the API-driven approach that also makes use of edge servers to deliver and accelerate web applications, he said. With a JAMstack-style application there is often some form of static website generator, which could be Jekyll, Hugo, React Static or Gatsby.
"We have gotten to the point where almost anything can become a JAMstack now as the tooling continues to get better," Rinaldi said.
Among the newest JAMstack tools is Redwood.js, which is led by GitHub co-founder Tom Preston-Werner. Redwood is particularly interesting, according to Rinaldi, as it's an attempt to simplify the development of complete applications using the JAMstack approach.
Gartner analyst Fintan Ryan is also optimistic about the potential for JAMstack and what it can enable for developers.
"There are opportunities for JAMstack that go well beyond static content management systems in terms of consuming packaged business capabilities via APIs within applications," Ryan told ITPro Today. "It is early days, but the possibilities for composable applications are very interesting."
The Challenges That JAMstack Helps to Solve
JAMstack arose to take advantage of how the browser has become essentially a mini operating system, capable of running complex client-side applications while interacting with multiple real-time APIs, according to Kyle Mathews, CEO and founder of Gatsby.
This was made possible by the rise of hundreds of modular cloud services and JavaScript leaping the front-end/back-end divide, via Node.js, which created real-time, two-way communication between client and server, he said.
"All website platforms aim, in one way or another, to abstract away the sheer number of steps required to render a typical website and the complex server-side operations required to present the final version in the user's browser," Mathews told ITPro Today.
The way the current web works is first the client requests a page, Mathews said, then the server queries a database for data and combines that with the page's markup to serve up a new HTML document to the web browser. Nearly all the work is done on the server side, and users have to wait for that work to be done. JAMstack flips this approach.
With JAMstack, all the server work is done upfront, Mathews said. The data fetching and HTML generation are done when something changes and then pushed to a content delivery network (CDN) as a collection of prebuilt pages. When a user requests content, the HTML and other files are sent to the browser with no further processing required, while APIs fill in whatever is required at runtime.
"The Gatsby framework makes it possible to build on JAMstack architecture, but with the complexity abstracted away that lets you trust that best practices and patterns that make a website fast are baked into the framework," Mathews said.
Mobility Is a Key Driver for JAMstack Development
While there are multiple use cases where JAMstack makes sense, a key driver for adoption is mobile application development.
A common way to develop a mobile application is to have the smartphone reach out to different APIs, such as Stripe or Twilio, according to Bach. Rather than building mobile sites and apps like legacy websites, there has emerged a need for an API-driven approach that has helped drive demand and the need for JAMstack.
"So suddenly, developers needed to build APIs for everything, and then these big monolithic existing websites became extremely redundant," Bach said.
The Future of JAMstack
For JAMstack advocates like Mathews, its future is the future of the internet.
"JAMstack is the way to take the efficiencies and logic of cloud-native software development and apply them to front-end web development," Mathews said. "Serving real-time data from as many different APIs as makes sense to have on your site, for example, meshes with core cloud-native components like microservices."
Bach also see promise for JAMstack as it continues to gain in popularity and companies large and small adopt the approach.
"We see it as a natural next step in the evolution of web production, and just like we stopped talking of the LAMP [Linux/Apache/MySQL/PHP] stack once it became default, we believe … that once JAMstack just becomes synonymous with the way web properties are built, we’ll see the term phase out as well."
About the Author
You May Also Like