InfoQ

News

Cool things you can do with Groovy

Posted by Ian Roughley on May 10, 2007 02:01 AM

Community
Java
Topics
Dynamic Languages
Tags
Java One ,
Groovy
With dynamic languages playing a role in JDK 6, the "Cool things you can do with Groovy" session was aimed at show casing the features of the Groovy language that can help make developers more productive. Groovy experts Guillaume Laforge, Dierk Konig, and Guillaume Alleon presented.

An introduction of the standard features (enhanced language features, closures, regular expression support, GString, collection, etc.) was presented, before discussing the more productivity-enhancing features, most notable of which were:

Groovy Builders & GPath: No longer do you need to interact with complex XPath APIs to access data.  With GPath XML documents act as first class objects, allowing you to access data by calling properties.  Using builders, you work in the reverse direction, using objects and braces to create XML files. Along with XML builders there are Swing and ANT builders.

Annotation Support:  With the release of 1.1 later this year, Groovy will be the only dynamic language that supports annotations.  This is an important milestone as it will allow bidirectional data access.  A demonstration using Google Juice and TestNG showed how easy a test case using injected mock data can be developed.

Live Objects: The Groovy shell feature is not only a simple way to explore the language, but can be used to interactively explore the current Java runtime environment.  When embedded into an application, runtime configurations can be explored and modified in real-time, allowing you to check assumptions and test out theories before making permanent changes in the code.

Dynamic Applications: Compiling Groovy into Java class files and then using the static class files in your applications is one option, but there are a couple of other options available to developers.  The most compelling is to use the GroovyClassloader - with this option the Groovy scripts are compiled at runtime as they are requested, allowing source files to be changed and used without restarting the application.

Charles Ditzel has posted the PPT for download with the presentors permission.

11 comments

Watch Thread Reply

ppt cannot be opened .. by Debasish Ghosh Posted May 10, 2007 6:20 AM
Re: ppt cannot be opened .. by David Skelly Posted May 10, 2007 7:12 AM
Re: ppt cannot be opened .. by Debasish Ghosh Posted May 10, 2007 8:01 AM
Google presentation by Tom Nichols Posted May 10, 2007 8:56 AM
Nice presentation by serge boulay Posted May 10, 2007 2:16 PM
JDeveloper plugin by Guillaume Laforge Posted May 10, 2007 5:19 PM
Grails Book by serge boulay Posted May 10, 2007 9:34 PM
Re: Grails Book by Lance Shaw Posted May 11, 2007 1:34 PM
Re: Grails Book by Lance Shaw Posted May 11, 2007 2:01 PM
Re: Grails Book by Alex Popescu Posted Sep 8, 2007 7:02 AM
got that one by serge boulay Posted May 11, 2007 2:17 PM
  1. Back to top

    ppt cannot be opened ..

    May 10, 2007 6:20 AM by Debasish Ghosh

    The ppt available in the download link cannot be opened by Microsoft Powerpoint.

  2. Back to top

    Re: ppt cannot be opened ..

    May 10, 2007 7:12 AM by David Skelly

    Works fine for me.

  3. Back to top

    Re: ppt cannot be opened ..

    May 10, 2007 8:01 AM by Debasish Ghosh

    now it works .. one of those Microsoft Office service packs had to be installed ..

  4. Back to top

    Google presentation

    May 10, 2007 8:56 AM by Tom Nichols

    Guillaume also did a presentation for Google which is now on Google Video. The sound is a bit messed up, but most of it is there.

  5. Back to top

    Nice presentation

    May 10, 2007 2:16 PM by serge boulay

    Great little presentation, I have really high hopes for Groovy & Grails. Thanks for posting this Infoq. I noticed that jDeveloper was not on the list for tooling support for Groovy, for some reason I thought that they had previously stated that they would provide future support for this in there IDE.

  6. Back to top

    JDeveloper plugin

    May 10, 2007 5:19 PM by Guillaume Laforge

    Actually, there's a JDeveloper plugin, but it's still embryonic. Hence why we focused more on showing the Eclipse plugin and the Intellij IDEA plugin.

  7. Back to top

    Grails Book

    May 10, 2007 9:34 PM by serge boulay

    I also noticed that there’s a Grails book from Addison Wesley? I searched for it on Amazon but can't find it? Is this book out?

  8. Back to top

    Re: Grails Book

    May 11, 2007 1:34 PM by Lance Shaw

    The book I have is "The Definitive Guide to Grails" by Apress. I think I got it from Amazon...

  9. Back to top

    Re: Grails Book

    May 11, 2007 2:01 PM by Lance Shaw

    teach me to reply before looking at the presentation.... It looks like it isn't in English... I wonder if that is why it doesn't show up.

  10. Back to top

    got that one

    May 11, 2007 2:17 PM by serge boulay

    I got the book you mentioned, but another book would be a welcome addition .. hopefully someone will send us the link to the book.

  11. Back to top

    Re: Grails Book

    Sep 8, 2007 7:02 AM by Alex Popescu

    InfoQ is also providing a free downloadable Grails book. ./alex -- .w( the_mindstorm )p. ________________________ Alexandru Popescu Senior Software Eng. InfoQ TechLead&CoFounder

Educational Content

Bindings, Platforms, and Innovation

This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.

Orchestrating Long Running Activities with JBoss / JBPM

This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.

Neo4j - The Benefits of Graph Databases

This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.

Realistic about Risk: Software development with Real Options

This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.

Communication Flexibility Using Bindings

This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.

Writing DSLs in Groovy

After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.

Scaling Agile with C/ALM (Collaborative Application Lifecycle Management)

IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.

Concurrent Programming with Microsoft F#

Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.