Lurker News
I recently dug up an old project in an attempt to improve on it. It's a code sandbox for playing around with HTMX in the browser, that runs a mock server within the sandbox iframe. The server "framework" is loosely based on Django, so if you're familiar with Django, you'll immediately understand what's going on.

I recommend clicking through the examples.
Github repo: https://github.com/lassebomh/htmx-playground
Probably my favorite part is the lack of HTMX specific code. It's designed to mimic the client and server, but really nothing else. In principle, this means that it is agnostic to whatever frontend framework is being used.
Known problems: Limited mobile support, Ace Editor (should just be Monaco) and lack of proper error outputs.
Feel free to give feedback, suggestions or questions.
I learned a lot when making it, and I hope you'll something about HTMX! Happy tinkering.

Comments (118) 19 threads

Show all comments

Showing thread 18 of 19

Solvency5 replies#
Is Htmx just the long overdue successor to DHTML that was all the hype in, say, 1997?
recursivedoubts3 replies#
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

dilyevsky1 reply#
This sort of sounds like turbolinks (or whatever it is called now)?
recursivedoubts#
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.

subtra3t1 reply#
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.

recursivedoubts#
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.

digging1 reply#
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?
recursivedoubts1 reply#
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

Continue this thread — 1 reply

lagniappe#
htmx is intercoolerjs
geenat#
htmx is html but: all elements can make http requests, not just and
diegof79#
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.

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