Design Your Own DSL with Groovy

Published June 8th, 2010 Under Coding | Leave a Comment

Guillaume Laforge explains what makes Groovy to be better suited to create a DSL: closures, meta-programming, operator overloading, named arguments, a concise and expressive syntax, demonstrating how to write a DSL in Groovy.

http://www.infoq.com/presentations/Design-Your-Own-DSL-with-Groovy

Gant, the Lightweight and Groovy Targeted Scripting Framework

Published January 6th, 2010 Under Coding, Open Source Tools | Leave a Comment

Gant started out as a thin layer over Groovy’s AntBuilder, to provide a way of replacing XML as the way of controlling Ant tasks in executing specific targets. This more or less remains what Gant is really about: Gant doesn’t simply replace the XML front end to Ant, it provides target specification and dependency for Groovy scripts that use an AntBuilder. There was some flirtation with Gant becoming a fully-fledged build framework, but Gradle evolved out of Gant to take up that torch. Gant’s role then is to be very lightweight and yet provide useful functionality in terms of command line and direct API support for specifying targets to execute and scripting execution of Ant tasks. In this talk we will look at the Groovy techniques used in Gant to provide the functionality it does. Particular emphasis will be placed on using (or not) the metaclass system, and how to design (or more likely evolve) a domain specific language (DSL) to be well supported by the Groovy language.

Watch this video on Skillsmatter.com

Building DSLs: Marriage of High Essence and Groovy Metaprogramming

Published January 5th, 2010 Under Architecture, Coding | Leave a Comment

DSLs or Domain Specific Languages focus on a domain or a particular problem. They serve as an effective human-machine interaction tool as they’re highly expressive. Their scope is fairly focused and that keeps them simple and small from the user’s point of view. However, designing and implementing DSLs is not easy. Typically this involves steep learning curve and difficult parsing techniques. This is where Groovy comes in. You can take advantage of the flexible syntax of Groovy and it’s metaprogramming capability to create what are called internal DSLs, that is, DSLs hosted using a higher level language. In this fast paced highly interactive presentation you will start out learning the characteristics and types of DSLs. Then you will learn about the challenges in designing DSLs and deep dive into Groovy features that can ease the pain of implementing DSLs. Then, using some live coding, Venkat will show you how to create and implement internal DSLs using Groovy. Along the way you’ll learn some tricks to facilitate desirable syntax for your DSL.

Watch this video on Sskillsmatter.com

Domain Specific Languages – What, Why, How

Published November 16th, 2009 Under Coding | Leave a Comment

Ola Bini makes an introduction to DSLs explaining what they are and aren’t, what they are useful for, how to implement an internal/external DSL in Java and why are DSLs and Ruby so related.

http://www.infoq.com/presentations/DSL-What-Why-How-Ola-Bini

Creating DSLs in Java

Published August 21st, 2009 Under Coding | Leave a Comment

Venkat Subramaniam explains what DSLs are good for, then he demos the creation of a DSL in Java, starting with a grammar and a parser, with an emphasis on useful patterns to be used along the way.

http://www.infoq.com/presentations/Creating-DSLs-in-Java-Venkat-Subramaniam

keep looking »