Live data from Hacker News

Htmx in a Nutshell

htmx.org

11–20 of 414 posts

Re: Htmx in a Nutshell

#11
post #7

howdy, I'm the creator of htmx, happy to talk about it

hx-post .. what? hx-put .. what? hx-delete .. what? I stopped scrolling as soon as I noticed I have to ask myself what am I posting to this URL? Maybe digging deeper I could find the reference docs explaining in very vague terms where the payload is coming from. But this was supposed to be simple.

https://htmx.org/docs/#parameters

Simple doesn't mean "I should be able to intuitively understand this with under a minute of reading"...

Re: Htmx in a Nutshell

#12

htmx keeps getting posted here and choosing it comes down to "do you trust that your user's internet is stable" IMO. For a lot of interactive web apps, the answer is no, and htmx is not a good fit.

[deleted]

Re: Htmx in a Nutshell

#13
post #4

Makes me smile because everything old is new again. This is very similar to features MooTools had like 10+ years ago before JSON took off big.

if you like the retro-vibe of htmx, you might also like my homage to HyperTalk, the scripting language from HyperCard:

https://hyperscript.org

Re: Htmx in a Nutshell

#14
post #9

how would htmx handle application like pages? for example, something along the lines of google spreadsheets? Where each cell is interactive.

htmx (and hypermedia in general) isn't a good fit for an online spreadsheet:

https://htmx.org/essays/when-to-use-hypermedia/

Re: Htmx in a Nutshell

#15

howdy, I'm the creator of htmx, happy to talk about it

Would you characterize htmx as the successor to AJAX?

I would say htmx is how I think HTML should work as a hypermedia, to make it possible to build more interactive applications within that paradigm.

Re: Htmx in a Nutshell

#18

htmx keeps getting posted here and choosing it comes down to "do you trust that your user's internet is stable" IMO. For a lot of interactive web apps, the answer is no, and htmx is not a good fit.

SPAs make tons backend calls to get data. This isn't particularly different. To me the main difference is it is hard to build an offline app out of htmx as compared to a SPA but so few webapps are offline anyway...

Re: Htmx in a Nutshell

#19

htmx keeps getting posted here and choosing it comes down to "do you trust that your user's internet is stable" IMO. For a lot of interactive web apps, the answer is no, and htmx is not a good fit.

I don't see why it couldn't be used in a PWA with a service worker providing offline HTML responses to hx directive elements though. You can see an example here that uses a WASM-based service worker (but you don't have to do that, it could just be plain old JS generating HTML): https://github.com/richardanaya/wasm-service
Post reply on HN