News for hackers. Stuff that matters.
Re:Following up "Mother of all Htmx demos" by recursivedoubts on Friday November 08, 2024 @11:44PM (#42092586)
This is a follow up to a presentation David gave at the 2022 European DjangoCon:

https://htmx.org/essays/a-real-world-react-to-htmx-port/

His talk was a major milestone in the arc of htmx, showing that a real world, commercial project could move from react to htmx and see significant benefits. I can't stress how important his talk was in the overall success of htmx, and I'm glad he followed up on it.

Re:Following up "Mother of all Htmx demos" by spirodonfl on Saturday November 09, 2024 @12:00AM (#42092642)
Still, he was never fired for using HTMX at his job...
Re:Following up "Mother of all Htmx demos" by recursivedoubts on Saturday November 09, 2024 @12:03AM (#42092651)
nervous laughter
Re:Following up "Mother of all Htmx demos" by peutetre on Saturday November 09, 2024 @01:19AM (#42092833)
> Javascript is the only programming language available on the client side of the web platform

Not any more. WebAssembly enables all languages on the client side.

Why am I using JavaScript when I can use anything else?

Re:Following up "Mother of all Htmx demos" by WA on Saturday November 09, 2024 @01:24AM (#42092847)
WebAssembly has no DOM access.
Re:Following up "Mother of all Htmx demos" by fuzzy2 on Saturday November 09, 2024 @01:25AM (#42092852)
WebAssembly cannot access the DOM. So, not a full replacement.
Re:Following up "Mother of all Htmx demos" by peutetre on Saturday November 09, 2024 @01:47AM (#42092907)
Sure it can. It's true you have to use JavaScript glue code, but it's also true that won't be true forever.
Re:Following up "Mother of all Htmx demos" by lelanthran on Saturday November 09, 2024 @04:19AM (#42093416)
> It's true you have to use JavaScript glue code, but it's also true that won't be true forever.

I won't live forever and I'd like to deliver my product before I die.

Re:Following up "Mother of all Htmx demos" by peutetre on Saturday November 09, 2024 @04:35AM (#42093462)
It isn't onerous. Here's an example using Scheme in the browser:

https://www.spritely.institute/news/building-interactive-web...

Re:Following up "Mother of all Htmx demos" by hu3 on Saturday November 09, 2024 @07:22AM (#42094017)
At this point one should think if TypeScript isn't a better solution for most frontend code.
Re:Following up "Mother of all Htmx demos" by lelanthran on Sunday November 10, 2024 @03:58AM (#42099180)
> It isn't onerous. Here's an example using Scheme in the browser:

> https://www.spritely.institute/news/building-interactive-web...

That looks pretty damn onerous to me:

1. (Guile) Declare all the JS symbols you wish to use.

2. (JS) Write wrappers for the symbols from #1 above.

In short, you're still writing custom glue code for manipulating the DOM from the wasm language, and you'll need more custom glue code if you ever want to call your wasm functions from JS (for example, from the `onclick` attribute in an element tag, from `setInterval()`, from resolution of a promise, etc).

This is not what I meant by my response in the following exchange:

>>> It's true you have to use JavaScript glue code, but it's also true that won't be true forever.

>> I won't live forever and I'd like to deliver my product before I die.

Right now, it is true that wasm DOM access is non-existent, needs glue code to be existent, and the DOM <--> wasm interface, even with glue code, is limited as hell.

I don't know if there are plans to address this. It is irresponsible of me to use wasm for a client today under the assumption that, by the time I need a DOM <--> wasm interface, it will be there.

Before the limitations of the DOM <--> wasm interface is ever addressed, the product might even have reached end of life.

Re:Following up "Mother of all Htmx demos" by itronitron on Saturday November 09, 2024 @01:36AM (#42092886)
My only counter is that for a real-time collaborative app the server should be the single source of truth about application state, which would make htmx a good choice for that type of application.
Re:Following up "Mother of all Htmx demos" by eterps on Saturday November 09, 2024 @04:35AM (#42093465)
Look, I'm a fan of HTMX, but if you want to build a collaborative app like Google Docs or Google Sheets, it wouldn't be a good choice.
Re:Following up "Mother of all Htmx demos" by out_of_protocol on Saturday November 09, 2024 @03:23PM (#42096648)
You gotta start learning CRDT and other weird words if you want to build stuff like this. Just having react or whatever is not enough
Re:Following up "Mother of all Htmx demos" by David-Guillot on Sunday November 10, 2024 @03:49AM (#42099144)
Of course, but when you'll get to build your web UI, server-side generated HTML will not be the right choice.
Re:Following up "Mother of all Htmx demos" by dcreater on Saturday November 09, 2024 @01:47AM (#42092906)
Any major websites using htmx?
[dead]
Re:Following up "Mother of all Htmx demos" by arcanemachiner on Saturday November 09, 2024 @02:35AM (#42093065)
Like all useful tools, it has its place.

Making the next Figma? Hell no.

Adding some Ajax-y goodness to a legacy Django app? Sure.

Re:Following up "Mother of all Htmx demos" by recursivedoubts on Saturday November 09, 2024 @10:08AM (#42094792)
hgtv is using it, if, by major, you mean “websites for companies I’ve seen on TV”