David Heinemeier Hansson

September 24, 2021

Stimulus 3 + Turbo 7 = Hotwire 1.0

For so long, it felt like I could only tell half the story of how we make software for the web at Basecamp. Too many of the chapters about our front-end approach were missing key pages. Sure, we had some of it out there. Turbolinks, for example, hark back to 2012, when I was inspired by Chris Wanstrath's ideas in pjax, and took them further. And Stimulus can trace its origin to the Christmas 2016, when I spiked the first concept in an attempt to unify all the JavaScript patterns we had in Basecamp. But it was never... complete. Now it is.

Stimulus 3 + Turbo 7 paint the full picture of how my ideal stack for front-end development should look under the umbrella of Hotwire 1.0. This is how we're building Basecamp 4. This is how we built HEY. Now it's going to be the default answer to JavaScript in Rails 7 together with the new import-map approach. All the missing pages are being printed.

The story is getting out there, too. Three or four years ago, all anyone seemed to be focused on was building single-page applications with ever more complicated bundling pipelines and component frameworks. Babel me this, Webpack me that, React all the things. Today, less so.

If we start backwards, React's hegemony has splintered into a bunch of similar-but-different alternatives with Vue and Svelte. ESM is inspiring people to go build-less. And ES6 means we no longer need to transpile to write enjoyable JavaScript.

But it's bigger than that. There's a resurgence in the wisdom of letting HTML be at the center of a web application. Even the React folks are getting interested in server-side rendering. We just need a few more of them to realize that HTML is not just good for the first render, it's also great for all the subsequent ones. That's the essence of Hotwire: HTML Over The Wire. Use HTML to render the first page, of course, then use HTML to render the next, then use HTML to send partial updates.

HTML, HTML, HTML!

But it's bigger still than that. It's about spending some of those core advances in web technology to pay off the complexity loans we binged on during the 2010s. That same binge that gave rise to a thousand specialized niche web programmer roles, because nobody could possibly hold it all in their head all at once. That worked just fine for mega corporations like Facebook, but it raised some serious barriers for smaller teams, and made it almost impossible for anyone just starting out to follow "best practices".

We have to get back to the idea that a single developer might dare understand it all. Might do it all. Might build competitive web applications without having to blow their cap trying to cram in ever more complexity. We desperately need more conceptual compression.

That's what's at the heart of Hotwire. Conceptual compression. After a decade plus of rapid conceptual expansion, which, along with all the complexity, absolutely brought some real, material advantages, we can reap the key rewards by boiling it down to its essence. Fast, compelling user interfaces that let people get on with the job of... mostly creating, reading, updating, and deleting rows in a database.

Because twenty-five years after I wrote my first web application, that's still mostly what we do! Connecting databases to the web through workflows that help people organize, collaborate, and communicate with information technology. It may not be rocket surgery, but it's good honest work.

And yet, it's also good fun! Wrestling with the pendulum as it swings from conceptual expansion back to conceptual compression. Trying to turn all those real advances into something that's easier to use, more fun to work with. That's the stuff of A Life's Work.

Today that work has a concrete motto: HTML Over The Wire is the way.

About David Heinemeier Hansson

Made Basecamp and HEY for the underdogs as co-owner and CTO of 37signals. Created Ruby on Rails. Wrote REWORK, It Doesn't Have to Be Crazy at Work, and REMOTE. Won at Le Mans as a racing driver. Fought the big tech monopolies as an antitrust advocate. Invested in Danish startups.