Groovy for Domain-specific Languages - Second Edition

(nextflipdebug2) #1
[ 1 ]

Introduction to DSLs


and Groovy


It has been over 10 years since my first contact with the Groovy language. The
occasion was an introductory talk about Groovy at JavaOne in the Moscone Centre,
San Francisco, by James Strachan, the creator of the Groovy language. Java itself was
just 10 years old at that time and Groovy was one of the very first languages other
than Java to run on the Java Virtual Machine (JVM).


Just this year, Java celebrated its twentieth birthday. In 2005, there were an estimated
3 million Java developers worldwide. Now, in 2015, Wikipedia estimates it as 11
million. The Groovy language has also taken off. There were an estimated 5 million
downloads of Groovy in the last year alone. So what are the benefits of Groovy and
why should you consider using it?


The Groovy project site at http://www.groovy-lang.org explains this better than I
ever could with six major benefits:



  • A flat learning curve

  • Powerful features

  • Smooth Java integration

  • Domain-specific languages

  • A vibrant and rich ecosystem

  • The scripting and testing glue


In this book, we will cover all the key benefits of the Groovy language. The main
focus, however, is on how Groovy supports the development of domain-specific
languages through its metaprogramming features.

Free download pdf