I put together a simple DSL for interacting with Groovy today. I'm calling it Grouch*. Using Grouch, using CouchDb is as easy as this:
* Thanks to Ben Acker for the name. Funnily enough someone else had the same idea for a name but never pushed any code.import com.curiousattemptbunny.grouch.*
grouch = new Grouch('http://localhost:5984')
if (grouch.mydb.exists()) grouch.mydb.delete()
grouch.mydb << [_id: 'mydoc', aField: 'aValue' ]
assert grouch.mydb.mydoc.aField == 'aValue'