htmx.org / engagement farming expert (same thing) Profile picture
high power tools for html - ʕ •ᴥ•ʔ made in montana
Apr 14, 2023 11 tweets 6 min read
welcome to all our new followers! 🙏

if you are interested in htmx's underlying concept of hypermedia, check out the essays page:

htmx.org/essays

as well as our free e-book:

hypermedia.systems

also, htmx *isn't* the only hypermedia-oriented game in town!

🧵👇 the first library I'd like to mention is @unpolyjs, which has been around for a long time

unpoly.com

it is a great hypermedia library that focuses on progressive enhancement, and has some really nice features built in (e.g. layers)

highly recommended!
Sep 25, 2022 8 tweets 2 min read
just because I hear this "HTML is slow" criticism so much, I threw together a simple flask app that returns a full HTML, partial HTML & JSON rep of a somewhat large contacts table (100 contacts, four columns)

here are the results Image this is serializing an array of simple Python domain object into HTML via Jinja templates for HTML & returning a raw dict for the JSON (which Flask calls jsonify() on)

note that I'm *not* claiming HTML serialization is faster, I would expect it to be a bit slower in most cases
Sep 16, 2022 4 tweets 1 min read
if you are coming to htmx from SPA-land, you may wonder how to manage access tokens like JWT

in htmx, it is going to be much easier to establish a session via a login page, as in older web apps, and then let the natural cookie infrastructure of the web take care of things Image mixing in complex front end state management of cookies is going to be annoying and error-prone

instead, you should run all server interactions through your server, authenticated via a session cookie & do server <-> server interactions behind that

a different way of thinking!
Jun 26, 2020 6 tweets 3 min read
@niall_obrien you should build your web app against one set of URLs & JSON API against another

the web application URLs should be cache-happy w/ highly tuned, specific data access (SQL, etc.) for the important UIs

The JSON API should be flexible & open (GraphQL) but w/ rate-limiting, etc @niall_obrien this also means you can have your application code running on distinct server infrastructure, and not get taken out by a bad API client