Live data from Hacker News

Htmx 2.0.0 has been released

htmx.org

91–100 of 146 posts

Re: Htmx 2.0.0 has been released

#91

One of the happiest days of coding in the last 10 years for me happened in September last year when I added htmx to an internal self serve web app I develop for our company. With the addition of maybe 5 htmx attributes I was able to delete about 500 lines of client side JS. The app is now chock full of htmx interactions and has very little client side JS for the size of the app and it’s a joy to work on. Without htmx…

can you comment on what those 500 lines actually were? react+redux?

can anyone comment on what 500 lines of react+redux actually do ?

Re: Htmx 2.0.0 has been released

#92
post #54

Htmx users, can you please share your backend stacks and approaches? Me specifically interested in templaters for node (+ts) and your thoughts on endpoint management, but all ideas are welcome I guess.

Go: go templates and fiber for http serving. I have a mini framework for adding some structure to the templates (folder per feature: contains controller, templates, etc, and some naming conventions)

I too use go + fiber + htmx.

> mini framework for adding some structure to the templates

Would be good to read little more about this mini-framework

Re: Htmx 2.0.0 has been released

#93

One of the happiest days of coding in the last 10 years for me happened in September last year when I added htmx to an internal self serve web app I develop for our company. With the addition of maybe 5 htmx attributes I was able to delete about 500 lines of client side JS. The app is now chock full of htmx interactions and has very little client side JS for the size of the app and it’s a joy to work on. Without htmx…

can you comment on what those 500 lines actually were? react+redux?

It was all normal JS code to handle a complicated form we have on a customer facing portal page. By moving to htmx I was able to rely on the server side to handle basically everything with only a small addition of code to what it was already doing.

Re: Htmx 2.0.0 has been released

#94
post #90
post #54

Htmx users, can you please share your backend stacks and approaches? Me specifically interested in templaters for node (+ts) and your thoughts on endpoint management, but all ideas are welcome I guess.

Django user here. HTMX fits in perfectly with the Django templating system. A fairly common approach is to use the same view but check for the HTMX header and then return a template file with the specific bit of HTML being swapped. There's also work in the Django space to be able to return parts of a template based on the request, which will suit HTMX perfectly too.

We use Django with https://htpy.dev/ as templating system.

Re: Htmx 2.0.0 has been released

#95
post #54

Htmx users, can you please share your backend stacks and approaches? Me specifically interested in templaters for node (+ts) and your thoughts on endpoint management, but all ideas are welcome I guess.

Htmx + Kotlin with ktor and the html dsl was really fun to play with on a personal project. Static typing, autocomplete and a full-fledged programming language available to use in your html markup is a game changer. I was structuring my endpoints as pairs of "data" and "render", where the render endpoint just reused the function for the date endpoint.

Re: Htmx 2.0.0 has been released

#96

hey folks, i'm the creator of htmx this isn't much of a feature upgrade, but we took the opportunity to clean up a few things and drop IE support, which will help us slim down the library over time hopefully it's an easy upgrade for most htmx users, upgrade guide is here: https://htmx.org/migration-guide-htmx-1/ happy to answer any questions

Your front page still says “IE11 compatible”.

Re: Htmx 2.0.0 has been released

#97
post #54

Htmx users, can you please share your backend stacks and approaches? Me specifically interested in templaters for node (+ts) and your thoughts on endpoint management, but all ideas are welcome I guess.

Go + Templ + htmx

Templ is great when you need to separate reusable components.

Re: Htmx 2.0.0 has been released

#98
post #87
post #28

Earlier quoted context omitted.

My cynical take: this is by design. Those web committees are staffed by companies that each have their non-web platform they're pushing (or were, until it died, see Microsoft), so even the most well meaning members are somehow contorted into compromises that make the web as a platform a bad technical choice in terms of actual design, but the best one in terms of flexibility and of course ubiquity. It's completely stu…

It is possible for normal everyday people to make contributions to the standards. I'm sure if you created a patch that showed these things working in firefox/webkit/chrome and wrote up a proposal and sent it to the correct listserv, you would at least have something more than baseless conspiracy to be mad about

I'm not a C dev and it's not my job to do something when people are literally paid for this stuff, a lot more than me. Every mainstream OS has what I'm talking about.

Re: Htmx 2.0.0 has been released

#99
post #16

HTMX is like a glimpse into the road not taken, where HTML is the main language of the web instead of JS. Sometimes the grass really is greener on the other side, and I hope as an industry we make the switch.

One example of this is the lack of an include-tag that could fetch a fragment from the server (useful for headers/footers). Developers have wanted it for decades and have been forced to reproduce the functionality themselves using frames and/or javascript.

Re: Htmx 2.0.0 has been released

#100
post #99
post #16

HTMX is like a glimpse into the road not taken, where HTML is the main language of the web instead of JS. Sometimes the grass really is greener on the other side, and I hope as an industry we make the switch.

One example of this is the lack of an include-tag that could fetch a fragment from the server (useful for headers/footers). Developers have wanted it for decades and have been forced to reproduce the functionality themselves using frames and/or javascript.

https://www.w3.org/TR/xinclude/

The W3C specced out such a tag nearly 20 years ago, but because the browser devs are terrified of all things XML it was never implemented.

Post reply on HN