开发者

Should I be so enthusiastic about Groovy?

I'm currently working on my project which consists of front and back-end written in 开发者_开发技巧PHP and desktop app written in Java, and that's what the plan was before I discovered Groovy and later on Grails.

Now after rewriting my desktop client and sketching some back-end functionality in Groovy I'm considering to drop PHP altogether in favor of Groovy (although I haven't played around with Grails yet.)

For me it just looks like coding in Groovy is as simple as in PHP, but with lots of extra sugar and awesomeness of Java libraries. Comparing those two may sound awkward, but hey I'm an amateur ;)

Finally to my question, from the looks of it most of the articles/blog posts about Groovy I can find is awfully outdated. Am I missing some reason why it's not so popular and which will crush my enthusiasm to bits? :D


Am I missing some reason why it's not so popular and which will crush my enthusiasm to bits?

My answer is an emphatic "No". Groovy really is a very productive language to work with. I spent about a year using it for my day job, and really enjoyed working with it. IMO, Groovy's obscurity has got nothing to do with the language itself, but other factors such as:

  • Lack of corporate backing (i.e. marketing $$$)
  • Relatively new, version 1.0 was released in 2007
  • The programming language market is becoming increasingly crowded as various "new" languages (Scala, F#, Clojure, Groovy) compete for mindshare. This makes it relatively difficult for any one of these languages to capture a significant share of this market.


After working with Groovy (and also Grails) for a while, my feelings are mixed. In theory, they're great. In practice they have big advantages, but there are some drawbacks: as soon as you look under the hood (e.g. when you're investigating a strange bug), all the behind-the-scenes magic can make it very hard and time consuming to understand what's actually happening.

Then again, if you're coming from PHP, the advantages are probably worth it.


Although I've never used it in a production project so far, I think the Groovy/Grails way is a totally legitimate option and I don't see any major shortcomings of the platform. If you want to have a look at who's already using Grails (and thus Groovy) for their sites, see Grails - Testimonials.

I also recommend reading the Practically Groovy and Mastering Grails series by Andrew Glover and Scott Davis, as well as the Groovy Goodness and Grails Goodness snippets by mrhaki which all provide plain, helpful and also up-to-date information about the most important language features.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