Chapter 6. Example DSL – GeeTwitter
Before we dive any deeper into Groovy's more advanced features, let's take some time out to build a simple Groovy DSL, using some of the knowledge that we acquired in the previous chapters. In this chapter, we will use closures to build a simple and useful DSL that allows us to automate simple scripts that interact with Twitter.
We will take a stepwise approach to building our DSL. Starting with some vanilla Java APIs that require Groovy or Java programming skills, we will progressively apply some cool Groovy features to evolve a simple DSL that anybody can use.