| I recently rebuilt my site[1] in Clojure. Ring at the bottom layer (basically a given). Beyond that I'm using Moustache[2] for routing, Enlive[3] for templating and Clutch[3] to talk to CouchDB. I had previously tried with Compojure and Hiccup. The hardest parts were learning enlive and moustache. Enlive is incredibly powerful and very clever, but can be a bit overwhelming for clojure noobs. You definitely want to check out David Nolen's tutorial[5] for it. Aside from that, #clojure and the ring google group are full of wisdom. Deployment wise, I build the site with a basic leiningen[6] uberjar and run it from an ssh, background it and disown it. yeah, thats terrible, but im lazy and nobody visits my site anyhow ;) Caveat here: Clojure 1.2 has a small bug with interned keywords[7] that will knock my site over in a couple of days if i forget to start it up with the default JVM profile. the -server profile fixes the trigger issues Aside from that, I have an nginx gateway server that handles serving my media, nowww redirection and proxies all dynamic requests through to the jvm. the site itself hosts a jetty HTTP server via ring to handle all the requests. The 'hardest' part of getting started with clojure vs say Python+Django or Ruby+Rails is that there is a lack of 'get you going' magic / tools like scaffolds or djangos admin. Once you get past that though, it is a very enjoyable platform inspite of the API changes. [1]: http://brehaut.net [2]: http://github.com/cgrand/moustache [3]: http://github.com/cgrand/enlive [4]: http://github.com/ashafa/clutch [5]: http://github.com/swannodette/enlive-tutorial/ [6]: http://github.com/technomancy/leiningen [7]: http://www.assembla.com/spaces/clojure/tickets/444?comment=9... |
Ack! GNU screen will change your life.
[ http://www.emacswiki.org/emacs/GnuScreen ]