06 July 2016 - David Clark
Making DSL's in groovy has changed a lot since Groovy 1.0. Back then it was all about what you could do dynamically: implementing propertyMissing and methodMissing, adding operator overloading, using named parameters, and leaving off semi-colons. All of those are still valid groovy, but Groovy has added a lot of features to make DSL's safer, faster, and easier to use. These are features like the @DelegatesTo annotation, script base classes, type checking extensions, extension modules, and the old standby, closure delegation.
We'll also talk about what makes a good DSL and when you want to implement one.
David Clark is a software engineer working for ResearchNow. His current responsibilities are 1) developing tools for improving database deployment speed and accuracy and 2) Improving and simplifying data access in ResearchNow applications. Both make heavy use of Groovy. In the past he worked in Telecommunications and the financial/banking worlds using Java technologies. He has used Groovy since the 1.0 release in 2007.