frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Back-end driven HTMZ development

https://github.com/jon49/htmz-be
4•nymanjon•2h ago

Comments

nymanjon•2h ago
When HTMZ was announced I thought it was a neat little script. But I didn't understand how this would be practical in the real world. This little "extension" makes it have the full power of hypermedia development but targeted from the back end (similar to data-star). The repository has a link to see the full interactive examples of how this works.

https://jon49.github.io/htmz-be/

I replaced my `html-form` library with this as it has a smaller foot print and, therefore, easier to maintain.

sudodevnull•2h ago
Cool effort, but to say this is like Datastar is a stretch at best.
nymanjon•2h ago
My intent wasn't to say it is a Datastar replacement. Just to say that I used their idea of deciding where to place the returned HTML is based on the back end driving the decision, rather than the front end.

Datastar's model of doing it this way really simplifies the front end even more compared to HTMX's model of having the elements on the front end decide where to put the returned HTML.