Is there a medium-sized Clojure sample application that could be used as a "best-practices" example, and a good way to see what such an application would look like in terms of code and code organization? A web application would be particularly interesting to me, but most important is that the program do something commonly useful (blog, bug-tracking, CMS, for example), and not something mathematical that I've never ever had to implement in the real world (solving the N-queens problem, simulating Life, generate Fibonacci sequences, and such usual fare of function programming languages).

I was going to ask this exact same question. It makes me wonder how practical it is in the "real world"
–
ScArcher2Dec 9 '08 at 5:20

5

People are too asphyxiated on this "Real world"
–
RayneFeb 5 '09 at 14:19

I made an IRC Bot with it, it's perfect language for it (performance is not a problem, hot-swapping plug-ins, output is trivially related to input - function). For most other uses it's not very good. Too much CPU wasting and especially too much memory usage, memory churning, cache misses.
–
U MadDec 29 '11 at 8:38

The monolithic Clojure Contrib library has been deprecated in favor of a set of new modular contrib libraries that can be found here: dev.clojure.org/display/doc/Clojure+Contrib (note that Clojure has moved from the richhickey repository on Github to the official clojure repository)
–
Sean CorfieldNov 24 '11 at 2:45

Take a look at Compojure. It's a web framework written in Clojure, so it allows you to write and run (on an embedded Jetty) useful web apps in Clojure, and also serves as a good example of a sizable chunk of real-world Clojure code.

I think that Compojure is probably the best way to go for an example. I doubt it's a "medium sized" example, but there's probably subsections of it that are small that would work. At least, that's going to be my approach. smiles

which is a small m.u.d. client prototype built in clojure, the advantage being that it's totally self-contained, and probably pretty simple, including the concepts involved. Documentation, eh, it's jus' alright, but the concepts in the code tie very closely to the action elements of the M.U.D. that runs easily.

We're two years on from this question and, whilst that's still early in the cycle for a language, Clojure is definitely being used for serious production work. At World Singles, we have several thousand lines of Clojure in production that handle all sorts of general purpose tasks in our web platform - I blogged about this in my Real World Clojure series.

A positive sign: there is an article on InfoQ about "one of the first published reports of Clojure being used in a large-scale production deployment." It doesn't appear to be open, but at least it is a sign of Clojure being used in a mission critical application in the real production world. A big step for the Clojure community.

I can only recommend you to check out Pedestal, a very promising web framework, both server-side and client-side (where it facilitates ClojureScript). The gui stuff is a bit hard to grasp, but quite much the way it should be done to stay sane in a large app.