Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Groovy Starting

 
Ajay Vikas
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

can anyone please help me to start groovy and its usage in real world applications. Please provide some startup URL's.

- Vikas.
SCJP 1.4.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Personally, I got:
Programming Groovy
Groovy Recipes
Both of "The Pragmatic Programmer"
 
Tom Purl
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The most popular use case for Groovy is probably web development, using the Grails framework. Also, it works very well as a "scripting" language, and a lot of people are using it to write JUnit tests for their Java code.

I would recommend checking out the "Groovy In Action" book if you would like a general overview of the language. Otherwise, Google is your friend.
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Groovy can also be very useful in an SOA environment that passes XML messages between services. Groovy's XmlSlurper and MarkupBuilder classes make it so much incredibly easier to work with XML than plain Java!
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should download Groovy and give it a try. It doesn't take too long.

Groovy download page

Groovy Getting Started - this should have you up and running quickly

I highly recommend fiddling around with tutorial code using the GroovyConsole (getting started describes how to start running GroovyConsole).

GroovyConsole is like an extremely bare bones IDE that lets you test out code quickly. It's fun to use.
 
jon learmouth
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Some articles from IBM:

http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=mastering+grails
http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=practically+groovy:

Apress have published a couple of Grails / Groovy books which are good for beginners.
 
Matthew Taylor
Rancher
Posts: 110
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The way I started programming Groovy was by writing tests using it. This is easy because you only have to add the Groovy jar to your project classpath, and you can just write a new test that extends GroovyTestCase. If you don't know how to write the code you want in Groovy, just write it in Java right there in the Groovy class.

Testing is Groovy is much easier than Java, because you can mock things so easily. See http://groovy.codehaus.org/Testing+Guide.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic