SEO: HTMX or Java Components: Two Paths to Skipping the SPA - #1107
Open
MatthewHawkins wants to merge 5 commits into
Open
MatthewHawkins wants to merge 5 commits into
MatthewHawkins wants to merge 5 commits into
Conversation
MatthewHawkins
requested review from
EHandtkeBasis,
bbrennanbasis,
gosteenBASIS,
hyyan and
laurenic0l
as code owners
August 19, 2026 16:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
HTMX and Java component trees both answer 'how do I skip the SPA?' — by different roads. A decision map for backend Java teams weighing the tradeoffs.
Why this post
Primary keyword:
htmx java— Tier 1 — spokeCluster: framework-decision
Long-tail coverage:
htmx spring boot,htmx vs java components,htmx alternatives,htmx server-side javaContent gap being filled
Every ranking HTMX-plus-Java post frames the choice as HTMX vs. React. The paradigm map is always the same: SPA on one side, HTMX-plus-server-rendered-HTML on the other. Nobody contrasts HTMX with the third shape that answers the same underlying question — an imperative Java component tree with state and behavior on the server, no HTML fragments crossing the wire, no client-side hypermedia protocol.
The angle
"How do I skip the SPA?" is a real question for backend Java teams, and HTMX is the popular answer of the moment. Imperative Java components are another answer — different unit of composition, different unit of update, different mental model. The SERP argues HTMX vs. React; this post writes down what HTMX vs. Java components looks like. Both suit different problems; the reader deserves the map before picking.
Snippet sources
Every code snippet in the post traces to a verified upstream source (per STYLE.md rule #2):
UserDashboardexample (verbatim, variable renames only):Composite<FlexLayout>,getBoundComponent(),FlexLayout,FlexDirection.COLUMN,FlexAlignment.CENTER,TextField,Button,Div,Button.onClick(event -> ...),getBoundComponent().setDirection(...).add(...).ItemDetail: renamesUserDashboard→ItemDetail,searchField→queryField,searchButton→loadButton,resultsContainer→detail,searchRow→inputRow,"Search users..."→"Filter...","Search"→"Load detail",performSearch()→loadDetail(), comment updated.SearchPanel: renamesUserDashboard→SearchPanelonly — all fields, strings, methods, and local variables are verbatim.hx-get,hx-target,hx-swap,hx-trigger="keyup changed delay:300ms",hx-boostattribute patterns from the htmx.org attribute reference pages. Used verbatim.@GetMapping/@ResponseBody/@PathVariablecontroller pattern. Standard Spring MVC; no webforJ source required.Media
cover.pngReviewer checklist
Generated by Claude Code