Dynamic languages are awesome. They are fantastic, great, wonderful, etc etc etc. I don't think any Java lover like me can take this. Scala, Groovy, Closure, etc. etc......
But would you really use them to create any enterprise application with them by ignoring Java. Java which is already mature and strong language to develop big big applications. I don't think you will try to do so. Java is widely used language in almost all the platforms and devices. Why should one move from Java to any of these dynamic languages?
So lets see how dynamic languages are better, as they claim to be. Here I will talk about Groovy. Groovy is meant for doing the simple things in simple way. Groovy does not compel you to catch exceptions, its take cares of the types, it provides the wonderful feature of closures and a lot. You need to have look at the blog written by Scott Davis to see how the complicated XML parsing is simple in Groovy.
Now if you get these kind of features from a language like Groovy, would you still prefer coding in Java ? But as I told earlier Groovy is just a baby in front of a mature language like Java. So what should be done ??!!
What if I tell its not Java which is so mature it sounded till now in this blog ?? Yes I am right. Its not the Java which makes the application run in any platform or in any device. Its the JVM. What if I tell that the Groovy is also based on the same JVM which is being used by Java. So it means Groovy is also almost equally mature and you have seen how easy it is to code on the same. Hence Groovy is better than Java.
As Java after compilation gives class, Groovy does the same. As Java gives you JAR, do you know Groovy also gives the JAR ? So if Groovy gives the JAR cant we use that JAR in Java application ?? Cant we write a complicated code in simpler way in Groovy and then use it in Java code; after all its a JAR in the end ???
Yes we can ...... we can very well do it. We can very well write our code in Java and use it in Groovy or write the code in Groovy and use it in Java. The languages over the JVM platform including Groovy, Scala, Jython, etc. can seamlessly be integrated with each other as in the end they all run on JVM.
Its never Java vs. Groovy ; its about Java With Groovy.