Is Grails too much Groovy ?

- Image via Wikipedia
I think so…
You think in java but write in groovy that is quite freaky/weird.
Although there is too much effort on Grails I can say: only a small portion of the whole grails thing is written in groovy. You notice this extremely when using any plug-in in grails. Every grails developer should accepts this:
They choose Grails for world class java frameworks.
so if you try to write something with some external java APIs you should read their sample java code and translate it to groovy!!! That sucks. Although the result line of code is less then the original, this code is more tough to write. And this is an inevitable case with any java framework.
Yes groovy has best java support of all but this translation can make any developer sick, just like me.
Another point is developers like me who really use CTRL+Space are all disabled
I am using intellij with jet groovy, but even this does not help much.
But still insisting on this grails may be I’ll get used to it :S
Related posts:
![Reblog this post [with Zemanta]](http://img.zemanta.com/reblog_e.png?x-id=56c6b17f-070d-4fc7-9e6b-0b9228a0a0a8)



Only a small proportion? 35% of Grails is Groovy, granted 48% is Java, but I wouldn’t call that small (see http://www.ohloh.net/p/grails/analyses/latest)
One thing you are correct on is that yes many developers choose Grails because of the great Java frameworks that are available. However, you are the first person I have ever heard of having problems calling Java APIs from Groovy.
Most Java code is valid Groovy code anyway. As for IntelliJ I use it every day and CTRL+Space code completion works for me. Most of the time the type can be inferred. But anyway it sounds like you’re a developer mainly used to statically typed languages and having a bit of trouble making the transition.
This is quite common, many developers love the libration dynamic typing grants you, others (like you) find it harder and it takes time to get used to. Anyway good luck.
hi Graeme
for the code ratio I am also counting whole backing frameworks (spring,hibernate,cglib,vs…)
and for code completion , mine version may be a bit older
idea 7.0
It seems to take me a long time to write a good line of Groovy code but once it is finished I am continually amazed at how few lines I must write to accomplish what I want with Grails. So I think my productivity is at least equal to what I could do with JEE and I believe as my Groovy knowledge increases the gains will be apparent.
Keep in mind that most Java developers know Java much better than Groovy. That’s why Groovy often looks weird and they miss the IDE features (although Netbeans is great with Groovy since 6.5).
I noticed the same with C++ programmers starting with Java or Java programmers using Ruby.
For example, Ruby is no more difficult than Java. It’s just different. The transition is not always easy. But after you master both languages, Ruby is no more difficult or “weird” than Java. And you appreciate the shortness of Ruby code. The same is true for Groovy and Java, except that the transition from Java to Groovy should be a little faster than to Ruby, as Groovy is more like Java.
The more you play with a new language, the more natural it feels. And sometimes, you start wondering why it was so hard in the older language.
If you program a lot in Groovy (or Ruby), the productivity can improve a lot (if it’s the right langauge for the job).
hi markus ,
In fact I started developing grails with netbeans 6.5 although “command support” and “grails command line” are really good, code completion of groovy is not that good.
And I like to use my ide and CTRL+Space
As a long time java developer, I find groovy to be the one of the best things to happen to it since its initial release. What’s so great about groovy is that your code can look as groovy or java like as you wish. As already noted, at its grooviest a little code can get a lot done. Grails on the other hand is impressive, very impressive even, but just not my cup of tea. In my opinion, Grails is too much java. It’s advertised as light weight, but there’s a mountain of fairly complex java code that makes grails hum. Sometimes you find yourself in this code because you can’t find an answer to a howto or exception and you see just how unlightweight grails truly is.
I actually want to see more groovy in my java.
“You think in java but write in groovy that is quite freaky/weird.”
I never think in Java when I write Grails apps. In fact, I haven’t written an interface or abstract inner class or used generics since I started using Grails.
Grails is extremely Groovy.
For me, Groovy is a smooth, natural progression from Java. The more I use it the more I appreciate its ease of use. And dude, Grails is friggin’ awesome!
Which again brings up the point: if you want to use Java, stick with Java. Why go to something “slightest different”? Want to really increase your knowledge and awareness of a very different language type? Then really learn Ruby, or Clojure for that matter. Going just one simple step up has no real gains and is usually just a waste of time.
“Slightly different” is good enough for many – certainly me. It means I can be more productive while still using the Java libraries that I’m used to and I didn’t have to learn a whole new way of doing things. It’s great especially if you don’t have time to burn. There’s nothing wrong with “totally different” as well. You can do both you know – its not a penis waving competition. No real gains? Yeah, whatever.