Hacker News new | ask | show | jobs
by 727564797069706 932 days ago
Clojure does many things right and I like it for it a lot.

One thing that I see slowing down real teams building real web stuff with Clojure is the near-dogmatic desire to compose (dare I say hack) everything together from tons of libraries that each have their own understanding of how things should be.

I bet Clojure would be much more popular and nicer to work with if the community would _also_ (i.e. in addition to the current approach) have actively-maintained, batteries-included, generally usable web framework(s). (Is Biff it?)

So that there would be alternative path to choose for us who like the language, but are not fans of the build-your-own-monster approach.

Disclaimer: I have been spoiled by Ruby on Rails

4 comments

Many of us see Clojure's appeal as connected to avoiding tying things together unnecessarily. Don't complect, compose, etc as in the famous Rich Hickey talk (https://github.com/matthiasn/talk-transcripts/blob/master/Hi...).
Biff is very batteries included, but because it uses a couple defaults that are not particularly mainstream (XTDB instead of SQL, HTMX/Hyperscript) I imagine newcomers will still have a hard time in it. Learning Clojure, AND graph databases, and potentially HTMX is a bit much. Still, a lot of it is just setup for you. Auth is thoughtful and easy and the server config files are well commented. There are deploy scripts to setup a server in linux and SSH into the production REPL. And if you want to use XTDB, the way Biff has setup document validation is really nice.

I also like using it more than an app running on ClojureScript, personally. There are a lot of ClojureScript wrappers around React, and it's almost a meme. As a react developer, I have not found any of them easier than React. I find them kind of convoluted and un-ergonomic. However, HTMX/Hyperscript works really well with Clojure, because their HTML syntax is just arrays and objects that are easy to manipulate. It's the first time that the whole "code is data" proverb repeated by Clojure enthusiasts has rung true for me.

First-class SQL support will be really nice when XTDB2 becomes stable--I'm planning to make that the default in Biff for the sake of familiarity, then anyone who wants to can switch over to Datalog easily.
I commented above but check out Luminus or Kit.
I like Biff the most out of the ones I’ve tried.