This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If I was thinking of learning Groovy, what are the best tools to use for this?
I am very comfortable using eclipse and noticed that the Marketplace offers the 'Groovy-Eclipse for Juno' plugin. Would this be a recommended way to go? Or might it be better to download a Groovy distribution and use the groovyConsole instead?
The Groovy console comes with the Groovy distribution, which is great for experimenting. The Groovy Eclipse plugin is available for all versions of Eclipse (Juno, Kepler, and older ones too). I use that routinely.
The Eclipse plugin is fine if you want to use Groovy in Eclipse. If you decide to experiment with Grails (and you're comfortable with Eclipse), then I suggest downloading Groovy & Grails Tool Suite, which you can find at http://spring.io/tools . That uses the same Groovy Eclipse plugin, but also adds a complete Grails perspective, with special wizards and so on.
If you're more of an IntelliJ person, they have their own plugins for both Groovy and Grails.
I'm at that stage where I feel I should broaden my skill set a little - thinking of learning something like Groovy or Scala. I will bear you comments in mind should I go down the Groovy route. Thanks again!
The Groovy plugin for Eclipse is handy if you want to use an IDE. Alternatively, you could go for the Groovy/Grails Tool Suite (as Ken suggests), or install the Leviathan of IDEs and go for Spring Tool Suite, which includes vast numbers of Spring-y plugins, including Groovy/Grails etc. But it's a huge beast, so if you're only going to use it for a bit of Groovy, I'd stick with the Groovy plugin in your regular Eclipse.
The standard Groovy console is very handy for ad hoc scripting in Groovy. One of the many nice things about Groovy is that you can use it to write quick scripts (like Python) but you have access to all the Java libraries at the same time e.g. I've used this combination for occasional data-munging to extract data from spreadsheets using Groovy with Java APIs.
Incidentally, if you're looking at Scala, there's still time to join the free online course Functional Programming Principles in Scala from Coursera, which uses the Eclipse-based Scala IDE. Scala IDE includes a Scala console for submitting commands in command-line style, and the Scala Worksheet, which is a nice way of trying out Scala code interactively.
And if you're curious about both languages, check out The Well Grounded Java Developer which looks at both languages (and Clojure) and provides examples of using them for "polyglot programming" on the JVM. Great stuff.
I must admit that I previously signed up for the Scala course on Coursera (I know a few other guys on here did as well). Unfortunately, due to other commitments, I wasn't finding enough time to complete each homework within the allotted time.
I have been playing around with the Groovy Console this last week and it has been enjoyable. I think Groovy is the next step for me.