News for hackers. Stuff that matters.
Re:Htmx – high power tools for HTML by wenc on Thursday May 28, 2020 @10:07AM (#23337373)
> Those exist?

For sure. Most of the backends we write only return JSON. If you request HTML or any other content-type, we return nothing. We just don't implement it.

If you write your backend from scratch and only intend for it to be used only with your web front-end, you can make it return bits of HTML (I have several applications in jQuery that work like this -- the value of the response just gets inserted via ("#id").html(val)).

Our current backends are written to support multiple generic consumers of which a web front-end is only one.

Re:Htmx – high power tools for HTML by RyanGoosling on Thursday May 28, 2020 @12:03PM (#23338851)
But it could
Re:Htmx – high power tools for HTML by wenc on Thursday May 28, 2020 @12:22PM (#23339097)
Sure but it’s extra engineering time (tiny per instance yes but multiplied over many legacy apps with no value add — not an easy business case to make just to use a html based front end library.)

Much easier to use client-side templating as suggested by the author.