This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am beginning development of large J2EE application which will use Spring, Hibernate and Web Services and will be deployed on WebSphere platform.
Some time ago, i have discovered the Groovy language and i would like to use it in my project,
but i am not certain about what impact it can have on the development process and application performance, and where i can use it instead of java.
So i have a question: has anybody used Groovy in real-life projects, and does it have advantage over java language?
Or, if i just mix java and groovy in my application, in what tasks groovy can be useful?
I am currently running maintenance on an enterprise level Web Component project that we developed in groovy. (mostly)
The decision to use groovy was made by the Senior Software Engineer on the project (some 20+ years experience) I had previously never heard of it and neither had the other developers on the team. There were some growing pains early on but after we got the hang of it we really liked using it, and it has some pretty slick methods for dealing with XML which our system deals with.
The problem with groovy in this scenario however is that its not very well known. For example, after delivery most of the developers who created they system got new jobs (all but me) and the new team who is left with maintaining the system has never heard of or used groovy. It has honestly become a bit of a nightmare. It seems that every time we have any problems with the system its always buried somewhere within the groovy code which makes it hard to track down because we don't have anyone very well versed in groovy, we cant seem to find anyone who is, and the documentation is extremely high level so if you doing thing that is a little outside the box your in for some "fun". We have run into many instances where fixing a problem that would have taking .5 days to fix in java have taking a full week to track down in groovy.
But with all that said, this project has had everything working against it since day one, and it was an upgrade to an already existing struts2 framework that we had to integrate with, if we had a feasible/realistic schedule without mountains of feature and scope creep every step of the way it probably would have turned out much better. I do wish we could re-do it under better circumstances.
We have used Groovy and Grails on some of out projects. With Grails - I found we can use it when the tables are simple and you start from scratch. But it falls off on legacy tables. I had to customize most of the controllers and plugins to make them to work with Grails.
I use Groovy all the time and much prefer it to Java, but in reality I usually use both together in the same project. Also, I have say that while Grails, like Hibernate, prefers to generate database schemas for you, it also has a clear, easy to use custom ORM capability. Mapping to existing tables is never a lot of fun, but Grails makes it as easy as it's possible to be.