Live data from Hacker News

htmx

htmx.org

111–120 of 291 posts

Re: htmx

#111
post #70

Does this cause problems for web crawlers indexing sites, since these are not typical js event listeners etc? Even though they must use them in the background, there is an abstraction the crawler must be able to navigate. I had an entire site de-indexed for getting too fancy once, so I worry about this type of thing perpetually now.

I'd think HTMX would work with even the most basic of crawlers, since it doesn't require JS at all to be usable. But I don't know how well a JS aware crawler would do with it.

I guess you could block htmx.js in robots.txt to force them to the non-JS experience?

Re: htmx

#112
post #3

Can HTMX be used with static site generators, such as Hugo, to create interactive documentation websites?

Why does documentation need any JavaScript at all beyond opening the hamburger menu?

You don't need JavaScript for a hamburger menu, I am doing it with pure HTML. Hint: the tag.

Re: htmx

#113

Earlier quoted context omitted.

most of the examples don't have any hyperscript in them htmx generalizes HTML as a hypermedia, making any element a hypermedia control that can issue any type of HTTP request in response to any event and target any element in the DOM for replacement that's the concept, improve HTML, and it gives you quite a bit more than plain HTML, but it is intentionally constrained to not go beyond that for things beyond what that…

> for things beyond what that gives you, I am not afraid to recommend scripting I'm not suggesting that you don't. I'm suggesting that it's quite similar to SvelteKit, Remix, and now Next.js, and other form-friendly frameworks in what you'd need to know in order to do a non-trivial full stack JavaScript project that supports progressive enhancement.

The difference is that with HTMX you're not stuck in "full stack JavaScript" land. Any language that can generate HTML becomes a viable full stack option without the headaches of modern JS tools being forced into the mix.

Re: htmx

#115

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…

Htmx is for backend devs who think frontend must be simple stuff for simple devs. Then when they realize it’s not, they come up with some crazy new framework to prove to themselves that they know better and can still act superior.

Re: htmx

#116
post #74

Earlier quoted context omitted.

let's say that you have an upvote button Upvote Well where is this notification-bar? It could be anywhere on the page. Maybe it was introduced by another htmx action from another endpoint. Answering this simple question could take a lot of work. There is no way to work it out systematically short of auditing every interaction on the page.

What’s the difference to writing vanilla JS to do the same thing?

no differerence at all. jQuery functions like

  $('.foo').on('click', () => $.ajax(... $('.bar').html(result) ))
become unmanageable just as quickly.

Re: htmx

#117
post #83

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…

How do you make a request to a URL and then turn the response into HTML without JavaScript?

By submitting the form with a post request and then load an entire page with a thank you message or the form again with validation errors. Like it’s 1999.

Re: htmx

#118
post #116

Earlier quoted context omitted.

What’s the difference to writing vanilla JS to do the same thing?

no differerence at all. jQuery functions like $('.foo').on('click', () => $.ajax(... $('.bar').html(result) )) become unmanageable just as quickly.

So your complaint is not about HTMX, but about using any kind of JS without using a framework like React.

Re: htmx

#120

Earlier quoted context omitted.

Never seen a tool where the people who don't use it seem to make up some of the craziest, most obscure, weirdest justifications for avoidance. It's totally fine if you're not personally down with HTMX! However, stating that we're avoiding "idiomatic code" is incorrect. Are you claiming React and JSX and useEffect are idiomatic? Really? Surrounding HTML fragments with return() and attributes with braces is idiomatic?…

Here's some code that I don't find especially idiomatic: It has a multiline HTML attribute value and an unfamiliar programming language with the english word me that is sure to be confusing to some who don't speak it as a first language. https://htmx.org/docs/#validation-example

Good luck having editor support, linting, formatting, intellisense or anything at all here. This is a f*ng nightmare.
Post reply on HN