惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Google DeepMind News
Google DeepMind News
SecWiki News
SecWiki News
博客园 - Franky
V
V2EX
罗磊的独立博客
美团技术团队
大猫的无限游戏
大猫的无限游戏
Simon Willison's Weblog
Simon Willison's Weblog
S
Securelist
C
Cyber Attacks, Cyber Crime and Cyber Security
Hugging Face - Blog
Hugging Face - Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Attack and Defense Labs
Attack and Defense Labs
WordPress大学
WordPress大学
Webroot Blog
Webroot Blog
N
News | PayPal Newsroom
博客园 - 司徒正美
V
Vulnerabilities – Threatpost
Scott Helme
Scott Helme
N
News and Events Feed by Topic
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Jina AI
Jina AI
腾讯CDC
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
雷峰网
雷峰网
Hacker News - Newest:
Hacker News - Newest: "LLM"
Cloudbric
Cloudbric
AI
AI
T
Threat Research - Cisco Blogs
PCI Perspectives
PCI Perspectives
N
News and Events Feed by Topic
Recent Commits to openclaw:main
Recent Commits to openclaw:main
月光博客
月光博客
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
Project Zero
Project Zero
Schneier on Security
Schneier on Security
TaoSecurity Blog
TaoSecurity Blog
博客园 - 【当耐特】
C
Cybersecurity and Infrastructure Security Agency CISA
量子位
P
Privacy & Cybersecurity Law Blog
博客园_首页
Last Week in AI
Last Week in AI
人人都是产品经理
人人都是产品经理
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
J
Java Code Geeks
P
Proofpoint News Feed

Adactio: Links

Who Will Save the Internet From Disappearing? From human hands. Your ‘App’ Could Have Been a Webpage (so I fixed it for you…) The Descent — What Happened to the Frontend While You Weren't Watching Abject Praise - Infrequently Noted Talk: Let Jeffrey Zeldman Presents - Memories Can’t Wait—or, How I Learned to Keep Worrying About the Web - State of the Web The AI Resist List Notes & Narratives Show your hands honor for the strange power they bring you The golden rule of Customizable Select Storied Colors How building an HTML-first site doubled our users overnight The Field Guide to CSS Grid Lanes Happy Monday everyone, and let's talk about gender and ethnicity ratios at tech events. AI and the Rise of Mediocrity The value is in the difficulty - Annotated Tito as Gaeilge Three things about data Native Apps Should Be Avoided Whenever Possible — No One's Happy WebKit Features for Safari 26.5 I knew my writing students were using AI. Their confessions led to a powerful teaching moment | Micah Nathan Better Browser Caching with No-Vary-Search Google’s Prompt API The Boring Internet Reminder: You Can Stitch Together Lots of Little HTML Pages With Navigations For Interactions Netizen | Derek Sivers Anti-work Let’s Use the Nonexistent ::nth-letter Selector Now | CSS-Tricks Two Paradigms for Enhancing HTML Tags It's Not AI. It's FOMOnetization. The end of responsive images Alistair Davidson / validation-enhancer · GitLab Never Lose Form Progress Again :: Aaron Gustafson Expansion artifacts No-stack web development Design and Engineering, As One · Matthias Ott Conference organising in 2026 AI Might Be Our Best Shot At Taking Back The Open Web | Techdirt The AI Great Leap Forward they told me the internet was forever Web Day Out - 12 March 2026 Bruce Lawson's personal site Progressive Web Components What we think is a decline in literacy is a design problem | Aeon Essays The End : Focal Curve Flood fill vs. the magic circle Web of State of the Browser Day Out SXSW 02006 Working with agents doesn't feel like flow — Bill de hÓra HTML Video Poster Image: Enable Responsive Images and ALT Text for Poster
HTMX and Web Components Instead of React
2026-07-14 · via Adactio: Links

HTMX and Web Components Instead of React

I work as a software architect at FernUniversität in Hagen on LEAD:FUH, a learning-analytics data platform handling highly sensitive student data. This post completes the frontend story the CSS post started: That one was about styling, this one is about why there is no frontend framework underneath it.

Start from the shape of the application

Choosing a frontend stack before looking at the application is how React becomes a default instead of a decision. So, inventory first. The frontends on a data platform are a metadata catalog, operations dashboards, privacy reports, and detail pages: Search something, browse a list, open a detail view, expand a data preview, follow lineage. Every one of these interactions is naturally a request followed by a response, rendered as a page or a fragment of one.

This shape matters because the single biggest cost of the SPA model is that it duplicates the server. State lives twice, once in the database and once in the client store. Rendering logic lives twice, as templates on the server and components on the client. And between the two halves you must now build and version an API which exists only to feed your own frontend. For an application which is genuinely client-state-heavy, like a collaborative editor or a design tool, this duplication buys responsiveness you cannot get any other way, and it is worth every line. For a catalog with a search box it is pure overhead.

So instead of asking "why not React?" we asked: Which of our actual problems would React solve? We went through the list. There were none.

HTMX: the server stays the source of truth

What the request/response-shaped majority of the platform needs is hypermedia with less full-page reloading, and that is precisely the niche HTMX [1] fills. The server renders HTML and HTMX swaps fragments of it into the page. There is no client-side state store, because the state is where it always was: in the database, projected through a template.

Two conventions carry most of the design:

  • One canonical URL, content-negotiated. A search like /catalog?q=… returns either the full page or just the result-cards fragment, depending on whether HTMX made the request. There are no separate /partials/… routes to keep in sync with the real ones. The URL surface stays small, and every fragment is also a bookmarkable page.

  • The URL carries the state. Search terms and filters live in the query string, not in a JavaScript store. Back/forward works. Copying the URL shares the exact view. Nobody implemented "deep linking" as a feature, it is simply what URLs do when you do not take it away from them.

