Brian Gruber
combinations thereof
meetings blogs news home
<< July 22, 2011 | Home | July 24, 2011 >>

The clojure web-dev ecosystem just gets better and better

I was just working on making a few small changes to LispNYC's website. Did you know the full source to our site, in Clojure, is available on github? Anyhow, while I was working with it, I decided to streamline stuff by moving to the relatively recent lein-ring plugin.

The plugin is simply great. By abstracting away common web development requirements, it allowed me to remove explicit servlet declarations, the 'main' function, dependencies on 2 ring libraries that really should have been development dependencies in the first place, and the need for a separate plugin to generate war files. If you're doing web development in Clojure, I highly suggest you check it out. James Reeves (the author of lein-ring and many other clojure web-development technologies) has a great and simple instructions for getting started. If you're using compojure (like we are!) realize that defroutes generates a ring handler, so you can just use that as the symbol you hand off to the plugin (though for more recent versions of compojure you probably want to use the result of compojure.handler/site).