Live data from Hacker News

Htmx is part of the GitHub Accelerator

htmx.org

241–250 of 520 posts

Re: Htmx is part of the GitHub Accelerator

#241
post #172

In recent years, I have not seen another tool that is so inflated. The attention it can garner for a tool where all it does is do simple things by adding attributes to html elements is really weird. Anyway, we need to act as if adding an attribute to the button and changing the value written in it is a very big need. Great job congratulations.

It can do a lot more than just changing the value written in a button. I'd say that the hype is more centered around the fact that it helps you to do much more interactive and SPA-like websites without needing a full JS framework and on your favourite server stack, which is honestly really cool.

Re: Htmx is part of the GitHub Accelerator

#242
post #143
post #140

Earlier quoted context omitted.

You disagreeing with something doesn't make it wrong. I'm sorry, but people in other parts of the world have a right to be forgotten, no matter how much you want to pretend they do not.

[flagged]

Where do human rights come from? Did we have them from when we split off from our closest ancestors? Did they magically appear when someone first thought them up, and they just stayed? Why do our closest relatives not have human rights?

You yourself mention that people in Belarus have human rights. Why can the government ignore their human rights then? Why isn't there some magic barrier stopping the government from trampling on the populations human rights?

Re: Htmx is part of the GitHub Accelerator

#243
post #47

Earlier quoted context omitted.

I hear you're buying a synthesizer and an arpeggiator and are throwing your computer out the window because you want to make something real. I hear that you and your band have sold your guitars and bought turntables. I hear you rewrote your http endpoints to return JSON because that was REST. I hear that you and your band have sold your turntables and bought guitars. I hear you rewrote your http endpoints to return t…

I suspect VC distorts value in tech choices. I'm pitching a mobile app built in Unity and a custom ruby backend on digital ocean. They questioned my tech choices on a working app! Apparently if you want VC money you must use their approved tech stacks.

> I suspect VC distorts value in tech choices.

I agree. I think what we're seeing is investment risk assessment as a proxy for a deep understanding in technology. After all, if you don't know how anything works, all you can do is look to what _has_ worked for you and other investors in the past.

I'm guessing here, but it's plausible that once a given stack has proven to make money, the fix is in. It wouldn't matter if it's the best choice out there or not. The track record itself makes it more attractive. Example: Ruby on Rails.

Re: Htmx is part of the GitHub Accelerator

#244

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

https://twitter.com/foxy4096/status/1691432812870828032?s=20 This is a boon to many django developers. I remember few month ago I was making a post liking system, before htmx, I had to use jQuery to fetch the json api server and update the like count, but with the use of HTMX, oh boy it was like I was just writing plain html along with my django logic. This is one of the greatest thing I've found. Also, handling form…

i'm very glad to hear you are finding it useful :)

Re: Htmx is part of the GitHub Accelerator

#245
I don't want to bag on Htmx but if you're looking to just use vanilla HTML (seriously, no extra/custom attributes or weird syntax gotchas), please check out Joystick [1]. UI framework that's part of a full-stack framework that uses vanilla HTML, CSS, and JavaScript for building components.

[1] https://github.com/cheatcode/joystick

Re: Htmx is part of the GitHub Accelerator

#246
post #75

I've a hard time taking htmx serious for building a modern web app/site. It makes is impossible to build features that users have come to expect: * Faceted search with configurable filters, like filter date on before, between or after, but only show the filter if the user wants it. * Configure result view with different columns or even different views like maps or drawing something on a canvas like charts. You can ma…

You can check this talk out https://youtu.be/3GObi93tjZI I was thinking the same but in the video they specifically talk about faceted search and how they did it with htmx. For the second part you probably go with your own javascript or get away with hyperscript

That is the talk I've watched before coming to the above conclusion. The faceted search demonstrated in the talk is still an order of magnitude simpler then what I have build. It is still a cool example of what you can do with htmx and it certainly pushes the envelope but the UX choices are dictated by what is possible in htmx. I also think that the talk is somewhat dishonest, it is by a backend developer that want to keep writing Django while I would suggest replacing that with Postgrest. I estimate that what is shown here can be done with 500 to a 1000 lines of SolidJS for the entire app.

Re: Htmx is part of the GitHub Accelerator

#247

