After already a first great university day it was now time for the official start of the conference days. After Søren's welcome speech it was for time for Guillaume Laforge to present his brand new presentation about Groovy 1.8. He touched on all the interesting new features we can find in Groovy in his presentation.
The new command chain expressions even allows us to leave out dots when we invoke methods so we can write even nicier and more natural language like DSLs. A lot AST transformations have been added in Groovy 1.8, closure methods, JSON supports, compilation customizers and much more. The slides are available on SlideShare.
Also a lot of libraries are upgraded for the upcoming Grails 1.4 release, like Spring, Hibernate, Groovy. Tomcat 7 will be the default servlet container. Also hot reloading of classes has been improved. A special agent is used for the JVM, that allows class reloading for almost all classes of the application the speed up development even more.
The database migration and resources plugins will become part of Grails. In the not so near future we can expect Grails 1.4 M1 to be released so we can experience a lot of these nice features already and try them.
Also Peter explained they want to get a better insight to see how plugins are used and for example how many times a plugin is used. With this data the usefulness of a plugin should be more clear to developers when they want to download and use a plugin.
Both the Groovy and Grails update session where single track session, but the rest of the Gr8Conf was with 2 tracks. So I had to make choices and cannot cover every session in this report. I attended the Adopting Grails session, about how Grails can be implemented in a real world situation. Even integrated with another Java web application. We learned how we can split up a Grails application using plugins into several parts. For example a plugin to define only the services layer. This way the plugin could be used in a Java and Grails application. Also we learned that still Java developers are a bit scared of Groovy. If they have to fix bugs in parts of Groovy code with for example a bit of dynamic programming then they couldn't get it.
After the lunch I attended the Gradle Update by Peter Niederwieser. He works at Gradleware and did a good job explaining Gradle. First he showed how easy it is to get started with Gradle of you come from an ANT build system. It is basically just a matter of importing the ANT build and you are ready to. He also show how you can re-use your Maven build from Gradle. He created a new task rule to intercept the commands and then invoke Maven through an exec invocation to get the Maven build going. And of course he showed that Gradle doesn't need much code to use it for a Java (or Groovy) project that already uses the Maven standards for directory structure. Gradle of course shines with parallel test execution, the fact tasks are only executed when they need to be by looking at input and output variables and Peter showed how this works.
Next up was my own presentation for CodeNarc & GMetrics. I did a live coding session where we started to take a look at a bit of Groovy code and then see which CodeNarc rules where fired. We learned CodeNarc contains many rules and they are also great for new Groovy developers to learn about how you code can be more Groovier. CodeNarc has for example a lot of rules that will tell you that certain parts of your code are a bit Java-ish and how to turn into something more Groovy-ish. I explained how can use the configuration to change rule priorities or even disabled them completely. We learned how to customize certain rules and I wrote a complete new rule and showed how it could be used in our CodeNarc analysis.
GMetrics is more about calculcation and reporting of code metrics like ABC (Assignment/Branch/Condition) counts and cyclomatic complexity. We finally looked at how we can customize the report from both tools.
The next session I attended was Paul King's Groovy Testing. The focus was on how Groovy can be used for testing with web drivers like HTMLUnit. He explained the many possibilities that are out there to do testing and you probably will need a combination of different techniques to get a satisfying test outcome. There is no one golden solution to cover each testing need. Each project has different characteristics and therefore different testing needs. But Groovy is very powerful to use for testing purpose, because the language is so powerful and dynamic that is easy to express your testing needs.
He also told us to create a testing API or DSL for your own testing to provide an abstract layer between how you express your tests and the real test implementation that can be used.
He ended with showing how you can use Groovy to generate test data for your testing. Different scenario's can be created with combinations of test data, but you can also for an optimal instead of a maximal set of test data to keep your tests running quickly. On SlideShare we can find slides that where used during the presentation.
The last session for the first day I attended was Effective Groovy by Hamlet D'Arcy. Following the guidelines and rules from Effective Java he showed how to implement those rules in Groovy. And of course the power of Groovy really shines when we only have to one-liners or add annotations to implement the Effective Java rules.
He also added new "Effective Groovy" rules which are not in Effective Java but apply to Groovy applications. A lot of the rules were already implemented with the new Groovy 1.8 features, so it was great to see these features already mentioned and shown. The presentation was a lot of fun and just showed again how powerful Groovy really is. Hamlet also posted the slides.
To end this beautiful and great first conference day we were treated by snacks and beer for a social gathering between all conference attendees. Thank you Gennemtaenkt for organizing this tasty and fun meeting.
Read more about day 3.