The Source for Java Technology Collaboration
User: Password:



Ed Burns

Ed Burns's Blog

Ed Burns JavaOne 2005 Day One Groovy talk quick notes

Posted by edburns on June 27, 2005 at 05:35 PM | Comments (2)

The most I'd heard of groovy is what Dion said at the 2005 Server Side Java Symposium. There he said it was a bit backwards to have a JSR for a scripting language before it was more fully fleshed out. Something about a cart and a horse. Anyway, after atttending this talk I can see things seem to be progressing nicely, and I don't know if I agree with Dion's assesment, though I can see where he's coming from.

It's all about less lines of code.

Most of the web tier is duct tape with pockets of business logic. Good point. Scripting languages are built for glueing things together.

Why another scripting language?

want binary compatability with Java. Want something similar to Java.


features of Ruby Python and Smalltalk.

J/Python, J/Ruby, Beanshell, all lacking.

Features

    Dynamic and optional static typing.  

    Idea: write a component in groovy.

    Native syntax for lists, maps, arrays, etc.

    Closures: nested expressions.

    regex built in ==~

    Operator overloading, not a good example.  

    Semicolons are optional.

Groovy JDK, intercepts all calls and delegates to underlying class if
not implemented at the groovy level.  Can add new methods dynamically at
runtime.  Can use a "use" clause to pull it in.

Working with groovy and Java together.  Groovy classes can be called
directly from java.  Can also use with ant.  <script> tag.  or
<groovy> tag.

XML Generation

groovy.xml.MarkupBuilder

There are lots of MarkupBuilders in groovy.  This would be easy to build
renderers.

XML Parsing

Extras

    GroovyTest.  Easier than JUnit.

    Thicky, Server side Groovy based rich client delivery via JSP.

    Unix scripts in groovy.

    ActiveX Proxy nice for being able to connect to MS apps that expose
    ActiveX APIs, such as XSL.  Can be used to drive IE.

Status

    1.0 in September

    Development time, less than half of Java

    Performance: slow 20 - 90% of java

    Ready for small non-mission critical, experimental.

    appropriate to supplement ant, unit testing

Technorati Tags:

Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Check the bileblog for why this was an utterly useless blog entry.

    Posted by: sumitkishore on June 28, 2005 at 10:41 AM

  • It is the only scripting language that defaults to doing decimal math. Embedding caclulations such as ((x +y) * (y -z)) / (a * b * c) within an application without using BigDecimal methods for add, multiply, etc.. is something that distinguishes Groovy from all other JVM based scripting languages except NetRexx.

    Posted by: jshickey on June 28, 2005 at 12:29 PM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds