c't < webdev >

Henning Koch

Henning is a co-founder of makandra, a development agency for bespoke web applications. For over 10 years he's been building and maintaining Unpoly, a hypermedia framework for building dynamic UI on the server.

Website: https://triskweline.de/


Session

11-19
13:15
45min
The Limits of Hypermedia
Henning Koch

Hypermedia frameworks like htmx or Unpoly are positioning themselves as simpler alternatives to single-page applications. Yet many of us recall earlier server-rendered experiences as slow, cumbersome and limited. Can hypermedia apps really meet the needs we've come to expect SPA frameworks to handle for us?

But just as modern React is unrecognizable from its early days, hypermedia frameworks have improved radically over the last decade. Today's server-rendered approaches effectively handle UI problems traditionally thought to require extensive client-side scripting. At the same time, hypermedia apps have some surprising limitations that you might not even have on your radar.

In my talk, I want to help you decide whether adopting hypermedia makes sense for your project, especially if your experience is mostly with SPAs.

I will address questions frontend developers typically have:

  • Is it possible to achieve the same responsiveness that users have come to expect from SPAs?
  • How would dynamic forms with dependent fields and inline validation work without extensive JavaScript?
  • Can server-side rendering manage intricate UI interactions, such as multi-step modals, optimistic rendering, and client-side state preservation?
  • Where does state go when I don't have components on the client?

I want to show where SPAs still have an edge, in particular with highly interactive, offline-first applications and with their ecosystem of pre-built component libraries.

The talk will feature examples from the Unpoly hypermedia framework, which has many parallels to htmx. But where htmx emphasizes minimalism and simplicity, Unpoly aims for a high-level API that supports SPA-like interactivity out of the box. I'll show how Unpoly:

  • ... updates page fragments to preserve client-side state.
  • ... handles forms with complex dependencies and concurrent input.
  • ... handles flaky internet connections with caching, preloading and offline events.
  • ... implements multi-page interactions within overlays, then returns to the background page with additional context.
  • ... makes long-loading interactions appear more responsive through optimistic UI updates.

We will also explore why "just using the platform" without a framework often falls short. While the minimalism of avoiding frameworks entirely seems appealing at first, platform APIs are often too low-level to support robust UIs without substantial custom code.

After ten years of building both hypermedia apps and SPAs, I'm eager to share what works and what doesn't. I hope that by the end of my talk you'll know all the trade-offs to decide when hypermedia can simplify your stack, and when an SPA remains the better fit.

Stage 2 (second floor)