News for hackers. Stuff that matters.
Re:State of HTML 2023 now open by moron4hire on Saturday September 23, 2023 @12:31PM (#37624761)
I'm so sick of people comparing about "reinventing the wheel". Even for the literal wheel, I can think of at least 3 times off the top of my head that it was usefully reinvented in just the last 20 years. There is nothing that is perfect for all use cases.

People who say "don't reinvent the wheel" should come up with something new to say.

But they can't, because the hate innovation so much.

Re:State of HTML 2023 now open by nsonha on Saturday September 23, 2023 @02:06PM (#37625750)
You are right and I was wrong, reinventing the wheel is the least harmful thing of the like of htmlx. The actual dumb thing is that they cling on to a fundamentally wrong abstraction to build apps (form method), simply because that’s the web they’re familiar with.
Re:State of HTML 2023 now open by basique on Tuesday September 26, 2023 @05:40AM (#37656787)
Why is it a wrong abstraction?
Re:State of HTML 2023 now open by nsonha on Tuesday September 26, 2023 @10:14PM (#37668985)
It assumes a lot of things:

- Submitting a form results in an immediate network request (offline-first apps, hello?)

- The network event is HTTP-based

- The network event is REST

- The payload is contained within the ...markup (like why?)

- What about network requests that are not CRUD? If you API is designed propperly, that should be most of the endpoints. Do you make dummy forms for them? How?

Re:State of HTML 2023 now open by basique on Wednesday September 27, 2023 @02:22PM (#37678920)
The point of htmx is to be able to do the interactivity on the server, so using it with your existing, general API isn't really the point - the backend (or, well, frontend backend?) just serves the needed data directly in the markup. This isn't really ideal if you think of your site as a separate frontend/backend, but it makes sense if you already have a backend and don't want to make an API just to then write JS that consumes the API and shows you stuff. Granted, this doesn't really work well with offline-first apps, but it's nice if you need to actually poke the server whenever you need to do something.