Hypermedia Systems
Modified 2024-07-09
Hypermedia a Reintroduction
The Essence of HTML as a Hypermedia
The essence of HTML as a Hypermedia is by using a and form tags, which gives
great interactivity. But why stop there? Why not bring more interactivity to
different kinds of tags? That's Hypermedia oriented libraries like HTMX.
Hypermedia-Driven Applications
button => request json => translate json => update ui (Javascript driven) button => request html => replace html
When Shouldn’t You Use Hypermedia?
Every application can use HTMX, but there might be certain features that need a more sophisticated client-side interaction (such as spreadsheets)
Components Of A Hypermedia System
The whole section is pretty much worth revisiting once in a while. The components are:
- hypermedia (HTML)
- network protocol (HTTP)
- server responding with hypermedia
- client interpreting hypermedia,
Htmx Patterns
- paging
- click to load
- infinite scroll
More Htmx Patterns
- active search
- inline delete
A Dynamic Archive UI
The whole chapter is good read for dynamic ui's as it implements a loading bar.
Thoughts
I've long had this weird feeling when building React applications that I got ever frustrated with the state management as we are duplicating the state from the server, and making assumptions on how the JSON should get interpreted instead of getting the correct HTML from the server (think authentication).
Metadata
- Creator(s)
Carson Gross, Adam Stepinski, Deniz Akşimşek
ThePrimeagen
Writing less fatty JS on the client, and use browser api's, and understanding the philosophy behind HTMX