Presentation: "Have Your Cake and Eat It Too: Meta-Programming Techniques for Java"

Time: Wednesday 12:05 - 13:05

Location: Olympic

Abstract: Ever been envious of how easily Python, Ruby and even JavaScript can “meta-program”? Meta-programming provides new ways of writing your code that goes beyond traditional object-oriented composition or inheritance. It’s like magic: seemingly simple or innocuous code takes over big responsibilities; new methods appear out of thin air. Your code, your primary code, stays simple and easy to follow.

Now, we know you can do that for scripting languages, but what do we do about Java? With the proper context (some kind of framework responsible for instantiating classes), it is possible to emulate many of those same capabilities, by applying a simple set of code transformations at runtime. In this session you’ll learn about meta-programming and how it can apply to traditional Java. You’ll learn about the techniques needed to transform classes at runtime, adding new behaviors and addressing cross-cutting concerns. The presentation will discuss a new framework, plastic, designed for this specific purpose, but also draw examples from the Apache Tapestry web framework, which itself is rich in meta-programming constructs.

Howard Lewis Ship, Creator & Lead developer for the Apache Tapestry project

 Howard Lewis Ship

Howard Lewis Ship is the creator and lead developer for the Apache Tapestry project, and the creator of the Apache HiveMind project. He has over twenty years of full-time software development under his belt, with over twelve years of Java.

He cut his teeth writing customer support software for Stratus Computer, but eventually traded PL/1 for Objective-C and NeXTSTEP before settling into Java.

Howard is the author of Tapestry in Action for Manning Publications (which covers Tapestry 3.0), and is currently an independent consultant focused on Tapestry mentoring and project work. He is also a highly experienced educator, teaching Tapestry since 2003. He lives in Portland, Oregon with his wife Suzanne, a novelist

Twitter: @hlship