I've been meaning to have a look at both Gant and easyb for a while, so I headed off to Andy Glover's sessions where he had one on each.
Gant looks pretty cool. Gives you all the power of Ant, but using Groovy imperatives rather than xml. Very cool for branching and doing other funkyness during the build. You also get Ivy bundled in the mix, so you get Maven-like dependency goodness out of the box.
Andy demoed defining closures for common operations (such as compilation) and then doing some cool currying operations to reuse the closure for all sorts of directories and classpaths. (He recommended a good developerworks article on closure currying).
I really need to download Gant and have a closer look, especially for doing build funkyness in Grails apps.
Next talk. easyb is a Groovy implementation of Behaviour Driven Development (which has been getting popular through RSpec support in Ruby-land). The idea is that you are given a Domain Specific Language (DSL) for expressing tests through a very fluent programming model of stories and scenarios.
given "a modified String class", {
String.metaClass.caps = {
delegate[0].toUpperCase() + delegate[1..-1]
}
}
when "caps is invoked" {
"andy".caps()
}
then "the value should be Andy", {
value.shouldBe "Andy"
}
You can run easyb tests via an Ant task, Maven2 plugin, or from the commandline.
Andy's a great speaker and we were a tough crowd. Really engaging.
Ok. Gotta blog up some of this stuff before it gets stale. Last night Graeme took us through what's on the planning on the horizon for Grails 1.1.
Graeme then demoed a version of grails.org running on Grails! He'd whipped up a confluence style wiki that supports basic Textile markup, versioning and rollback.
He found XmlSlurper died (OutOfMemory) on the 75Mb XML Confluence file. He had to whip up a SaxParser impl (in Groovy, of course!). The import to his Macbook (read and parse XML and import to a domain model in MySql) took around 90 seconds. Cool!
Took him a day and a half to pull together! Look for it soon!