Monday, May 08, 2006

Groovy: A new language for the JVM













I could try and explain what Groovy is myself, but it's best to quote from this website:

"Groovy. No, this isn't a review of the latest Austin Powers movie. Instead, it is about an evolving new language for the Java 2 platform. Yes, new language. The Java platform is that, a platform, not just a programming language. What Sun Microsystems provides is a complete platform: a programming language, a core set of libraries, and a runtime environment, where the last bit is also known as the Java virtual machine
1 or JVM. The instruction set of the JVM is a set of operational codes or opcodes as defined by the Java Virtual Machine Specification. The virtual machine doesn't care what programming language those opcodes started as, as long as what the JVM sees is the appropriate opcodes. And, that's where Groovy comes in. Through JSR 241, the Java Community Process is helping to standardize a new language for the Java platform. According to Richard Monson-Haefel, a Sr. Analyst of Burton Group and former specification leader, "The Java programming language is excellent for large complex systems, but it can be overkill when it comes to small jobs." And, that's what Groovy offers, a scripting language that runs natively on the JVM and works with Java objects, APIs, and tools.

According to James Strachan, expert group lead and Groovy co-founder (with Bob McWhirter), Groovy started with a desire for "an alternative to javac, which had the power and expressiveness of Ruby/Python but generated regular Java classes (at runtime or build time) and that worked directly with Java classes without some other layer. So I wanted a Groovy object to descend from java.lang.Object, with collections being java.util.Collection, lists being java.util.List, support for Java arrays, Java beans, and for all the APIs in the system to be based on Java 2 Platform, Standard Edition (J2SE) and Java 2 Platform, Enterprise Edition (J2EE)."

So there you have it. But why include information on Groovy in a Java test-tool blog? Well, most of the compilation/testing tools now offer support for Groovy. Ant and Cobertura are just 2 of the tools offering support.
Again, I haven't had time to look into detail, but said I'd put the information out there.
You can grab Groovy here:
http://groovy.codehaus.org/

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home