Live data from Hacker News

htmx

htmx.org

251–260 of 291 posts

Re: htmx

#251

Earlier quoted context omitted.

This doesn't appear to be what the docs recommend anymore, which is exactly what my (obviously flippant) post was meant to highlight.

Hooks were introduced five years ago and have been stable since then. So that's half a decade with no changes to the API.

Great! I bailed in the first four years I guess, after the fourth change in API.

Re: htmx

#252

I continue to be impressed at the effort people will put into avoiding writing any JavaScript. Is it really easier to learn yet another DSL embedded in attribute tags rather than taking a day to setup your JS dev environment and then writing idiomatic code for running inside a web browser? Surely your htmx project will eventually cross a complexity threshold where you've added enough scaffolding that you may as well…

For a certain kind of application HTMX is a convenient way to work. It lets you write a webapp the way you did in 1999 except you can update pages partially. Here is a screenshot of an my HTMX-powered RSS reader https://mastodon.social/@UP8/110432673973724419 This is a research project, but it's a research project by an applications programmer so it has to be solid. Yet I have to be able to change anything when I wan…

Hey! I'm also building an HTMX-powered RSS reader, although it's more a side project than a research project. Good luck, it's been lots of fun for me so far!

I've also found the productivity of a "strong" decoupling from frontend and backend to be super satisfying.

Re: htmx

#253

Earlier quoted context omitted.

> Where HTMX really shines is being able to bring the experience of writing React-like code without a nodejs environment. FWIW, if that's all you're after, and you've mastered the Rust borrow checker, Yew (a React-like experience), or Leptos (a SolidJS-like experience) might be interesting to look at.

not its not the same thing. I work in Java (not rust), but the analogy will hold. Yew is writing Rust to create html. Same as Java Thymeleaf. Here's the problem - Java developers are bad at UI. And good UI designers/developers think in HTML. I am not pro or anti this situation...im just talking about the reality. The tooling is also around html. Figma-to-HTML is the most effective way to have your design cycle work.…

I never meant to claim "it's the same thing".

I was just suggesting, if, by "react-like" code, you meant "a UI library that uses a vDOM to transform functionally written code into DOM nodes", Yew fits the bill.

Also, typically, one writes JSX when writing react, not HTML. It's similar with Yew[0].

If you're already aware of Yew, I'm not trying to change your mind. I was just trying to make you aware if you weren't already.

[0] It says so right on the homepage: https://yew.rs/

Re: htmx

#254
post #122

Earlier quoted context omitted.

I’m pretty sure you can continue to use jquery and everything still works fine :D

I’m over here continuing to use react for 9+ years but every post on here acts like it’s changing every day.

As a Vue user things have changed a lot.

Re: htmx

#255

On the one hand I see the appeal of staying inside, say, Django the whole time and getting 3x done. On the other hand I am so pampered by front end component based templating especially with Tailwind. It would be cool if I could just import my Svelte components from Django.

Have you looked at something like Slippers[1]? It allows you to have a set of components that you use in Django templates. I'm using Bulma, not Tailwind, for my project and I like how it creates an abstracts over e.g. CSS classes.

[1]: https://mitchel.me/slippers/docs/introduction/

Re: htmx

#256
post #197

I really want to use htmx on the next project but I am not sure how to make it handle poor network connections yet. The app I'm building will be used in areas with poor mobile connections - I want to submit a form, add it to a list and say it's pending saving, while the user can add more. Have to use hyperscript probably? Can trivially do it in vanillajs so I'm sure it's possible?

Hmmmm... can you define a "poor connection"? The web used to work the "htmx"/hypermedia through all the dial-up years where things were REALLY slow. I see no reason it would not work now.

Re: htmx

#257

Earlier quoted context omitted.

> there's a huge number of professional, revenue generating websites out there that just host a form. And that form probably just needs to send an email. You don’t need JavaScript or htmx for this. It’s been in the html standard since 1.0. Forms work from plain vanilla html. > Using a form, then a network request to some service, then showing some HTML will solve 100% of the problem for the local hair salon taking re…

This response is an excellent example of how, when stating a case or making an argument on HN, you should provide as little concrete information as possible and avoid a specific example if possible. The point they were making was that for many small single-purpose sites the interactivity needs are low but for various technical or social reasons may be higher than exposed with pure html/css, and htmx meets those needs…

Not really, I was directly refuting their bigger point, which was that htmx is not in an uncanny valley between basic HTML and real Javascript because there are all kinds of simple use cases where htmx is ideal. They then listed off use cases that in fact do not require htmx :-)

If you're going to make a point like that via examples, they should be (in aggregate) useful examples that make your point!

Even setting aside that examples made up basically that poster's entire point, the reason people provide examples even for more developed argumernts is because concrete evidence is important to persuasiveness (not because they are being charitable). When someone tries multiple examples and none prove their point, it's perfectly valid to point that out.

Re: htmx

#258
post #197

I really want to use htmx on the next project but I am not sure how to make it handle poor network connections yet. The app I'm building will be used in areas with poor mobile connections - I want to submit a form, add it to a list and say it's pending saving, while the user can add more. Have to use hyperscript probably? Can trivially do it in vanillajs so I'm sure it's possible?

Hmmmm... can you define a "poor connection"? The web used to work the "htmx"/hypermedia through all the dial-up years where things were REALLY slow. I see no reason it would not work now.

literally no connection at times. A queued request cannot be lost.

Re: htmx

#259
post #197

I really want to use htmx on the next project but I am not sure how to make it handle poor network connections yet. The app I'm building will be used in areas with poor mobile connections - I want to submit a form, add it to a list and say it's pending saving, while the user can add more. Have to use hyperscript probably? Can trivially do it in vanillajs so I'm sure it's possible?

Hmmmm... can you define a "poor connection"? The web used to work the "htmx"/hypermedia through all the dial-up years where things were REALLY slow. I see no reason it would not work now.

"Hmmm I know better than you". Peak HN lol. This is for middle of the desert time tracking.

Re: htmx

#260
post #5

Heh, the "Memes" section of their Essays page is brilliant: https://htmx.org/essays/#memes

A lot are also missing the point entirely for comedy's sake. Which is admittedly fine for a meme... While I love making projects with htmx, doing the equivalent for the complicated frontends we've got at my dayjob would not be enjoyable to maintain either. You'd end up with with fragment routes all over the place and will have serious issues finding where which is used, as the routes are all just strings with variabl…

> You'd end up with with fragment routes all over the place

Or, you could define every route to render a full page by default and render a fragment only if you detect an htmx request. So you end up with the same number of routes as for a normal MPA.

Post reply on HN