Re:Hmpl.js: Template language for fetching HTML from API
by arcbyte on Tuesday July 23, 2024 @09:14AM
(#41045654)
HTML/Javascript need a lot of work to make it usable again, so I love seeing attempts at fixing pain points like this.
That said, even after reading the Why HMPL section, I don't see why I would use this? I mean, the examples look like verbose, complicated alternatives of what HTMX does much more concisely and without me writing javascript.
Bravo on getting the project here though! That's an accomplishment!
Re:Hmpl.js: Template language for fetching HTML from API
by evbogue on Tuesday July 23, 2024 @10:19AM
(#41046254)
My first thought was this is trying to be htmx as well, but upon reading the readme this project appears to convert the html it has retrieved from the API into a DOM object using the hmpl.compile() function. Could I do that with htmx?
Re:Hmpl.js: Template language for fetching HTML from API
by daisydaisytts on Tuesday July 23, 2024 @03:07PM
(#41049640)
…so just [jQuery.load](https://api.jquery.com/load/) with some verbose templating? My 2000s-era developer self is so triggered. Please can we not go back to DHTML / AJAX?
Snark aside, while I disagree with the premise I applaud your thinking out how to shoehorn fetch into a template language.
That said, even after reading the Why HMPL section, I don't see why I would use this? I mean, the examples look like verbose, complicated alternatives of what HTMX does much more concisely and without me writing javascript.
Bravo on getting the project here though! That's an accomplishment!
Snark aside, while I disagree with the premise I applaud your thinking out how to shoehorn fetch into a template language.