Live data from Hacker News

Htmx – high power tools for HTML

htmx.org

171–175 of 175 posts

Re: Htmx – high power tools for HTML

#171
post #6

For similar-goal prior-art, see Unpoly[1]. Also the IETF asks[2] that you please stop using "X-" to prepend your custom HTTP headers[3] [1] https://unpoly.com/tutorial [2] https://tools.ietf.org/html/rfc6648 [3] https://htmx.org/reference/#headers

Unpoly examples wrecked my back button. Had to click back like 15 times to get back to HN... Is this a permanent issue because of the way it’s implemented?

Just set up-history=false on your links

Re: Htmx – high power tools for HTML

#172

The js via html tags is something I see also in Alpine.js, which has gotten a lot of press lately. Is this an alternative, or is each really its own niche (and you might use both)? Is there a comparison? Edit: It seems that htmx is almost entirely around AJAX, and Alpine around a) binding element data to objects and b) css & animations (such as hiding a popup). It would make a lot of sense to use them together (and t…

Yeah some kind of bridge between the two would be great. They both seem to have different areas of specialization

Re: Htmx – high power tools for HTML

#173
post #115
post #113

Earlier quoted context omitted.

You are comparing apple to oranges :) alpine and stimulus are frameworks (doing all sorts of stuff: css animation, data objects, etc) while htmx is a library focusing solely on ajax. From your list, the only similar project to htmx is intercooler-js, but... htmx is actually the new version of intercooler-js (both projects by the same author).

> htmx is a library focusing solely on ajax htmx supports animations too, and it has extensions to add further functionality. Of course those projects differ in their functional range, but they share the way they work; by adding attributes to HTML.

Yes, you are right. My response was based on the presentation from the first page: "htmx allows you to access AJAX, WebSockets and Server Sent Events directly in HTML, using attributes". In the meantime I read the documentation and, as you just said, it supports animations and much more.

Re: Htmx – high power tools for HTML

#175
post #28

Reminds me of AngularJS... :) Much simpler overall though. I like it.

It reminds me more of jQuery. And while I see how it's great for quick prototyping, it's going to be a nightmare in a large project. I really like React, where data and HTML are clearly separate. I don't want to send raw HTML back and forth, I want to send only data.

It doesn't look like this requires you to send raw HTML back and forth. Also, jQuery did not have this kind of data-in-html syntax...
Post reply on HN