Compojure 0.4.0 released
groups.google.com
groups.google.com
I was wondering if anyone had much experience building a significant web application with one of these frameworks? Are they sufficiently powerful to enable fast development? I worry that a simple system like this might lack some of the templating and and database layers I am used to in larger frameworks such as Rails and Django?
I suppose I might just be afraid to lose having the framework do most of the work for me. It has made development quite fast.
Compojure doesn't do much for you (it's like Sinatra), I find it elegant, but it really doesn't give me the massive productivity boost Rails does.
Admittedly, none of my web projects in recent years have been typical database-backed web apps. Clojure (and thus Compojure) is actually a fantastic candidate if you're keeping state in memory - STM is made for this.
On my infinite TODO list I've got an xLightweb back-end for Compojure. This would allow asynchronous I/O in the style of Node.js, something that's a bit tedious in pure Java (no closures), and Clojure has certain advantages over JavaScript/V8. I find asynchronous I/O hard to imagine in a Rails-style environment.
Edit: I forget, does java.nio already use kqueue/epoll and friends? If so then Netty should do the trick as it uses java.nio.
I haven't tried netty yet, it seems a lot more heavyweight than xSocket/xLightweb? Or is my perception warped because it's hosted on jboss.org and the description uses "enterprise-friendly" language?
So, I'm quite excited to have found the answer to my question, AND someone has already started a clojure/netty project:
http://github.com/texodus/saturnine
Check out these comparisons of Netty vs others:
http://gleamynode.net/articles/2232/
http://amix.dk/blog/post/19456
http://www.znetdevelopment.com/blogs/2009/04/07/scalable-nio...
http://www.znetdevelopment.com/blogs/2009/04/09/scalable-nio...
http://www.znetdevelopment.com/blogs/2009/04/13/scalable-nio...
If you are writing full blown end user web applications then you are better off sticking with Rails until something more mature comes along, IMHO.
http://groups.google.com/group/clojure/browse_thread/thread/...
When you pick Compojure and you start hacking, you can't help but feel isolated, and it's hard to know if what you're doing is even a good idea.
That being said, I still like Compojure for whipping up really quick/small web apps where the problem and what needs to be presented are both well suited to the sort of thing Clojure solves.