Jive for Artisanal Software

I would like to lave a mention for https://htmx.org and GitHub - tatut/ripley: Ring live pages experiment
I’ve been using the first for some internal/personal tooling at work. I had to get a simple app to show some information from the db plus perform some actions like produce docx reports, slack alerts. I don’t know JavaScript and wanted to do something in clojure, plus htmx looked cool:

(defn counter-label
  "Element showing a number. Used e.g. next to nav links"
  ([txt endpoint] (counter-label txt endpoint {}))
  ([txt endpoint extra-attrs]
   (let [base-attrs {:id (str (string/replace endpoint #"/" "") "-counter"),
                     :class "ml-1 text-gray-400 text-sm font-medium",
                     :hx-get endpoint,
                     :hx-swap "outerHTML",
                     :hx-trigger "load delay:14400s"}]
     [:span (conj base-attrs extra-attrs) txt])))

Just wrote Clojure plus htmx as part of the hiccup markup. Works super well for my purposes (those are AJAX requests, but it also supports websockets).
I’ve been watching the development of Ripley for a while but haven’t had time to do something meaningful with it (just noticed you mentioed ripley in your post :slight_smile: )

2 Likes