I think the excitement about htmx is probably justified, though I’m only beginning to use it myself. It encourages a HATEOS (Hypertext as the Engine of State) instead of a lot of shadow DOM programming. If you have a pretty normal website with pretty standard media, you can get a smooth SPA-like feel with Django and templates that have a few extra htmx attributes. The components (if they’re reasonably independent) can be reused anywhere by calling their view within your new page view and inserting the output in the template for this view.
The developer (architect?) of htmx (Carson Gross) has a related project called HyperScript which is for in-page updates; it is absurdly readable (like natural language), but still developing fast, so might not be stable?
That being said, there are also things where the ‘media’ is not something that django templates is naturally set up to satisfy and a custom frontend tailoring a framework makes sense. 3d graphics, editable SVG - anything where the update has to be computed locally. So to sum up, I reckon:
- possibly not if you are not using large parts of django (forms, ORM, templates). Depends on the alternative I guess?
- can’t think of any that you couldn’t avoid with htmx, if you don’t have special media needs for your users, and even then, I think I’d use a framework that covered that medium (e.g. a dedicated game engine).
- Depends how good you are at Django templates vs javascript (?) and how hard the thing you want to do is, but I think a lot of django-htmx people find templates close to html, and htmx an easy-to-understand extension of html, and overall find it much easier.
I guess as soon as you have to support an Android app, an iOS app and a responsive browser interface, a common backend that just sends data is simpler than sending HTML back and forth(?)