GeeCON Prague 2014*
The moose likes Groovy and the fly likes Groovy and Java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Languages » Groovy
Bookmark "Groovy and Java" Watch "Groovy and Java" New topic
Author

Groovy and Java

Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Hi Scott,

Groovy as a language is quite appealing for Java developer. The syntax is quite similar and it compiles to Java bytecode. I've even already bought some Groovy books even though I've got not time to read them. My questions are:
1. Will Groovy replace Java in the future?
2. What are the scenarios where it makes more sense to use Groovy than Java?

Thanks.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Burk Hufnagel
Ranch Hand

Joined: Oct 01, 2001
Posts: 814
    
    3
Freddy,
I'm not Scott, but if you have "Groovy in Action" I recommend reading it soon. It's very informative and the examples will get you familiar with the basics (I did a review of it for JavaLobby) and should prep you for another book like "Groovy Recipes"

Hope this helps,
Burk


SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

In my very humble experience, Groovy (or any other JVM-compatible language) is hard to sell in Java workshops.
S Davis
Author
Ranch Hand

Joined: Feb 07, 2006
Posts: 40
1. Will Groovy replace Java in the future?


That's a bit like asking if frosting will replace cake in the future... (wink)

Groovy quite literally would not exist without the Java platform. It augments Java, not replaces it. That is what I find so refreshing about it. 100% of my legacy code is already Groovy-compliant.

Later, John Todd wrote:
In my very humble experience, Groovy (or any other JVM-compatible language) is hard to sell in Java workshops.


I can't argue with John's experience, but I find that statement odd. Groovy _is_ Java. I've had hard times convincing conservative Java shops to look at Ruby on Rails because it is a different language, requiring different IDEs, different deployment servers, different build processes, etc. But Groovy is a single JAR added to the classpath. Everything else about your development environment stays the same.

Now if John's experience is working with conservative organizations, I'm sure that he's had the same problem encouraging them to upgrade to Java5, or use Spring, or Hibernate.

If your organization prefers strongly-typed languages, then Groovy might not be an easy sell at all. Perhaps Scala?
Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Now if John's experience is working with conservative organizations, I'm sure that he's had the same problem encouraging them to upgrade to Java5, or use Spring, or Hibernate.

Yes, indeed.
 
GeeCON Prague 2014
 
subject: Groovy and Java