Fork me on GitHub
#announcements
<
2021-08-07
>
Michaël Salihi20:08:29

I just discovered htmx https://htmx.org/ from a clojureverse post. Since I play a bit with it and I redone the classic SPA todo app with Babashka. An SPA without writing one line of JS and less than 10kb gzipped directly from Babashka! Here the repo for who is interested: https://github.com/prestancedesign/babashka-htmx-todoapp

29
🆒 21
babashka 3
refset21:08:23

Thanks for sharing this, it's very neat! I also looked at your somewhat related Inertia.js/PingCRM stuff recently - what are your feelings about this approach relative to that stack so far?

lukasz21:08:37

I'm working on an internal app built with hiccup and https://unpoly.com - somewhat similar concept and works great in practice

Jakub Holý07:08:18

In the Readme, extendable should perhaps be extensible?

Michaël Salihi14:08:59

@U01EFUL1A8M Thanks for pointing me out. The missing space is not interpreted but definitely a typo, yes. @U0522TWDA This text is quoted from the official htmx website https://htmx.org/ so I don't know. English isn't my first language, but it seems "extendable" exists right?

👍 2
dgb2314:08:19

both “extendable” and “extensible” are completely fine, the slightly more precise term would be “extensible”, but they are largely interchangeable. https://english.stackexchange.com/questions/90426/extensible-vs-extendible

👍 2
❤️ 2
Michaël Salihi14:08:00

@U0JEFEZH6 I didn't know a "unpoly", so thank you! It seems very interesting, I'll definitely play with it soon! :-)

Michaël Salihi15:08:21

@U899JBRPF Thanks! I will say while both are alternative propositions but do not have the same objective of abstraction. Htmx allows not to write a single line of JS (although it is possible to write a backend in Node.js 🙂) while with Inertia.js, it is necessary to have a base with one of the following JS front-end frameworks (or "React" "Vue" "Svelte"). When we know and do not rule out the use of these, I would say that the approach of Inertia.js is more direct. The front-end is easy to write because it acts much as a template and everything that is routing, state management, auth, etc. will be done back-end side as writing a classic application. This will require little adaptation for a back-end profile having notions of front for example. With Htmx, there will be a little more to learn and the approach seems less obvious at the beginning with the advantage of being much lighter. I spent a lot more time in Inertia.js documentation than in Htmx so my opinion is certainly a bit biased at the moment. I hope that answers your question.

🙏 4
👌 4
dgb2316:08:45

htmx seems to be brutally simple and it takes the HTTP REST / HATEOAS approach very seriously, which is I think a good thing if you buy into the model. Also, it’s always going to be faster and more lightweight to directly inject HTML fragments instead of parsing JSON/EDN, then constructing a VDOM and then rendering the HTML. I think the limits are clear: As soon as you add forms and interactive elements with reactive states, you don’t want to make round-trips. The server typically also doesn’t need to know about the specific UI state you’re in at any given time. I like htmx! And I’m looking forward to explore it’s limitations, uses and how to solve problems that it doesn’t solve well.

👌 2