Components of a Hypermedia System
The canonical theoretical foundation for hypermedia-driven web applications, drawn from Carson Gross et al.'s book Hypermedia Systems. This chapter decomposes the web into four components (hypermedia, protocol, server, client), then traces through Roy Fielding's REST architectural constraints — particularly the uniform interface and HATEOAS — to explain why hypermedia systems are more flexible than JSON APIs and what "RESTful" actually means.
Key Quotes
"REST, as coined by Fielding, describes the pre-API web, and letting go of the current, common usage of the term REST to simply mean 'a JSON API' is necessary to develop a proper understanding of the idea."
The authors' central polemic. Fielding wrote his dissertation before JSON APIs and AJAX existed — he was describing HTML over HTTP as a hypermedia system. The term "REST" has since been co-opted to mean "any JSON-over-HTTP API," which is not only wrong but structurally impossible: a JSON API without hypermedia controls cannot satisfy the uniform interface constraint. This is the theoretical backing for the HTMX project's entire stance. The practical pages in this wiki — How I Use HTMX with Go, Progressively Enhanced Forms with HTMX, The GUS Stack — Go, Unix, SQLite — are all implementations of this theoretical position.
"The trade-off, though, is that a uniform interface degrades efficiency, since information is transferred in a standardized form rather than one which is specific to an application's needs."
Fielding, quoted by the authors, acknowledging the cost. RESTful hypermedia is less efficient on the wire than a bespoke JSON format. The HTML representation of a contact is larger than the JSON equivalent. The trade is representational efficiency for flexibility: a client that only knows how to render HTML can navigate any hypermedia API without prior coordination. This is the tradeoff that SPA advocates see as a bug and hypermedia advocates see as the feature. It's also the tradeoff that agents don't need to make — an LLM can read both formats — which raises the question of whether REST's flexibility premium matters in an agentic world.
"Hypermedia As The Engine of Application State (HATEOAS). This constraint is closely related to the previous self-describing message constraint."
The chapter's most practically useful section walks through the same endpoint (/contacts/42) returning HTML vs. JSON under three scenarios: active contact, archived contact, and contact with a new "message" feature. In every case, the HTML self-describes the available operations — when the contact is archived, the "Archive" button disappears and an "Unarchive" button appears. The JSON representation is unchanged; the client must know from external documentation what the "status": "Archived" string means and what operations it permits. This is not a hypothetical — it's the structural reason hypermedia APIs don't need versioning and JSON APIs do.
"Due to this flexibility, hypermedia APIs do not have the versioning headaches that JSON Data APIs do."
The chapter's strongest claim, and the one with the most practical consequence. Once a hypermedia-driven application has been entered through an entry-point URL, all further navigation is encoded in self-describing messages. A server can add, remove, or change operations and URLs without breaking clients — the client simply renders whatever HTML it receives. This is why the GUS Stack's "HTMX as much as possible" prescription works: the server owns all application state, and the client is a rendering engine. The tradeoff, as Progressively Enhanced Forms with HTMX documents, is that partial updates create stale-data problems that a full hypermedia client (the browser) was never designed to handle.
"A strange thing about HTML, though, is that the native hypermedia controls can only issue HTTP
GETandPOSTrequests."
The authors flag HTML's most glaring omission: anchors only do GET, forms only do GET or POST. PUT, PATCH, and DELETE require JavaScript. This is an "obvious shortcoming" that the authors hope the HTML specification will fix — and in the meantime, HTMX patches it by adding hx-put, hx-patch, and hx-delete attributes. The chapter's treatment of this limitation is honest: it's a design flaw, not a feature, and the workaround (JavaScript) is acknowledged as necessary.
"Scripting was and is a native aspect of the original RESTful model of the web, and thus should of course be allowed in a Hypermedia-Driven Application."
Fielding's Code-On-Demand constraint (Section 5.1.7) is the escape hatch: REST allows scripting, provided it extends rather than replaces the hypermedia model. The authors' position is that JavaScript used to augment HTML (add PUT/DELETE methods, add client-side validation, add animations) is RESTful. JavaScript used to replace HTML (SPA frameworks that treat the DOM as a rendering target for a client-side model) is not. This is the theoretical line that HTMX draws, and it's grounded in the original REST dissertation, not just aesthetic preference.
"The beginning of wisdom is to call things by their right names." — Confucius, quoted in the HTML5 Soup appendix
The chapter closes with practical HTML advice: use semantic elements (<article>, <nav>, <section>) when they genuinely fit, but don't force them — sometimes <div> is the right choice. The HTML spec is the authoritative source; everything else is hearsay. This appendix feels appended rather than integrated, but its advice is sound and its brevity is a feature.
Key Themes
-
The four-component model of hypermedia systems: Hypermedia (HTML), network protocol (HTTP), server, and client. Each is necessary; the system's properties emerge from their interaction. A good hypermedia client is the most overlooked component — without one that properly interprets hypermedia controls, the uniform interface delivers no value. This is why JSON APIs rarely adopt hypermedia controls: their clients are fixed-format parsers, not hypermedia interpreters.
-
REST as pre-API web architecture: Fielding's dissertation described the early web — HTML over HTTP — as a novel distributed system architecture. The constraints (client-server, statelessness, caching, uniform interface, layered system, optional code-on-demand) were descriptive, not prescriptive. The chapter's contribution is making these constraints concrete for web developers through the HTML-vs-JSON comparison.
-
Self-descriptive messages as the keystone: The uniform interface constraint has four sub-constraints, but self-descriptive messages and HATEOAS are the two that differentiate hypermedia from data APIs. A self-describing message contains all information needed to both display and operate on the resource. This means the client needs no out-of-band knowledge — no API docs, no shared understanding of status enums, no URL conventions. The browser is the canonical client that knows how to render HTML and nothing else, yet can navigate any hypermedia application.
-
HATEOAS eliminates API versioning: The chapter's strongest practical result. Because application state is encoded in the hypermedia response (not in a client-side model), servers can change operations, URLs, and workflows without breaking clients. This is not a performance optimization — it's a structural property of self-describing messages. The cost is representational inefficiency (HTML is larger than JSON) and reduced client-side interactivity (every state change is a server roundtrip).
-
HTTP methods and response codes as semantic infrastructure: The chapter argues that a well-crafted hypermedia-driven application uses HTTP methods and response codes as designed — GET for reads, POST/PUT/PATCH/DELETE for writes, 201 for created, 303 for POST-redirect-GET — rather than POST+200 for everything. This is "going with the grain" of the web. The gap between HTTP's method vocabulary and HTML's control vocabulary (anchors only do GET, forms only do GET/POST) is the structural reason HTMX exists.
-
Scripting as augmentation, not replacement: Code-On-Demand is an optional but legitimate REST constraint. The chapter's line is clear: JavaScript that extends the hypermedia model (adding HTTP methods, enhancing UX) is RESTful; JavaScript that replaces it (client-side routing, client-side models, JSON data exchange) is not. This isn't an anti-JavaScript position — it's a boundary condition. HTMX lives on the augmentation side of the line; React, Vue, and Svelte live on the replacement side.
-
The HTML5 semantic elements caveat: The appendix warns against cargo-cult semantics —
<article>implies self-contained, reusable content; using it where that's false makes false promises to search engines, scrapers, and assistive technology. The advice is practical: check the spec, and use<div>when you can't be specific.
Critical Analysis
This chapter is the theoretical backbone that the HTMX ecosystem often skips. Most HTMX advocacy focuses on developer experience (less JavaScript, server-side rendering, simpler deployments). This chapter grounds those practical arguments in Fielding's architectural theory. The claim isn't "HTMX is nicer to write" — it's "HTMX is RESTful in the original, architectural sense, and JSON SPAs are not." Whether that distinction matters in practice is a separate question, but the chapter makes the strongest possible case that it should.
The HTML-vs-JSON comparison is the chapter's killer app. Walking through the same endpoint under three scenarios (active, archived, new-feature) demonstrates the HATEOAS difference more clearly than any abstract explanation could. This is the section to point people at when they ask "why hypermedia?" The comparison is fair — it doesn't strawman JSON APIs, it just shows what each representation communicates and what it requires the client to already know.
The chapter is honest about tradeoffs in a way advocacy rarely is. Fielding's own words are quoted acknowledging the efficiency cost of the uniform interface. The session-cookie violation of statelessness is acknowledged as pragmatic and useful. HTML's method vocabulary limitation is called out as an "obvious shortcoming." Scripting is explicitly permitted. This isn't a purity argument — it's a "know what you're trading" argument.
The practical implications for the wiki's existing pages are direct. How I Use HTMX with Go's dual-mode handler pattern (check HX-Request, return partial or full page) is the self-descriptive messages constraint in practice: the response tells the client what it needs. Progressively Enhanced Forms with HTMX's build-without-JS-first workflow is Code-On-Demand done right: the HTML/HTTP layer works standalone, and HTMX enhances it. The GUS Stack — Go, Unix, SQLite's "HTMX as much as possible" qualifier maps to the chapter's scripting boundary: HTMX for the hypermedia core, JavaScript only when the hypermedia model genuinely can't express the interaction.
What the chapter doesn't address: the agentic development angle. Written before the explosion of AI coding agents, the chapter argues that hypermedia's flexibility benefits human developers by eliminating API versioning and client-server coordination. But in an agentic world, where an LLM can read API documentation and generate client code automatically, does the flexibility premium still matter? The counterargument is that hypermedia's simplicity benefits agents even more than humans — an agent that only needs to generate HTML is more reliable than one that must coordinate client and server code. The GUS Stack article makes this case implicitly; the chapter provides the theoretical vocabulary to make it explicit.
The HTML5 Soup appendix is a non-sequitur that works anyway. It's appended to the chapter with no transition, covering HTML semantic elements and spec-reading discipline. The connection is "here's practical HTML advice now that you understand the theory" — and while the bridge is weak, the advice is sound. The "check the spec" recommendation is especially relevant in an era where agents often generate HTML based on training-data patterns rather than spec compliance.
Sources: raw/components-of-a-hypermedia-system, Components of a Hypermedia System Last updated: 2026-08-08