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
This message was edited 1 time. Last update was at by John Tangney
John Tangney
JD Tangney and Associates
http://jdtangney.com
skype: jdtangney
Dave Klein
author
Ranch Hand
Joined: Aug 29, 2007
Posts: 77
posted
0
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!
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"
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.
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.