-- Leo's gemini proxy

-- Connecting to gemini.ctrl-c.club:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

HTMX


What is htmx?


Htmx encapsulates js code into HTML attributes. It enhances HTML, the hypermedia itself.


It seems to me like a very elegant solution, and very much inline with the original vision of the hypermedia.


Intro


htmx


Gentle introduction to htmx


An excerpt from the htmx site:


Why should only <a> and <form> be able to make HTTP requests?

Why should only click & submit events trigger them?

Why should only GET & POST methods be available?

Why should you only be able to replace the entire screen?


By removing these arbitrary constraints, htmx completes HTML as a hypertext



Htmx examples


https://htmx.org/examples/


htmx examples implemented with flask/python


The examples are an excellent place to start reviewing the technology in more detail.


What is it good for?


I'd say that it is an excellent tech to provide more flexible frontend to existing or new server site generated dynamic site.


E.g. if you have e.g. python/flask/jinja app, you could enhance your jinja templates with htmx. Combine that with jinja-partials and you'd have maximum frontend kick, while retaining the full power of your server side processing and templates, etc, etc.



More on htmx as a paradigm - HTML fragments over the wire/HATEOAS


More from the creator of htmx


htmx: Writing JavaScript to Avoid Writing JavaScript, by Carson Gross


About Carson Gross


A Curated List of Links


Awsome Htmx



Some tutorials


HTMX + Flask: Modern Python Web Apps, Hold the JavaScript - Michael Kennedy



Github repo of the above talk



More on the concept (propaganda)


How Tailwind CSS and HTMX promote locality of behavior


Even more propaganda

https://edofic.com/posts/2022-01-28-low-js/



Propaganda specifically targeted towards the Django guys out there

https://dev.to/nicholas_moen/what-i-learned-while-using-django-with-htmx-and-alpine-js-24jg



Technologies in a similar line of thinking



Tailwind CSS


Unpoly


Turbo


-- Response ended

-- Page fetched on Sun May 19 03:46:05 2024