Live data from Hacker News

Htmx in a Nutshell

htmx.org

41–50 of 414 posts

Re: Htmx in a Nutshell

#41

My only complaint with htmx is that it is _nearly impossible_ to Google search for info about it. You just get tons of noise from Google 'helpfully' deciding you really just want to search for 'html'. You need to search for "htmx" (including quotes) to find docs, articles, etc. about it.

I get decent results from Yandex by putting a plus before htmx ("+htmx") and excluding the results for html ("-html").

Re: Htmx in a Nutshell

#42
post #34

If I'm understanding this correctly, this is a front-end only framework... is that right? If so, what do people pair it with on the backend? I can see how this approach allows for much more dynamic pages with just static content, but what about when there is a database involved? Also, what do people use for "published" static sites (I mean where the site is static once published, but the publishing step can pull cont…

htmx focuses on extending HTML as a hypermedia and, like HTML, can work with whatever backend can produce HTML, which is pretty much all of them. We call this the HOWL (Hypermedia On Whatever you'd Like) stack.

I have yet to use it in anything, but conceptually I'm a fan of this kind of freedom of choice. It's always a bummer to see something that looks cool for frontend use and find that it's tied explicitly to a particular back end.

Re: Htmx in a Nutshell

#45

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

Quick question, as it made me curious. Can I send the content that I want to swap to the server itself? Say I want to submit a form to the backend, will it only send form fields or is there a way to send the form html itself?

Re: Htmx in a Nutshell

#47
post #34

If I'm understanding this correctly, this is a front-end only framework... is that right? If so, what do people pair it with on the backend? I can see how this approach allows for much more dynamic pages with just static content, but what about when there is a database involved? Also, what do people use for "published" static sites (I mean where the site is static once published, but the publishing step can pull cont…

htmx is pretty agnostic with regard to the backend side of things. You can use anything you want, really. There are htmx extensions to Django and I am working on a similar one for Express. Basically, a very simple middleware to deal with custom request and response headers.

Re: Htmx in a Nutshell

#48
post #3

I am burnt out (but recovering!) with web dev and htmx is what I am using for my project. Django, DRF, Postgres, tailwind and HTMX. I am so tired of all the front end frameworks and all the complexity that gets added. At some point I think you need it and you get returns from it but hearing more people in the industry recognize and talk about how JS everything isn't always the answer gives me hope. I like what HTMX h…

But HTMX is a JS library. Anything done with it is basically done with JS.

Re: Htmx in a Nutshell

#50

Have been using htmx for a little over a year now, and I am so thankful for this library. It has simplified our development tremendously from ClojureScript / React to vanilla Clojure on the backend doing SSR of HTML with htmx HTML element attributes. All with 1 script tag that includes this wonderful library. Kudos to the creator of htmx! This is what hypermedia architecture with true HATEOAS is all about. It feels l…

Doing something similar with janet. Really does simplify so much, and being able to not have to worry about always translating json -> html via { insert SPA framework here } is a breath of fresh air.
Post reply on HN