hi there, as many of you know, i am the creator of htmx and I'm happy to answer any questions about it htmx has seen a surge in popularity, triggered by a video by fireship dev ( https://www.youtube.com/watch?v=r-GSGH2RxJs ) and a series of videos by ThePrimeagen, a popular twitch streamer on it hacker news readers might be interested in the essays I have written on htmx & hypermedia in general here: https://htmx.org…

This is a great project, and reminds me a lot of where folks saw hypertext going many years ago. I have read a little of the website and picked through many of the online examples. One thing I did notice is the preference to update client state (DOM rewrites) based on server HTTP request responses containing full-blown markup. Does the HTMX framework provide concessions for client-side-only triggers and client genera…

we do have a client-side template extension:

https://htmx.org/extensions/client-side-templates/

however, I would encourage most folks to use HTML as the network format: it typically isn't much more CPU to generate the equivalent HTML string that corresponds to a JSON string (sometimes even less, as with tables)

for pure client-side, htmx is largely hands off. We support an `hx-on` attribute to address the fact that HTML doesn't support general `on*` attributes, but that's it

it does, however, emit a large number of events that you can hook into to extend things:

https://htmx.org/reference/#events

And it plays well w/ scripting solutions like Alpine.js or, our our own scripting solution, _hyperscript: https://hyperscript.org

Re: Htmx is part of the GitHub Accelerator

#248
I started with Perl in ‘96 and have lived through what feels like everything — PHP, jQuery, Drupal, Backbone, Node, Angular, ClojureScript, React, GraphQL, and NextJS. Htmx feels like a divergence from the trend, and is worth thinking about.

Htmx asks us a good question: “does the complexity of your work reside essentially on the server or essentially on the client?”

The complexity for the vast majority of websites resides essentially on the server. Most of us are not building Figmas and Google Sheets. Most websites, even if heavily interactive, are just CRUD apps with pleasant interfaces. Frameworks like NextJS attempt to rectify the problem of overly complex clients by moving React to the server, but this often magnifies complexity rather than minimizing it.

Wouldn’t it make sense to remove React from the stack? For complex clients, skip the DOM and JS with canvas and compiled web assembly. For complex servers, use some form of server-driven granular updates to the DOM.

The problem I see with this approach is that although most complexity reside on the server for most websites, there are almost always a few high-complexity task that needs to reside on the client — image editing, real-time sorting/filtering/calculation, drag-touch gestures, etc.

A hybrid approach is necessary. It isn’t good enough to allow compatibility. Although htmx and React can be used on the same web page, they need to be kept in isolation. But I’m not looking for isolation; I’m looking for fundamental integration.

My ideal framework would allow for reactive granular updates to the DOM while also being tightly integrated with compiled web assembly powering complex client operations. I’d write all my code in a powerful language rather than JavaScript. My debugger would operate on both server and client because the difference between the two has disappeared. It would be true full-stack development — a single-stack application (SSA)

Clojure + ClojureScript comes close to being an SSA, but only superficially.

If ever there was a killer framework for Common Lisp, I think an SSA fits the bill.

Re: Htmx is part of the GitHub Accelerator

#249

How does HTMX work with Tailwind? If I return some HTML from my backend, then the Tailwind scanner won't have found the css selectors, so it won't be in the generated CSS. What am I missing?

Have tailwind scan your backend files as well or have a list of classes needed included in your tailwind config which should not be purged.

Re: Htmx is part of the GitHub Accelerator

#250
post #141

Great news! I'm not using the full feature set (e.g. hyperscript) but really like the general approach as opposed to usual suspects like react or svelte. One of my last projects runs just fine on htmx + 3-4 stimulusjs controllers for all interactivity

hyperscript is a separate project. It is not a feature of htmx. htmx handles the hypermedia interactions with the back-end server. For pure in-page interactivity (hiding/showing side-navs, etc), you get to decide how you want to do it: VanillaJS, AlpineJS (my favourite), hyperscript, Web Components (lit.dev, etc), StimulusJS (what you used), a big framework component (Svelte, Vue, React, ...), etc, etc. htmx does not bundle anything into itself to make that decision for you. You may have thought hyperscript is a feature of htmx because sometimes you'll see the two used in examples (both have the same creator).
Post reply on HN