Thursday, 24 January 2008
Playing and Learning Groovy can be Fun
A friend of mine Jim White has a little project called Groovy for OpenOffice and it indents to enable Groovy scripts execution within OpenOffice. Even though I don't indent to use scripting in my OpenOffice documents I found another nice and really fun usage for it which could also become a teaching tool for Groovy which is much more efficient that the good old Wiki.
The Groovy for OpenOffice comes with a demo document, Wings, which enables a user to create a Groovy paragraph in which he or she can add Groovy script and execute it right inside this paragraph and the output is listed below. If you are familiar with Mathematic then you know what I am talking about. The great thing is that anyone reading such a document does not have to copy and past the script code into, for example, Groovy Shell and then execute it and see what is going on. But it also enables the writer, as well as the reader, to annotate the code and discuss the output right on the same spot. This screenshot shows an evaluation of how in Groovy a programmer could intercept a method call similar to AOP and maybe change the call as we did:
keep on reading herePosted by at 10:57 PM in Groovy
