by geenat · 4y ago · 0 comments
Having spent 36+ years in the computer industry, I consider the advent of htmx to be the first thing in web development to to attempt to pull the industy's head out of it's ass.
Don't forget to include a solid remake of css in your project like tailwindcss. It also makes code much more readable.
Heh. This reminded me of http://itre.cis.upenn.edu/~myl/languagelog/archives/000012.h... .
"PERSONNEL WHO ARE NOT AUTHORIZED TO BE IN THE HANGAR ARE NOT AUTHORIZED TO BE IN THE HANGAR"
ALL ILLEGAL ACTIVITIES ARE PROHIBITEDSo I am curious is there an easy way to write unit tests for htmx bits of the page?
https://blog.jannikwempe.com/debunking-tailwind-counterargum...
https://www.swyx.io/why-tailwind
And many similar ones.
If you're lucky your chosen language enables you to do that inlined in your function along with your normal workflow. Otherwise you now have template files, templating logic and domain logic across several files and you're right back where you started (accidental complexity), minus the JS.
There’s no standards saying you need !DOCTYPE or a head or body?
E.g.
Content-type: application/vnd+yourorg.htmlx+html-snippet
Basically that nowadays it’s fine to use text/html for html fragments, because the content is still html, even if it’s not a full document.
Alpine is about defining in-browser behaviours in a nice, simple, declarative way.
HTMX is about defining data loading and brower-server interactions in a nice, simple, declarative way.
The author of HTMX have often suggested using HTMX and Alpine together for this very reason, they work very well together.
Unpoly handles everything that requires what in SPA world would be an "API call", the difference is that the response I get is just the HTML with the data already rendered and which is dynamically updated in the DOM. Also Modals and page transitions Turbolinks style are handled by Unpoly.
Alpine handles everything that doesn't require a server API call, such as form wizards steps, dropdowns, tables filtering, sidebars, buttons loading/disabled states, etc.
The end result, the application "feels" like Github.