File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Refactoring

 
John Tangney
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the staid old world of Java and C#, we have some very solid refactoring tools. Combined with solid unit tests, we can whip code into shape and make evolutionary design changes. Of course you can refactor "by hand" but tools are what enable us to make fast, safe changes to our code.

But what about Groovy? Are there any refactoring tools at all?

--johnt
 
Dave Klein
author
Ranch Hand
Posts: 77
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tool support for dynamic languages may never be quite as good as that for static languages, but it is coming along. IntelliJ IDEA, NetBeans, and SpringSource Tool Suite (Eclipse) all provide some automated refactoring for Groovy code. I believe IDEA still has the lead in this area but the others are catching up.

I've found that with Groovy code, and especially with Grails, I don't need to do as much refactoring as with Java code. And when I do, it's easier to see what's what and what needs to change. There's a lot less noise in my code. I personally, rarely use an IDE and I'm getting much more done in less time than I did using Eclipse or IntelliJ IDEA on JSF/EJB projects!

Just my $0.02

Dave
 
Vyas Sanzgiri
Ranch Hand
Posts: 686
Chrome Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have found Netbeans make Groovy and Grails much easier. I have not tried STS for Eclipse as yet but Netbeans has picked up most of the features listed above and it is "free"
 
Gregg Bolinger
GenRocket Founder
Ranch Hand
Posts: 15302
6
Chrome IntelliJ IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vyas Sanzgiri wrote:I have found Netbeans make Groovy and Grails much easier. I have not tried STS for Eclipse as yet but Netbeans has picked up most of the features listed above and it is "free"


Why did you put the word free in quote?

I find Intellij's refactoring of Groovy code pretty atrocious. Most times it tells me that the refactoring is too complex so it can't continue. Which means some of my code is refactored and some is not. Don't get me wrong, i still think Intellij has the best groovy/grails support to date (although I haven't tried the latest Netbeans). But don't expect superb refactoring, for reasons that Dave mentioned.
 
Vyas Sanzgiri
Ranch Hand
Posts: 686
Chrome Netbeans IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try it - Netbeans has come a long way. We are using it for enterprise development since the last 4 yrs and loving it. They have a great community and excellent if not the best support for Groovy and Grails.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic