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.

Twitter

Since the first version of this book was released in 2010, Twitter has become an ubiquitous part of the social media landscape. So ubiquitous in ...

Get Groovy for Domain-specific Languages - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.