The site for Biff, a Clojure web framework, with tutorials and posts about Clojure, XTDB, and structuring codebases.
HN commenters recommend Biff as a thoughtful, stable, batteries-included Clojure framework for getting a web app going quickly, with REPL updates in production.
Going with XTDB by default is an example of "what do I want for my own projects?" being the first priority as mentioned in the article--I agree that Biff would be easier for many people to pick up if it defaulted to Postgres/SQLite. My hunch is that building something I personally love is the best long-term strategy for Biff anyway. When XTDB2 is stable I'm planning to have SQL be the default, then those who want to (like myself) can switch easily to datalog. See also https://biffweb.com/p/xtdb-compared-to-other-databases/ for more of my thinking on XTDB.
The main reason I switched from Bash to Babashka for the project tasks (`bb dev`, `bb deploy` etc) is that it allows me to put the task implementations in a library and have Biff projects depend on it, as opposed to copying all the task implementations into new projects (which is what previously happened). This way people can upgrade the tasks by bumping the lib dependency. Some of the tasks also have somewhat complex logic and IMO benefit from being written in Clojure/Babashka.
The only bash script is `server-setup.sh`. I suppose I could rewrite that in Babashka for the sake of consistency, but it doesn't really seem like that big of a deal to me (?).
In response to "install a variety of tools without clear purpose" -- isn't it just one tool, Babashka? I believe that puts it on par with Luminus :).
Agreed that the docs could be better written for those new to Clojure. To really do a good job of this I'd want to do some…
I totally respect that, and Clojure could invest more in offering frameworks or even no-code platforms or such features, but the truth is it doesn't. The language very much targets the people who are interested in not just the functional requirements, but also the non-functional requirements of performance, scale, architectural runway, future extensibility, operations, maintainability, correctness, re-usability, etc. Especially, Clojure targets those who believe a balance between all these and functional requirements is the holy grail. That's why it won't be the most correct, the most performant, the most productive, but a pragmatic balance of all these in almost equal parts.
Maybe it should also embrace the people looking to get a product out by simply using a framework, and I'd say there's more of that in Clojure today than ever before, but the community I think is more composed of the former people that I describe, which is why you don't see any attempted framework take hold in the community, because most current members are not in the group that "just want to build the product using an established framework".
I think the community has settled, ounce again, on a bit of a balanced approach, Kit (https://github.com/kit-clj/kit) and Edge (https://github.com/juxt/edge) are such hybrids. And some more direct viable frameworks have come along like Biff (https://biffweb.com/) and Fulcro (https://fulcro.fulcrologic.com/).
That said, since the community is more composed of…
This is a good starting point if you want to get a web app going quickly: https://biffweb.com
It uses XTDB by default but you can switch to Postgres: https://biffweb.com/p/how-to-use-postgres-with-biff/
People don't really use ORMs in Clojure, they just write SQL directly and abstract the details from consumers using functions. That said, HoneySQL is a common alternative to writing SQL that makes it a lot less painful (and composable!): https://github.com/seancorfield/honeysql
Can’t you do something like this with clojure?
I don’t understand the particulars, but one selling point of biff is it’s got built-in support for updating things directly in prod via the REPL.
There’s a fun interview with the biff guy on the podcast “the REPL”. He talks about how much fun it is to develop directly on the prod server, and how horrified people are by it lol.
https://biffweb.com/
https://www.therepl.net/episodes/48/
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-the-framework
HTML templating options: https://ericnormand.me/mini-guide/clojure-html-templates
Imagine being so used to library churn that you think it's a bad thing when frameworks and standards are stable.
What exactly are you looking for? A batteries included web framework from the last 5 years? Try biff. https://biffweb.com/