alt.hn

5/20/2025 at 3:13:20 AM

Biff – a batteries-included web framework for Clojure

https://biffweb.com

by TheWiggles

5/20/2025 at 5:59:49 AM

Hey HN. Since this has showed up here maybe a status update would be interesting? This continues to be my main side project--amusingly it's had more traction than any of the startups I tried to build with it. Over the past year I've been working on some experimental features for Biff that are meant to help with medium-to-large codebases[1] (I've been doing this as I rewrite one of my Biff apps from scratch). There haven't been many code releases in that time, so I've got a decently sized backlog of things I'd really like to get to. E.g. XTDB v2 is almost out of beta; once I finish the app rewrite, that's next on my list.

[1] https://biffweb.com/p/structuring-large-codebases/

by jacobobryant

5/21/2025 at 4:06:13 AM

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!

by thenobsta

5/21/2025 at 6:34:29 AM

Glad to hear it!

by jacobobryant

5/20/2025 at 7:23:36 AM

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

by pkphilip

5/20/2025 at 7:48:32 AM

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.

by playworker

5/20/2025 at 10:31:11 AM

My mistake. I mean Hiccup (not Htmx). I prefer the approach of using external template files.

by pkphilip

5/20/2025 at 7:30:57 AM

How often do the batteries need to be replaced?

by Daviey

5/20/2025 at 7:55:40 AM

“Batteries included” is an expression referring to technical dependencies and other matters and is not to be taken literally.

by jb1991

5/20/2025 at 3:12:07 PM

I took it as a poke at how short lived batteries-included web frameworks seem to be in clojure.

by stonemetal12

5/20/2025 at 10:23:57 AM

Do you have an example of a Clojure web framework that doesn't include batteries?

ie, does https://luminusweb.com/ (or it's successor Kit, https://kit-clj.github.io/) includes batteries? They provide integrated solutions with templating, database access, authentication, and other common web application components pre-configured.

It's one of those weasel phrases that is poorly defined and has unclear boundaries.

I think Python first used it for the entire ecosystem:

  'The Python source distribution has long maintained the philosophy of "batteries included" -- having a rich and versatile standard library which is immediately available, without making the user download separate packages. This gives the Python language a head start in many projects.' 
- https://www.python.org/dev/peps/pep-0206/

So anything which doesn't require downloading separate packages, and provides a rich and versatile standard library is "batteries included"? Hugo in Golang, or Jekyll in Python are certainly batteries included then. Should all of them add this to their strapline?

The distinction becomes less clear when frameworks offer plugin ecosystems or when they're built atop other "batteries included" platforms. This creates a spectrum rather than a binary classification, leaving me quite skeptical of this adoption of marketing language.

by Daviey

5/20/2025 at 11:14:15 AM

"Opinionated" might have been a more accurate weasel phrase, but I think everyone that cares, knows what they meant anyway.

by kgwxd

5/20/2025 at 12:58:34 PM

Rarely. Given the stability of the language and its library ecosystem.

by adityaathalye

5/20/2025 at 11:47:47 AM

“Why don't you make like a tree and get out of here?”

by hk1337

5/20/2025 at 10:04:39 AM

Nice to hear about Pathom being incorporated

by slifin

5/20/2025 at 11:13:42 AM

[flagged]

by wpeterson

5/20/2025 at 12:00:43 PM

plenty of us out there

and we'll probably keep slugging parens til' our beards are long and greyed and robes dull and frayed... right to the tomb i say right to the tomb.

by lucyjojo

5/20/2025 at 12:29:54 PM

Clojure is alive and well. It may be out of its peak hype but it's cruising down the plateau of productivity.

by uludag

5/20/2025 at 12:19:48 PM

Usage has only been growing in my experience, I've never had a problem finding a Clojure jobs having used it for over 15 years now. Do you live under a rock or something?

by yogthos

5/20/2025 at 11:44:34 AM

"You got my homework finished, McFly?"

It looks interesting. I really like clojure when I tried it long ago but never had a good use for it.

by hk1337