|
|
|
|
|
by die_sekte
5718 days ago
|
|
Well, Clojure has Compojure & Ring (like Sinatra & Rack on Ruby). Pretty well made, but without batteries, and the documentation sucks massively (I've resorted to reading the source). Also, pretty much everything is still in beta and APIs change frequently. For CL, Scheme, Arc, ..., I have no idea. |
|
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...