4 ms·
Excellent project, I love the xtdb/htmx stack, and wanted to experiment with it myself. Maybe I'll give biff a try first! I was going to ask why the tutorial m
by codemonkey-zeta 4y ago
Excellent project, I love the xtdb/htmx stack, and wanted to experiment with it myself. Maybe I'll give biff a try first!
I was going to ask why the tutorial mentions using rum to render components, but then also mentioned using htmx, since the latter seems like it should be sufficient. But a quick perusal of the code suggests rum isn't used after all. Why does the tutorial still mention that?
- jacobobryant 4y agoRum is used throughout, though mostly via middleware[1], so you (almost) never see any calls to `rum.core/render-static-markup`. But all of the hiccup-style data structures (`[:div "foo"]`, etc) do get rendered by Rum. htmx doesn't render anything on the backend; rather it gives the frontend more ways to interact with the backend. e.g. say you make an inline form--htmx gives you the ability to display/submit that form without refreshing the entire page, but all the html that's sent to the frontend is still getting rendered first by Rum. [1] See https://github.com/jacobobryant/biff/blob/6353c406adef0344484b49a5ef2282eab77c2347/example/src/com/example.clj#L23 https://github.com/jacobobryant/biff/blob/6353c406adef034448... and https://github.com/jacobobryant/biff/blob/6353c406adef0344484b49a5ef2282eab77c2347/src/com/biffweb/impl/middleware.clj#L24 https://github.com/jacobobryant/biff/blob/6353c406adef034448...