Live data from Hacker News

Htmx is part of the GitHub Accelerator

htmx.org

201–210 of 520 posts

Re: Htmx is part of the GitHub Accelerator

#201

Earlier quoted context omitted.

Dear god. Have we forgotten about the ACCEPT header? If you get a request with ACCEPT application/json, return json. If you get one with text/html, return html.

Not sure if your “Dear god” is negatively targeted at my comment - I’ll assume it’s a general show of exasperation. How likely is it every API will adhere to that though?

Yeah, just exasperation. For the longest time, most APIs would return json if you asked for json, or xml if you requested xml. Many older api's still do content negotiation, many gave up because 'xml bad'.

Re: Htmx is part of the GitHub Accelerator

#203
post #155

Earlier quoted context omitted.

I'm kind of guessing / reading into their comment here but. Using htmx doesn't give me the feeling of "this is the only way I ever want to do this" but more "if html worked like this I wouldn't use js most of the time." The sense that an opportunity was missed and now we're paying for it in complexity.

The complexity is just shifted around from JS to HTMX (or hypothetically, html). Not a noticeable improvement.

The difference is those were already tools we were using. You _(hypothetically?)_ can't eliminate the complexity of dynamic apps without limiting flexibility. However you can move the complexity in-band, to a domain you are already using and preferring.

Plus, if it's done right, you can get a lot of functionality while remaining No-JS friendly.

Re: Htmx is part of the GitHub Accelerator

#204

Earlier quoted context omitted.

Arguably you’ve got to learn HTML, so why then add learning React/etc on top of that? HTMX is more limited, but also _radically_ simpler to modern frontend development.

People want and expect pretty and interactive experiences. I don't think they care how they get there. I've written some Unity "web" apps by using the port to webgl feature, so I have no deep fondness of html or js. I just need results.

> People want and expect pretty and interactive experiences.

Counterpoint: a majority of websites are for business where they want the form to submit and update the database.

And to me, pretty = CSS + removing full refreshes, which is what HTMX does.

Re: Htmx is part of the GitHub Accelerator

#205
post #173

Earlier quoted context omitted.

> my favorite after htmx That's interesting. I discovered Unpoly after HTMX (which I like) and decided to stay with Unpoly for a few reasons. Do you think hypermedia libraries will converge or do you think there is space for different interpretations ?

i definitely think there is room for multiple implementations unpoly is higher level than htmx, with different design sensibilities and concepts like 'layers' ( https://unpoly.com/up.layer ) which is something that doesn't make sense from htmx's "just extend HTML" perspective

Exactly! I love the sweet spot that htmx hits; please don't change that!

Re: Htmx is part of the GitHub Accelerator

#206

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…

I've enjoyed using htmx and created a simple library in golang to help out. Here is an example app https://github.com/pyrossh/gromer/tree/master/_example

Re: Htmx is part of the GitHub Accelerator

#207

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…

Congrats on the GitHub program! Very cool.

I just had a fresh read of the docs and htmx is refreshingly, gloriously simple--such a breath of fresh air. So natural, self-documenting, and well thought out. It _does_ feel like a natural extension of html.

To me, the only "missing" piece of htmx is a component model, but for anyone looking for that, htmx would pair amazingly well with Astro[1] which allows you to define and use html components without the runtime overhead of say Vue or React.

[1] http://astro.build

Re: Htmx is part of the GitHub Accelerator

#208
post #155

Earlier quoted context omitted.

The complexity is just shifted around from JS to HTMX (or hypothetically, html). Not a noticeable improvement.

That's not my experience based on two scenarios: 1. Server-side rendered sites in Python using either Django or FastAPI/Jinja2 and htmx; 2. Dotnet back end with Angular front end. In practice - for the apps I've been involved with - option (1) provides a more than acceptable user experience. There's no doubt Angular can go beyond the capabilities of SSR+htmx. But, in practice, it's in the long tail. Throw in the odd…

Not sure you've solved the complexity when you've just slotted in another front to a general solution that is over-engineered. You could have replaced either scenarios with a single NextJS or SvelteKit solution. Go above and beyond in "complexity", write your Node backend (keeping it one language, JavaScript), and use vanilla HTML and JS to consume that.

To me, htmx isn't as revolutionary as people make it out to be, and possibly that's due to the fact I'm just not burdened by the old days of gigantic Angular apps and massive ASP.Net stacks. My history was mostly JQuery where needed (which was all the time before JS got its act together).

Re: Htmx is part of the GitHub Accelerator

#209

Earlier quoted context omitted.

> So now I need to make endpoints for every little UI element that I want to be updated by user interactions? No. Htmx supports extracting a subset of received HTML and merging it with the current page. So, for a typical form, you _could_ do a request to validate the entire form then extract the relevant error message for the input field that triggered said request. This would re-use most code of the actual form subm…

Could you link to an example on extracting parts of the form? I have a feeling I'm using way to many routes to handle every specific case! Thanks.

I think you’d use hx-select: https://htmx.org/docs/#selecting-content-to-swap

Re: Htmx is part of the GitHub Accelerator

#210

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…

What plans do you have for 2.0?
Post reply on HN