Chapter 5. Advanced Groovy Programming

Now that we know how to write and run Groovy scripts, it is time to discuss Groovy extensions and see how we can benefit from them. In Groovy scripts, you can use any Java library and API. However, Groovy offers a few extensions that adapt some of the most popular Java APIs to a scripting programming paradigm. Just as with the classes that handle files and processes, we can find closure support for classes that handle database connections, XML parsing, servlets, and so on.

In this chapter, we cover the following topics:

  • How to work with databases in a “Groovy” way (GroovySQL)
  • How you can use Groovy to write servlets (GroovyServlet)
  • Template processing in Groovy (GroovyTemplate)
  • Groovy’s support for markup ...

Get Scripting in Java™: Languages, Frameworks, and Patterns now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.