Thursday, May 08, 2008

JavaOne: The power of Groovy Builders

I attended two talks on Groovy Builders yesterday that clearly illustrated this power feature of the Groovy language.


The basics on builders was covered in a late night BOF "Cooking Your Own Groovy Builder: A Step Forward into Domain-Specific Languages" given by Andres Almiray and Ixchel Ruiz. They reviewed builders for Swing, Java2D and the generic ObjectGraphBuilder which help to take a significant amount of toil out of working with Swing, Java2D, or creating generic object graphs for testing. Builders are also used for creating HTML or XML documents using syntax like:



html { head { title "My HTML Document" } body { h1 "Hello World p "Isn't this nice?"} }

That's a useful way to express structure using a syntax that is essentially added to the language by implementing a Builder. Builders are not limited to just generating code or data. In "Groovy on a Cloud: Testing Java™ Platform, Enterprise Edition (Java EE Platform) Applications on Amazon EC2", Chris Richardson showed how he created a domain specific language, using Builders, which can be used to provision Amazon EC2 instances by describing them in the DSL. The technique is described in a blog post. Really impressive stuff.




Labels: , ,

Monday, May 05, 2008

CommunityOne: Amazon EC2 and OpenSolaris

Sun is apparently poised to support Open Solaris on Amazon EC2. More information is available at http://sun.com/amazon. I've registered but haven't heard back. There are some limitations. The initial release only supports the 32-bit EC2 instances so that actually limits what you can do.


If I get a hold of the AMIs I'll try to post some notes on the experience.



Labels: , ,