Hacker News new | ask | show | jobs
by Solvency 900 days ago
Is Htmx just the long overdue successor to DHTML that was all the hype in, say, 1997?
5 comments

believe it or not I was around back then and, no, htmx is not the successor to DHTML, which was very JavaScript heavy

htmx is an attempt to generalize the two core hypermedia controls in HTML (anchors & forms). It does this by making any element able to respond to any event by issuing any type of HTTP request and then placing the returned HTML anywhere (and in any manner) in the DOM. This last idea is called transclusion and is probably the most important part, because it lets you build much more dynamic user interfaces within the standard HTML/hypermedia paradigm.

we have a book here if you are interested:

https://hypermedia.systems

I know this isn't something the authors can fix just like that, but shipping and import duties mean that the hard cover book is about as expensive for me as the smartphone I'm writing this on ($96.32 for a Samsung Galacy M04 as compared to $96.6 for the book).

The book is great though. If you can't afford it I highly recommend reading it on the website. I haven't gotten through the last section just yet due to family obligations unfortunately but I look forward to finishing it soon.

Unfortunately I can't do much about the cost of shipping, etc.

You can head here:

https://hypermedia.systems/hypermedia-systems/

and print the book to PDF, adjusting fonts, etc as you like, and then print it out at a local print shop, if you want the text in high-res print.

If you like the cover, you can purchase a poster of it here:

https://swag.htmx.org/products/hypermedia-systems-cover-post...

We are selling the 18x12 at cost so people can have it w/o spending $50 on the hardback.

If you have time, I have a question I haven't been able to answer reading the docs or skimming the linked book. My company's front end apps communicate exclusively with a GraphQL orchestration layer. I tried a while back to learn HTMX by building a demo remake of one of our apps, and I actually couldn't figure out how to make those requests. Am I missing something, or is this just a bad use case for HTMX?
sounds like a bad use case for htmx, if your server isn't returning hypermedia you are making your life pretty difficult

doable, but not fun

appreciate the response, that's what I was thinking but I couldn't quite be sure if I was missing something.
This sort of sounds like turbolinks (or whatever it is called now)?
To an extent, htmx is the successor to intercooler.js, which was released in 2013 and which was a turbolinks-adjacent technology (although never really noticed by the 37Signals folks).

htmx is a bit more focused on one core concept, generalizing hypermedia controls, than hotwire.dev is, and is a little less magic. Both are fine choices for a hypermedia driven application.

htmx is html but: all elements can make http requests, not just <a> and <form>
You are currently using the successor of DHTML.

Dynamic HTML was a marketing term used by Netscape and Microsoft to refer to the combination of HTML, CSS, and JavaScript. Also under that umbrella term you have the introduction of the div tag for IE or the layer tag for NS4 (also NS4 included a JS version of CSS)

It was “dynamic” because you could do effects like hover menus using JS snippets or the first iterations of CSS (ohh the memories of my first Geocities pages). But, XHR APIs didn’t existed yet.

Edit: it seems that the marketing term was used mainly by Microsoft for IE.

I don't think so. HTMX is a JavaScript library that abstracts the JavaScript part away from the user
htmx is intercoolerjs