Groovy, Java\'s New Scripting Language
When some Java developers hear about Groovy, their first reaction often is, as mine was, "Oh, no, not another scripting language for Java." We already have, after all, JavaScript and Rhino, Jython, Jelly, BeanShell,
Tutorial Details:
Why Groovy?
Why would Bob McWhirter and James Strachan create a new scripting language? Why would they call it Groovy? More importantly, what features would enable Groovy to succeed when others are already entrenched? Let's answer the third question with a look at Groovy's features.
When scripting languages that started elsewhere come to Java, they tend to bring a lot of their own API with them rather than using the "standard" (to us) Java API. Groovy is not guilty here--it provides very little special-purpose API; the entirety of the standard Java API is given to you in Groovy as it is in Java, and any third-party Java can be made available just by putting it in your CLASSPATH.
Why Use Groovy?
So, it's groovy that Groovy doesn't suffer from the problems above, but what is it actually good for? Well, any kind of scripting, really. People are starting to use it for prototyping; that is, get an algorithm working in Groovy, then convert it to Java. But often you can just write something in Groovy and keep it as a Groovy script. Just to give you one example, see the fixid.groovy example below, a script I wrote to ensure that all of the Java files in a project have a CVS ID string.
Read
Tutorial at: Click here to view the tutorial
Rate Tutorial: Groovy, Java\'s New Scripting Language
View Tutorial: Groovy, Java\'s New Scripting Language
Related
Tutorials:
Scripting power
saves the day
for your Java
apps
Scripting power
saves the day
for your Java
apps |
Java Tip 84: Customize
scoping with object keys - JavaWorld
Java Tip 84: Customize
scoping with object keys - JavaWorld |
Script JavaBeans with the Bean
Scripting Framework - JavaWorld March 2000
Script JavaBeans with the Bean
Scripting Framework - JavaWorld March 2000 |
JDK 1.2 breaks the Java sound barrier -
JavaWorld August 2000
JDK 1.2 breaks the Java sound barrier -
JavaWorld August 2000 |
Solve your
servlet-based presentation problems - JavaWorld November
2000
Solve your
servlet-based presentation problems - JavaWorld November
2000 |
Tcl your Java apps - JavaWorld March
2001
Tcl your Java apps - JavaWorld March
2001 |
Clean up your wire protocol with SOAP, Part 3 - JavaWorld June
2001
Clean up your wire protocol with SOAP, Part 3 - JavaWorld June
2001 |
Java scripting languages: Which is
right for you?
Java scripting languages: Which is
right for you? |
How to build
an interpreter in Java, Part 1: The BASICs
(JavaWorld /
May 1997 / by Chuck McManis)
How to build
an interpreter in Java, Part 1: The BASICs
(JavaWorld /
May 1997 / by Chuck McManis) |
JDBC scripting, Part 2
JDBC scripting, Part 2
Programming and Java scripting in JudoScript
Summary
JudoScript is a rich functional scripting language, and an easy and powerful general programming and Java scripting language.
JudoScript's power comes from its synergy of |
Jython
Get to know Jython, in this first article in a new series introducing alternate languages for the Java Runtime Environment, alt.lang.jre. Jython is an implementation of the popular scripting language Python, but running on a JVM. For Python developers Jyt |
Getting Groovy with XML
XML sucks. Oh, wait, XML rocks. Well, it actually does a lot of both. It rocks because of all of the editors, validators, and tools written for it. XML has all but replaced any notion of a new custom text-based data language. But it also sucks because it\ |
alt.lang.jre: Take a shine to JRuby
JRuby combines the object-oriented strength of Smalltalk, the expressiveness of Perl, and the flexibility of the Java class libraries into a single, efficient rapid development framework for the Java platform. In this third installment in the alt.lang.jre |
Prova
Prova: A Language for Rule Based Java Scripting, Information Integration, and Agent Programming |
Groovy, Java\'s New Scripting Language
Groovy, Java\'s New Scripting Language
When some Java developers hear about Groovy, their first reaction often is, as mine was, "Oh, no, not another scripting language for Java." We already have, after all, JavaScript and Rhino, Jython, Jelly, BeanShell, |
Build scripts with Groovy and Ant
Build scripts with Groovy and Ant
Summary
In nearly all developers' toolboxes, Ant is the standard build tool for Java applications, thanks to its open, standard, and multiplatform structure. Though it represents a great improvement in automating produc |
Using the ASM Toolkit for Bytecode Manipulation
Using the ASM Toolkit for Bytecode Manipulation
Sometimes Java developers need to generate or change Java bytecode in the runtime. Is can be necessary for AOP or debugging, or even for performance optimization. There are several frameworks available that |
Practically Groovy: Unit test your Java code faster with Groovy
Why unit test with Groovy?
What makes Groovy particularly appealing with respect to other scripting platforms is its seamless integration with the Java platform. Because it's based on the Java language (unlike other alternate languages for the JRE, which |
Practically Groovy: JDBC programming with Groovy
Take your practical knowledge of Groovy one step further this month, as Andrew Glover shows you how to use GroovySql to build a simple data-reporting application. GroovySql combines closures and iterators to ease Java Database Connectivity (JDBC) programm |
Techniques used for Generating Dynamic Content Using Java Servlets.
Techniques used for Generating Dynamic Content Using Java Servlets.
Techniques used for Generating Dynamic Content
Common Gateway Interface (CGI)
For any web application high performance and timely delivery are key ingredients to competitive |
|
|
|