None of this is new. It is how the web worked before we collectively decided to reimplement the browser inside the browser. The contribution of HTMX is removing the last excuse for abandoning that model: full-page reloads.

Web components: islands for the genuinely interactive

A real application is never purely request/response. Ours has sortable tables, dialogs, tabs, live status indicators, a relative-time display, a line chart, and, as the most demanding one, an interactive lineage graph. This is where the client-side logic genuinely lives, and where we use vanilla web components: standard HTMLElement subclasses on a shared base class of twenty lines, served as plain ES modules. No build step, no virtual DOM, no framework runtime [2] .

Two things surprised me about how far this carries. First, the ceiling is much higher than the folklore suggests: The lineage graph with pan, zoom, node selection, and dynamic layout is a web component like any other, and at no point did it hit a wall which a framework would have moved. Second, the component count stays low, around twenty for the whole platform, because most of what SPA codebases express as components is just server-rendered HTML with CSS in our stack. A component has to earn its place by having actual behaviour.

The two layers compose cleanly: HTMX swaps a fragment in, the browser upgrades any custom elements in it, and the components attach their behaviour. There is no hydration step and there are no "client boundary" annotations. The component model of the platform is the browser's.

The accessibility dividend

There is a quieter benefit to making components an explicit opt-in, and it took me a while to name it: Every component starts with the question "does a semantic element already exist for this?", and remarkably often the answer is yes. A native <dialog> brings focus trapping, the Escape key, and correct semantics. A <details> element is a disclosure widget with keyboard support built in. A real <button> is focusable, announces itself to a screen reader, and activates on both Enter and Space. A <table> is navigable by assistive technology in ways a grid of <div>s never will be.

You can write semantic, accessible HTML in React as well, and good teams do. But the component-first model puts the burden on remembering: Everything is a component, so nothing forces the pause in which you ask whether the platform already solved this. The result is the framework ecosystem's signature failure mode, the <div onClick> which is invisible to keyboards and screen readers. Not out of malice, but because nothing in the workflow ever asked.

Our inversion makes that pause structural. Semantic HTML is the default and a custom element is an exception which has to be argued for. And when a component is justified, it wraps and enhances native elements instead of replacing them: The sortable table is still a <table>, the dialog component still renders a <dialog>. Here is the essence of our dialog component, condensed from the real one:

export class LeadDialog extends LeadElement { static tagName = "lead-dialog"; static props = ["label"]; connectedCallback() { const dialog = document.createElement("dialog"); if (this.id) { dialog.setAttribute("aria-labelledby", this.id + "-title"); } // …move the slotted children inside, render a header with // the label and an aria-labelled close button… this.appendChild(dialog); this._dialog = dialog; super.connectedCallback(); } open() { this._dialog.showModal(); } close() { this._dialog.close(); } }

Notice what the component does not implement: open() is one call to showModal(). The focus trap, the Escape key, the ::backdrop, and the inert page behind the dialog all come from the browser. The component's contribution is composition and labeling. The accessibility heavy lifting was already done by people who do nothing else. Compare this with the modal implementations in any component library, which re-create exactly these behaviours in userland, each with its own bugs.

For a university platform accessibility is a legal obligation, and the cheapest accessibility work is the work the browser has already done.

What we gave up

This is not a free lunch. We gave up the React ecosystem with its thousand ready-made date-pickers, virtualized grids, and drag-and-drop libraries. When we need such a thing, we build a smaller version of exactly what we need, or we go without. We gave up optimistic UI updates. Every mutation is a round trip, which our users on a university network do not notice, but yours on mobile might. And we gave up the enormous React hiring pool and its training material, which is a real consideration for a team which recruits.

If we were building collaborative editing, offline-first mobile, or anything where the client legitimately owns complex state, this would be a different post. Frameworks are specialized tools. Their specialty, rich client-side state, is something most applications, and very nearly all internal platform frontends, simply do not have.

The ten-year argument

The deciding constraint is operational: This platform is built to be handed over and operated long after the project which built it ends. That horizon changes the framework calculus completely.

A React codebase from ten years ago is a migration project today: class components, deprecated lifecycles, a build toolchain which no longer runs. The frontend stack of this platform is HTML over HTTP, CSS variables, and standard custom elements. The only runtime is the browser, and browser vendors have a quarter-century record of not breaking it. HTMX is the one dependency in the chain, and it is a small, replaceable one, more a convention over fetch and innerHTML than a platform we are married to.

A future maintainer needs to know HTML, CSS, HTTP, and JavaScript. Those are skills every web developer already has and a university can hire for. For code which must outlive its builders, betting on the web platform is the only bet with a track record.

Summary

We looked at the shape of our applications first, and that shape is request/response. HTMX keeps the server the single source of truth for the hypermedia majority, around twenty vanilla web components cover the genuinely interactive islands, and semantic HTML as the default gives us most of the accessibility work for free. The trade-offs are real. But for a platform which must be operated for a decade by people who did not build it, web standards are the safer bet than any framework generation.

References

1
Gross, C., Stepinski, A. & Akşimşek, D. (2023). Hypermedia Systems. hypermedia.systems — the conceptual foundation behind HTMX: hypermedia as the application engine, with the server as the source of truth.
2
Miller, J. (2020). "Islands Architecture." jasonformat.com/islands-architecture — server-rendered pages with isolated interactive islands; we implement the islands as standard custom elements.