Speaker Topics - No Fluff Just Stuff

Compile Time and Runtime Metaprogramming With Groovy

Groovy should feel instantly familiar to Java developers – after all, Groovy is an extension to the Java language. Many of Groovy's enhancements come in the form of metaprogramming, or new methods added to existing classes. In this talk, we'll take a look at how Groovy adds these methods to Java classes, and how you can do the same. Despite the somewhat frightening nomenclature, it's much easier than you might think.

The dynamic nature of Groovy makes it a fantastic language for building dynamic applications for the Java Platform. The metaprogramming capabilities offered by the language provide everything that an application development team needs to build systems that are far more capable than their all Java counterparts. Taking advantage of Groovy's metaprogramming capabilities brings great new possibilities that would be very difficult or just plain impossible to write with Java alone. Building Domain Specific Languages in Groovy is easy to do once a team has a good understanding of the Metaobject-Protocol (MOP) and the method dispatch mechanisms used by the Groovy runtime environment.

This session will cover in detail a number of advanced metaprogramming concepts in Groovy. The discussion will cover using dynamic method interception, meta-class manipulation, AST transformations and Groovy's Metaobject-Protocol (MP) to build flexible applications in Groovy including implementing a Domain Specific Language (DSL).


About Scott Davis

Scott Davis is the founder of ThirstyHead.com, a training company that specializes in Groovy and Grails training.

Scott published one of the first public websites implemented in Grails in 2006 and has been actively working with the technology ever since. Author of the book Groovy Recipes: Greasing the Wheels of Java and two ongoing IBM developerWorks article series (Mastering Grails and in 2009, Practically Groovy), Scott writes extensively about how Groovy and Grails are the future of Java development.

More About Scott »