|
Page 4 of 5 IndicThreads >> So if Groovy is easier to use than Java and yet has the power of Java, do you think that it can someday take over from Java? Are there any drawbacks which will stop Groovy from making inroads into Java's market?
Guillaume Laforge >> I don’t think Groovy will take over Java. It’s not our goal anyway. Groovy and Java are made to cooperate together.
As Dierk Koenig (Founder of Canoo WebTest and Groovy developer) says: “Groovy is Java’s best friend”.
It’s not a competition. One of the main reasons why Groovy is there today is because we wanted to “embed” a scripting language in Java applications. Groovy is a tool to have in your toolbox if you have to externalize some programmatic configuration, or business logic. But of course, Groovy can be used to build full-blown applications too, if you so desire.
I don’t think Groovy will take over Java. Groovy and Java are meant to cooperate .
I hope that in the next few years, we’ll see more opportunities to mix and match languages on the JVM. Certain things are easier to do with Groovy than with Java. And since you can compile your Groovy classes to standard java bytecode, choose the best language for the task!
With the frenzy around AJAX or Ruby on Rails, we’re all aware of the powerful capabilities of scripting or dynamic languages. And you can bet we’ll see more usage of them in the future.
BeanShell and Groovy have a Java-like syntax which makes learning them much easier
Regarding drawbacks, well, there’s always the learning curve. Jython or JRuby have got a “foreign” syntax, when compared with Java, but BeanShell and Groovy have a Java-like syntax which makes learning them much easier. The other important drawback I see is about tool support, and especially IDE support. Current plugins mostly just support syntax highlighting, compilation, running. But they don’t offer the nice features available in standard Java IDEs.
IndicThreads >> Can you tell us where the popular Java IDEs stand as regards Groovy support?
Guillaume Laforge >> We’ve got some plugins for the most used IDEs: IntelliJ IDEA, Eclipse and NetBeans – plus some syntax files for text editors like TextPad, Jedit and others. However, the support is still somewhat basic: you have syntax highlighting, compilation, running, testing, but it lacks more advanced IDE features. With time, we’ll get there, of course, but we need some contributors experienced with writing good plugins for those IDEs. We’ll certainly focus more on the tools support when we’re done with the first final release of Groovy.
IndicThreads >> Are any frameworks being built around Groovy or is it being integrated into any of the well known Java frameworks?
Guillaume Laforge >> There are already plenty of frameworks embedding Groovy. For example, there’s the RIFE framework which allows you to define your elements (controllers and actions in RIFE speak) and your site structure in Groovy. NanoContainer also supports Groovy. The eXo Platform CMS makes heavy use of Groovy, as well as XWiki, the second-generation wiki engine.
"There are already plenty of frameworks embedding Groovy..."
But perhaps the more compelling integration is with the Spring framework. In Spring 2.0, scripting finds its way into the core (previously it was just in the sandbox). You can inject Groovy beans just as normal Java beans, transparently! Groovy becoming more mature, it’s integrated in quite a lot of frameworks and applications. Some critical applications are already in production with Groovy inside.
"In Spring 2.0 you can inject Groovy beans just as normal Java beans, transparently!"
|