htmx generalizes the standard hypermedia controls found in HTML: anchors & forms
this makes it more work to implement some things, but sticks closer to the basic ideas of HTML
and, as always, if nothing magically works, nothing magically breaks
Oh, they are not. They are more powerful, but they use rather simple concepts. Speaking as the user of Phoenix LiveView who even created his own templating library to work with it.
> htmx generalizes the standard hypermedia controls found in HTML: anchors & forms
Those are not "hypermedia controls". As I said elsewhere: stop appropriating concepts for your benefit.
> the basic ideas of HTML
The "basic idea of HTML" is "render a text page with a few images in one rendering pass with links to other such documents". That is it.
You are perhaps referring to the hypertext vision of Sir Tim Berners-Lee, but that is as far removed from HTMX as HTMX is removed from any other concepts it keeps trying to appropriate.
HTMX is a utility lib with a few diffing utilities that does what nearly every other library does, but chose the high ground of "we're doing it with HTML chunks, so we're better and this is what the founders envisioned".
You're not better. This is not what founders envisioned.
What would you call links & forms? The W3C seems to agree w/my language:
https://www.w3.org/2019/wot/hypermedia
"This document introduces an ontology for links and forms, the main hypermedia controls in use on the Web."
> The "basic idea of HTML" is "render a text page with a few images in one rendering pass with links to other such documents". That is it.
I don't know about that. What about forms? And script tags. And all the other stuff?
> You're not better. This is not what founders envisioned.
I don't claim to be better, i don't know what that means in this context. I'm trying to generalize what I understand to be hypermedia controls (links & forms) in HTML, in a way that conforms to Roy Fielding's definitions of the uniform interface.
I don't understand the hostility here. htmx isn't perfect or some sort of amazing piece of software, it's a flawed implementation by a flawed human of a perhaps flawed idea of generalizing hypermedia controls. But it's not obviously terrible either: people are having success using it, as a quick cruise around the other comments in this thread would indicate.
Ah. Interesting. I stand corrected. Skimming through the document it looks like a very late retrofit and attempt at standardization for some parts of the w3c tech stack like RDF, web of things etc.
> What about forms? And script tags. And all the other stuff?
None of them existed in the "basic idea of HTML". "All the other stuff" accumulated over the years. Until early 2002 the whole idea was still to lay out the page in one rendering pass (and this was only changed IIRC sometime in 2001-2002 with optimisations for tables).
> I'm trying to generalize what I understand to be hypermedia controls (links & forms) in HTML, in a way that conforms to Roy Fielding's definitions of the uniform interface.
No, you're appropriating the definition, contorting it to pretend that it only means HTML as extended by HTMX, e.g. this [0]:
--- start quote ---
The Hypermedia Driven Application (HDA) architecture...
- An HDA uses declarative, HTML-embedded syntax rather than imperative scripting to achieve better front-end interactivity
- An HDA interacts with the server in terms of hypermedia (i.e. HTML) rather than a non-hypermedia format (e.g. JSON)
--- end quote ---
Nope. JSON (or literally anything else) can also be hypermedia as long as there's a client which can understand it and present it to the user, and can follow links etc.
> I don't understand the hostility here.
I'm just getting tired of people hijacking specific terms to suit their own narrow definitions (however many hoops they have to jump through to get there), and present these narrow contorted definitions as the only true way.
> None of them existed in the "basic idea of HTML".
Well, the form tag was introduced in HTML 2, which was in some ways the first "standard" for it, so relatively early in the game:
After the HTML and HTML+ drafts expired in early 1994, the IETF created an HTML Working Group. In 1995, this working group completed "HTML 2.0", the first HTML specification intended to be treated as a standard against which future implementations should be based.
But I can see what you mean and arguing over the meaning of "basic" isn't a hill I'm particularly interested in dying on.
> No, you're appropriating the definition, contorting it to pretend that it only means HTML as extended by HTMX, e.g. this
That's my definition of a Hypermedia-Driven Application, a term I made up to contrast with SPAs. I agree with you that a hypermedia can be imposed on top of JSON, which does not have native hypermedia controls, but I hope you can agree that this is not the way it is typically used today, and I also hope that most readers would understand that. I think the level of detail is appropriate for a high-level introduction to a concept that I created, but I see your point.
XML is another example of something that is not a natural hypermedia, but I included https://hyperview.org in the https://hypermedia.systems book, so I hope that demonstrates that I'm not wedded to the idea of HTML being the only hypermedia in the world.
I also agree entirely that a proper hypermedia client is crucial for a properly functioning hypermedia system:
https://htmx.org/essays/hypermedia-clients/
> I'm just getting tired of people hijacking specific terms to suit their own narrow definitions (however many hoops they have to jump through to get there), and present these narrow contorted definitions as the only true way.
I don't know, I think we agree I am using the term "hypermedia controls" properly, and I don't know if you have different feelings around my idea of generalizing them in HTML, given that fact. Does that change anything for you?
I certainly don't feel htmx is the only true way. I have never said that, and I try to be explicit when the hypermedia-based approach will be effective and when it won't here:
There's no contrast. It's not even a made up term. I was doing "hypermedia-driven applications" with HATEOAS in 2012.
> I agree with you that a hypermedia can be imposed on top of JSON, which does not have native hypermedia controls
The way you extend browser behaviour with Javascript to use non-standard attributes, non-standard headers etc. is literally no different from literally any other lib/framework doing the same with literally any other format.
> XML is another example of something that is not a natural hypermedia
There it goes again. "Natural hypermedia".
There's no such thing as "natural hypermedia". You're inventing stuff as you go along to try and contort terms and concepts to fit the extremely narrow definition of "hypermedia is HTML with HTMX attached to it".
It's not.
> if you have different feelings around my idea of generalizing them in HTML,
You're not "generalising them in HTML". You're literally, and I quoted, pretending that hypermedia is HTML, and HTML only (with HTMX sprinkled on top).
> I certainly don't feel htmx is the only true way. I have never said that
--- start quote ---
An HDA uses declarative, HTML-embedded syntax rather than imperative scripting to achieve better front-end interactivity
An HDA interacts with the server in terms of hypermedia (i.e. HTML) rather than a non-hypermedia format (e.g. JSON)
--- end quote ---
Literally here: you claim that hypermedia apps are is only based HTML, only use HTML-based syntax and only use HTML to communicate. Because "other formats are not hypermedia". That is, you literally claim that HTMX is the only true hypermedia driven app or something.
Also, elsewhere someone put it even more succinctly: https://news.ycombinator.com/item?id=38965060
The term HDA, which I coined and, therefore, feel like I have some ability to define, was created to contrast with the familiar SPA/Single Page Application acronym, which is a term used in web development. This is why I focus on the web with that article.
As I have repeated incessantly with you, I included HXML, a mobile hypermedia from the https://hyperview.org project, in my book on hypermedia systems, and I hope this indicates to a fair minded 3rd person (I have given up on you acknowledging my plain language here) that I do not believe that HTML is the only hypermedia in the world.
They don't.
> that I do not believe that HTML is the only hypermedia in the world.
For a person who doesn't believe that you sure spend a lot of time only talking about HTML and claiming that nothing else is hypermedia.
And yes, I've quoted what you yourself say about this.
I wouldn't touch HTMX with a ten-foot pole :)
It's a somewhat haphazardly defined DSL around magical attributes, their values, and awkward workarounds with somewhat badly specified behaviours (what's `hx-select-oob` exactly?).
There are other projects that do these things better, with less pretentiousness: Phoenix Liveview or Laravel LiveWire, or even Hotwire