JAMstack, what’s all the fuss about? It promises website performance, scalabilty, and security - based on prerendered static websites. Here's what I learned at the conference.
JAMstack is an approach to web development that seeks to reduce the infrastructure to a minimum and achieve projects mostly with frontend-ish code and build tools. Practically, based on my experience at this conference, that’s expressing as Headless CMS, pre-rendered HTML, CDN’s, and functions-as-a-service. Unsurprisingly, Netlify is a champion of the concept, and the conference organizer - as their product is a useful infrastructure under a JAMstack project.
The concept is half archaic / half futuristic. It has a lot going for it, and a few annoying bits. I like the technology, and I enjoyed the conference: I feel like its one of these frontiers where people are challenging the status quo with many new ideas, which is always fun. You get to ask yourself if is this the next big thing, or quackery.
My takeaways from the day - talks and ‘hallway’ track included:
Overall, a well organized event, good vibe, cool venue, entertaining moderation from MC Phil Hawksworth. Here's the video where we all wished Chris Coyier to get well after an accident prevented him from joining the conference:
Convincing end-to-end demo of how fast and easily you can do a JAMstack project, thanks to VUE, Nuxt, serverless functions, and Netlify. Demonstrated a “static site”, that’s dynamic.
Example of an e-commerce site on JAMstack- thanks to a frontend SPA to manage the cart, and using serverless functions to securely call a payment system (Stripe).
Really interesting project - kind of a mind-bender - still trying to really understand it, actually. On the tin it says: “Build Modern JAMstack Websites in Minutes. Combine any Theme, Site Generator and CMS without complicated integrations”
The core seems to be that a Theme for Stackbit is usable for any (supported) CMS. How? The Theme not only includes the usual rendering templates, but also a complete Content Model and hints for what UI widgets the CMS should use, in a ‘stackbit.yaml’ file. This stackbit configuration is kind of a lingua franca, esperonto thingy that then is processed by an adapter for a supported CMS into the CMS’ own content model configuration. The adapter also covers the REST APIs for the CMS. And a similar story for Static Site Generators.
Great performance improvements as a result of JAMstack. Page loads under 1 second on 3G. They are using Netlify CMS, and all content is in markdown files in github.
Efficiently control CSS with code, it gives CSS object model an actual API. You can make very dynamic effects.
The evolution from Server to Serverless: At first we had our own servers at home, then managed in a rack in someone's facility, then VPS, then specific features, and now you don’t have to mangage anything. Just write your function, the service takes care of the rest.
Compute is super cheap now: Just as an example, the Squarespace guy needed 20K for redundant servers to get started with a few years ago. That’s a barrier to entry, now you can get started for nothing. 1 million requests for free. 2 million requests for 5$ a month. Empowerment: What can people create now if money and tech are not obstacles?
Some key usecases for serverless functions: Simple proxy to connect to remote API’s from the frontend, without exposing credentials to the browser. Chatbots. Event-based file processing.
These two did a very entertaining and well-presented talk about optimizing a web app for load and “time to interactive”. The scenario was a “Mine Sweeper” game loading at 2G and 3G speeds. They wanted to use a bundling system to optimize delivery, but quickly found Webpack config to be very confusing to work with. They preferred working with Rollup, even though they had to create their own plugins, as they at least fully understood what they were doing, and felt that they would be more maintainable for that reason.
Optimization techniques (wish I had taken better notes):
My thanks to everyone at the event, for the good talks, nice chats, and fun. And now I’m buckling down to dig into my page-long list of new technologies and ideas to check out.