News for hackers. Stuff that matters.
Re:Htmx is part of the GitHub Accelerator by rakoo on Wednesday August 16, 2023 @10:36AM (#37147723)
With JS you must use JS or TS and the steam factory that comes with it. With htmx you can use any language. That's a very high improvement for many.
Re:Htmx is part of the GitHub Accelerator by CharlesW on Wednesday August 16, 2023 @12:52PM (#37149878)
> With JS you must use JS or TS and the steam factory that comes with it. With htmx you can use any language.

Can you elaborate on what you mean by this? Front-end framework don't care what language back-end logic is written in. For example, I have a Vue/Vite site that calls back-end functions that I'm gradually migrating from one language to another, and no front-end changes have been required.

Re:Htmx is part of the GitHub Accelerator by wrapperup on Wednesday August 16, 2023 @12:59PM (#37149989)
Much of your business logic can live in the backend, and it keeps your frontend really tiny. The idea is to generate HTML on the backend, instead of using a front-end framework to generate HTML on the client from an API call.

You can also do the same in Node if you want to, I currently have a TS website that is mostly templated HTML in production (without htmx). Htmx would be perfect for that site.

Re:Htmx is part of the GitHub Accelerator by CharlesW on Wednesday August 16, 2023 @01:14PM (#37150231)
> Much of your business logic can live in the backend, and it keeps your frontend really tiny.

Ah, so "with htmx you can use any language" is true because its users are no longer using a programming language per se for the front-end, but instead are defining logic with htmx's DSL?

Re:Htmx is part of the GitHub Accelerator by rakoo on Wednesday August 16, 2023 @02:52PM (#37151854)
htmx extends html to generalize a behaviour that already exists, so it's as much a DSL as html itself is a DSL
Re:Htmx is part of the GitHub Accelerator by CharlesW on Wednesday August 16, 2023 @04:28PM (#37153308)
Or Vue, yes! ("DSL" wasn't meant as a negative, I just didn't know what else one would call htmx additions.)
Re:Htmx is part of the GitHub Accelerator by rakoo on Thursday August 17, 2023 @12:49PM (#37164526)
Yes but vue is far more involved than htmx though. Vue has its own way of architecturing your project. htmx is closer to a progressive enhancement of html
Re:Htmx is part of the GitHub Accelerator by rakoo on Wednesday August 16, 2023 @12:55PM (#37149933)
Yes, but you still need to write the frontend code in JS/TS
Re:Htmx is part of the GitHub Accelerator by wrapperup on Wednesday August 16, 2023 @01:00PM (#37150013)
Yep, indeed. But htmx can reduce that a lot (to 0 even, in some instances), which is why it's really nice.

There's also WASM, which is slowly gaining steam, but it still isn't a first class citizen like JS is.