Comparison of Clojure web frameworks

Adam Schmideg picture Adam Schmideg · Jul 24, 2010 · Viewed 30.6k times · Source

There are a few web frameworks for Clojure

and also some libraries for dealing with certain web development subtasks, such as

  • Enlive for templating
  • Hiccup for templating
  • Ring to handle lower level stuff with requests/responses
  • ClojureQL for persistence (it doesn't seem very active, though)

There are also hundreds of Java libraries to be used. Some aspects were already discussed here and two of them compared a bit.

I wonder how these frameworks/components compare in terms of maturity, scope, ease of development, Django/RoR feeling, etc.

Answer

Rayne picture Rayne · Jul 24, 2010

When I first started with web development, it was with Clojure. I had no prior experience with web development at all. I could not, for the life of me, figure Compojure out. I don't know if beginner documentation has been improved since then (it wasn't that long ago) or not, but at the time, I couldn't manage it. A friend pointed me to Moustache and after reading the README, I was able to throw together what is http://try-clojure.org in it's current state. So, as far as ease of use goes, I think Moustache takes the cake for me.

However, if this has existed at the time, I might be singing a different tune.

Conjure looks very cool, though very different from the other frameworks. Given my very limited experience with web development in general, I don't have much say in this matter, but Conjure feels kind of unclojurey to me. It just doesn't feel right. It may just be that I'm not used to the way it does things.

UPDATE: It has been a while since I wrote this. Lots of things have changed. Not many people use Moustache anymore, and it isn't really actively maintained, though it was complete enough (and simple enough) that it probably still works, I'd now recommend going with Compojure or Noir instead. Both of these are currently maintained frameworks and both are excellent at their job.

UPDATE 2: Noir has been deprecated for quite a while and most of its functionality moved to a library designed to be used from compojure/other ring-based web frameworks called lib-noir.