First they ignore you
          then they ridicule you
          then they fight you
          then you win
              -- Mahatma Gandhi
          Chinese => English     英文 => 中文             
          隨筆-221  評論-1047  文章-0  trackbacks-0

          Who Is Using Groovy


          Stelligent: How are people using Groovy- what projects are you aware of that rely on Groovy?

          Guillaume: In fact, we don't hear that much about how people use Groovy in their projects. People are usually more talkative when they have problems, rather than when they're happy with something!

          Most of the time, they embed Groovy in their J2EE application as a scripting language: they like using our Groovlet servlets and our template engines. Some others use Groovy as a shell language replacement, or as a testing platform because tests are easy to write in Groovy. A few persons use Groovy as a prototyping tool to create demos for their customers. There are many use cases, really.

          Every six months or so, I try to make a small survey on the Groovy mailing lists, to know what people think about Groovy, and what they do with it. There are some funny cases, like a guy who used Groovy to control his homemade robots, and he reported that using Groovy really saved him hundreds of lines of code and he could concentrate more on the AI logic of his robots than on the boring and tedious coding tasks!

          To name a few projects that already embed Groovy successfully, you may have a look at:
          • Drools: a rule engine that allows you to write your conditions and consequences in Groovy.
          • The RIFE MVC/Web framework also permits you to write actions in Groovy or to configure the webapp layout and flow.
          • The eXo Platform (Portlet/Service container) uses Groovy in its core, and you can even write some Portlets in Groovy.
          • XWiki, a wiki engine and application platform, embeds Groovy for advanced wiki programming, like writing plug-ins or macros, or for pages containing some logic, etc.
          Many other projects utilize Groovy as a dynamic extension mechanism. These examples are the best examples I know. I've listened to a few guys discretely whispering to me that they have deployed Groovy in their apps for months already, even with old betas of Groovy which weren't really considered mature enough!
          Stelligent: Yep, I've heard the same thing! As we all know, Groovy isn't the only scripting language available for Java. If someone in the Java community was looking at adopting a scripting language for use and they were comparing Groovy and Jython- what would you say?

          Guillaume: It's hard for me to compare Groovy with other languages. I haven't played much with the alternatives, and I guess I'm pretty biased :-)

          Before Groovy arrived on the Java-place, the other scripting languages were a bit stalled, without any real innovation going on, or sustained activity. Fortunately, Groovy renewed the interest in the field, and thankfully, development was reborn on Jython, BeanShell or JRuby. That's a very good thing!

          Now, regarding the choice, except if you need particular Groovy features not available anywhere else (like our builders, or handy libraries for SQL, etc.), I think the decision is around the knowledge of the developers: If the developer is very familiar with Ruby or Python, it's certainly a good idea to choose the Java-esque counterpart. If you prefer staying as close as possible to Java, choose BeanShell, or if you're a JavaScript guru, don't go further than Rhino.

          Some compelling features may direct you to Groovy, and its Java-ish syntax may be appealing to you. Choosing a scripting language is really about analyzing the set of language and API features you need, and the knowledge your users have regarding other languages.

          Stelligent: As a final thought- what other projects do you find interesting?

          Guillaume: There are plenty of them!

          But since it's a Groovy related interview, let me mention some projects embedding or using Groovy that I'm quite a fan of:
          • Ludovic Dubost's XWiki project, a second generation wiki engine and collaborative application platform, embeds Groovy as a way to extend XWiki by writing templates or plug-ins, or to manipulate the domain classes and objects you define in your pages. That's a really powerful platform for writing custom applications on top of a wiki engine. I like the fact it's a wiki (with all the standard features you can expect from a wiki), but it is more advanced than say Confluence, in the way it allows you to write custom forms or logic on top of your documents. And Groovy is a key element for that innovative aspect of the project.
          • I'm expecting a lot from a newly born Groovy sub-project called Grails which is a promising webapp framework for CRUD oriented apps, following an MVC approach, with a transparent persistence mechanism, and which applies the coding by convention paradigm to lower or remove the need for long and boring XML configuration or mapping files and other boilerplate code. It's really just in its infancy (started in early July), but I think it has a very high potential to become a driver for the whole Groovy community and for providing an easy introduction to webapps development for new Java developers. Stay tuned!
          • There are other interesting projects using Groovy, such as Geert Bevin's RIFE framework which contains a CRUD-part which allows you to define your domain classes in Groovy, and ta-da, you've got a CRUD webapp deployed in no time. There's also the eXo Platform from Benjamin Mestrallet which uses Groovy in its core for various things.
          原文地址:http://www.stelligent.com/content/articles/article.php?topicId=81&pageName=Who+Is+Using+Groovy
          附:Groovy輕松入門——Grails實戰之GORM篇
          posted on 2007-04-16 20:23 山風小子 閱讀(1418) 評論(1)  編輯  收藏 所屬分類: Groovy & Grails
          主站蜘蛛池模板: 宁晋县| 左权县| 临朐县| 贞丰县| 濮阳市| 德化县| 黔西| 晋江市| 南城县| 陇南市| 井冈山市| 梁河县| 宁夏| 宜君县| 樟树市| 桐梓县| 阿坝县| 邛崃市| 盐边县| 宜君县| 浦北县| 五河县| 襄汾县| 新巴尔虎右旗| 娄烦县| 麦盖提县| 南通市| 保山市| 宝丰县| 镇江市| 东光县| 息烽县| 阿拉善右旗| 万州区| 庄河市| 利津县| 宜良县| 探索| 浦东新区| 德昌县| 革吉县|