GR8 Europe Conference Wrap-Up
Last week was the European GR8 Conference for Groovy, Grails, Griffon, and other GR8 technologies. Besides sending four attendees, Canoo had two speakers: Andres Almiray for “Flying with Griffon” and Hamlet D’Arcy for “Code Generation in Groovy“. As if that weren’t enough, Canoo also sponsored a Hackergarten night, where patches to Groovy, Grails, Griffon, and Gradle were all created. At the end of the event, a few of us Canooies got together and wrote about our favorite parts, the parts that impressed us most.
Spock – Smarter Testing with Spock by Peter Niederwieser
Peter presented the Spock Framework. Inspired by Junit and other testing framework, Spock brings the strength of Groovy into testing. A groovy DSL lets test cases be more human readable and more structured. It can even help in discussions with non-techie project members such as business analysts or managers. Also, data-driven test specifications let developers inject a data table (loaded from any data source such as an excel file, a db table or others) into tests in order to separate the test from its data. Spock testcases are Junit tests and therefore nothing special needs to be done within the IDE or within the CI build system. If a test case fails Spock provides a much better reporting output than Junit. It gives a developer hints what have went wrong. Conclusion: The Spock Framework is something to consider on our next project.
Groovy: to Infinity and Beyond! by Guillaume Laforge
Guillaume presented the most interesting bits in the evolution of Groovy from version 1.5 up to the current 1.7.x and what they would like to put in the future versions of Groovy. Especially for Groovy newbies it was interesting to see what Groovy provided in it’s first version like generated getters and setters for bean properties and how each version provided new value such as support for Java 5 features like annotations, generics and enums in Groovy 1.5. Then in 1.6 we got AST transformations such as @Immutable and @Delegate, parallel assignments, Grape and improved performance. 1.7 brought anonymous inner and nested classes, power asserts and ASTBuilder.
One of the latest additions is that annotations can take a closure as argument laying the foundation for fantastic things like GContracts, Design by Contract (TM) for Groovy, which arose big interest. Unfortunately there was no exclusive session about gcontract, but Hamlet D’Arcy came to the rescue and explained the most important things about it in his very interesting and enjoyable sesssion ‘Groovy Code Generation’. Guillaume also gave an outlook about potential new features in version 1.8 such as annotations beyond Java 5, structural pattern matching and parser combinators. The intersting thing I found was when we discovered that ‘withDefault()’ of a Map actually modifies the map even when it is made immutable:
def m = [:].withDefault { k -> 'default'}.asImmutable()
assert m.size() == 0
m.get(1)
assert m.size() == 1Also, as someone relatively new to groovy I find AST transformations extremely intersting and will definitely write one at the next Hackergarten event in Basel.
Groovy Goodness – Exploring the Gems in Groovy by Mr. Haki
Mr. Haki, aka Hubert K. Ikkink, stood in front of the audience for a 90 minute live coding session that wowed everyone. I filled a page of my notebook with new Groovy idioms that I did not know existed. For example, did you know you can use Lists as a replacement for constructors:
URL url = ['http', 'www.mrhaki.com', 80, '/'] as URL
Me neither! I had quite a few new tidbits like these as well.
It’s great to see a live coding session and Mr. Haki did it with almost no written notes. Bravo. As a Groovy developer, the Groovy Goodness blog is a great resource that I use all the time for reference. It was fun and informative to see it live.
Gradle – A better way to Build by Hans Dockter
Hans talked about his baby Gradle and how Gradle can help to ease the build system of any Java Project. The strength of Gradle is its declarative way of defining the ‘What’ to do in order to build and leave the ‘How’ to the build system itself. Even things like task dependencies (e.g. to execute Tests the sources must have been built before) are left to Gradle. Parallel Test execution is also a built-in feature. This will soon be extended to parallel build execution for multi project builds.
Build system sessions can sometimes be boring, but Hans spent nearly all the session writing build scripts live, showing how quickly new build requirements can be incorporated into an existing build. His focus was on showing how a rich project domain model and a good front end scripting language enable you to get the build you need, not the build some other team has dictated to you.
Conclusion : It is definately something to keep in mind when thinking about changing to a new build tool.
Groovy on the way to success by Philippe Delebarre, Raffaele Cigni, European Patent Office
In the keynote Philippe and Raffaele gave an overview on how the European Patent Office works and explained the difficulties of processing 140,000 patent applications per year. Since patent applications have an unstructured format it is very challenging to process them in an automated way. Currently this is done by a legacy system mainly consisting of HOST components and REXX scripts. Two attempts to migrate the old system with a new one failed. The latest attempt with a so called Data Flow Platform, a process server, was sucessful. With DFP and openrules business rules are implemented using a groovy based DSL. This is done by a business person together with a developer based upon the users’s and the business’s needs.
An eye opener for me was how a business oriented DSL opens up completely new perspectives on pair programming (a BA and a developer pairing together) and thus can contribute so much to the success of a project. In this project this was the way to bring Business and IT in direct contact which is so difficult in many larger companies. Philippe and Raffaele made the experience that this led to a much faster development cycle and in addition they rose the interest of other business domains in the European Patent Office to use this approach.
Flying with Griffon by Andres Almiray
If you think including a co-worker’s Grails-like RIA framework session in the “best of” wrap up is unfair, then you must not have seen the session! Andres built a full Twitter client live starting with nothing and using only Griffon and the standard plugins. It was runnable as an applet, a JNLP webstart, or a traditional desktop application. It had a rich data grid that competes evenly with the FlashVM alternatives, and the business/component widgets are top notch.
The time when Griffon really impressed was during the extended question and answer. Every question was answered with a “yes, there is a plugin for that” and a live demo. Need an executable installer or a Mac .dmg file? Andes typed:
griffon install-plugin installer
to install the functionality. Want to use CSS styling in your components?
griffon install-plugin css-builder













