Re:Biff – a batteries-included web framework for Clojure
by pkphilip on Tuesday May 20, 2025 @03:23AM
(#44038720)
Thank you for doing this. I am just checking out the Biff framework.
One part I would change is the dependence on htmx for html generation. I would really prefer an external template file into which we can replace fields
Re:Biff – a batteries-included web framework for Clojure
by playworker on Tuesday May 20, 2025 @03:48AM
(#44038888)
I might have misunderstood your comment but I don't think that's what htmx does, it just adds reactivity without needing to write JS, the HTML is represented in the project using Hiccup syntax which is essentially HTML in Clojure data structures - makes sense when code is data is a big part of the Lisp idea. It is an external template file into which you can replace fields, it's just a Clojure file too.
Re:Biff – a batteries-included web framework for Clojure
by pkphilip on Tuesday May 20, 2025 @06:31AM
(#44039924)
My mistake. I mean Hiccup (not Htmx). I prefer the approach of using external template files.
Re:Biff – a batteries-included web framework for Clojure
by adityaathalye on Tuesday May 20, 2025 @09:07AM
(#44041174)
AFAIK, all libraries are loosely coupled in Biff. Swapping out Hiccup / Rum for one of the other HTML templating options should be in "userspace"; straightforwardly so, without the framework maintainers intervention.
Ref:
Biff's own documentation: https://biffweb.com/docs/reference/architecture/#modifying-t...
HTML templating options: https://ericnormand.me/mini-guide/clojure-html-templates
Re:Biff – a batteries-included web framework for Clojure
by jacobobryant on Tuesday May 20, 2025 @09:36AM
(#44041493)
You can use Selmer: https://github.com/yogthos/Selmer
Re:Biff – a batteries-included web framework for Clojure
by thenobsta on Wednesday May 21, 2025 @12:06AM
(#44048167)
I've played around with Biff. It's an amazing project and a great way to get started with web-development in Clojure. Clojure can be kinda confusing because of the community defaults to orthogonal libraries. Biff, makes it easy to see which libraries are useful to connect up.
Thanks for the great work!
Re:Biff – a batteries-included web framework for Clojure
by jacobobryant on Wednesday May 21, 2025 @02:34AM
(#44048855)
Glad to hear it!
[1] https://biffweb.com/p/structuring-large-codebases/