Skip to: Site menu | Main content

Groovy 

      Download | Documentation | Developers | Community

An agile dynamic language for the Java Platform

Japanese Home Add comment to Wiki View in Wiki Edit Wiki page Printable Version

Groovyとは ...

Python,Ruby,Smalltalk等の多くの機能がインスパイヤされ、Java開発者がJavaのような構文で使用可能にしたJavaプラットホーム用の アジャイルダイナミック言語 です。

web applications 開発、簡単な shell scripts の記述、 GroovyのJUnit統合での簡素で有意義な テストケース の記述、 本物の実務に使えるアプリケーション のプロトタイピングと構築は、今まで一度もこんなに簡潔でグルービーではありません。

Groovy はJavaオブジェクトとライブラリでキレイに動作し アプリケーション開発 また スクリプティング モードのどちらでもストレートに Java バイトコード にコンパイルされます。

日本語翻訳について

簡単な"ハローワールド"スクリプト:

def name='World'; println 
"Hello $name!"
    

オブジェクト指向な、より洗練されたバージョン:

class Greet {
  def name
  Greet(who) { name = who[0].toUpperCase() + who[1..-1] }
  def salute() { println 
"Hello $name!" }
}

g = 
new Greet('world') 
//
オブジェクトを作成
g.salute() 
// 
"Hello World!"
をアウトプット
    

既存のJavaライブラリを使用:

import
org.apache.commons.lang.WordUtils

class Greeter 
extends Greet {
  Greeter(who) { name = WordUtils.capitalize(who) }
}

new Greeter('world').salute()
    

コマンドラインで:

groovy -e 
"println 'Hello ' + args[0]" World
    

ドキュメント [全表示](日) [more](英)

アドバンスドトピック [全表示](日) [more](英)

Unable to render {children} Page not found: Advanced Topics

クックブックサンプル [全表示](日) [more](英)

モジュール [全表示](日) [more](英)

The following modules and contributions are currently available:

  • COM Scriptingscript Windows ActiveX and COM components with Groovy
  • Gant
  • GFreeMarkeran integration of the FreeMarker template engine for Groovy
  • GMaven GMaven provides integration of Groovy into Maven.
  • Google Data Supportmakes using the Google Data APIs easier from within Groovy
  • Grama simple xdoclet-like tool for processing doclet tags or Java 5 annotations
  • GraphicsBuilderGraphicsBuilder is a Groovy builder for Java 2D
  • Grapplet
  • GriffonDekstop Enhancements for Groovy
  • GrooshProvides a shell-like capability for handling external processes.
  • Groovy Jabber-RPCallows you to make XML-RPC calls using the Jabber protocol
  • GroovyJMS
  • GroovyLabProvides a domain specific language (DSL) for math engineering (matlab-like syntax).
  • Groovy Monkeyis a dynamic scripting tool for the Eclipse Platform
  • GroovyRestletGroovy DSL for constructing Restlet application
  • Groovy Science
  • Groovy SOAPcreate a SOAP server and make calls to remote SOAP servers using Groovy
  • GroovySWTa wrapper around SWT, the eclipse Standard Widget Toolkit
  • Groovy TransformsProvides additional AST Transformations
  • GroovyWSGroovySOAP replacement that uses CXF and Java5 features
  • GSPmeans GroovyServer Pages, which is similar to JSP (JavaServer Pages)
  • GSQLsupports easier access to databases using Groovy
  • HTTP Builderprovides a convenient builder API for complex HTTP requests
  • JideBuilderJideBuilder is a Groovy builder for the open source JIDE Common Layer
  • MetaBuilderMetaBuilder is a builder that builds builders.
  • Native Launchera native program for launching groovy scripts
  • Proxy-o-MaticProxy-o-Matic lets you create dynamic proxies fast and in an homogeneous way
  • Windows NSIS-Installera Windows-specific installer for Groovy
  • Windows Servicesframework for Groovy-based WinNT (Windows) Services
  • WingSBuilderWingsBuilder is a Groovy builder for the wingS Framework
  • XMLRPCallows you to create a local XML-RPC server and/or to make calls on remote XML-RPC servers
  • Grails — a Groovy-based web framework inspired by Ruby on Rails
  • GORM — the Grails Object-Relational Mapping persistence framework
  • Griffon — a Groovy-based desktop framework inspired by Grails
  • GroovyPlugin — A Groovy plugin for JSPWiki
  • OCM Groovy — A Object Content Mapping implemented in Groovy leveraging the Java Content Repository (JCR)
  • Tellurium — A test framework built on top of the Selenium test framework implemented in Groovy
  • Gradle — The next generation build system

Enjoy making your code groovier !!!!

最新情報

If you wish to stay up-to-date with our vibrant community, you can learn more about:

And below, you will find the latest announcements:

Last changed Jul 02, 2009 00:56 by Vaclav Pech

GParallelizer, the opensource concurrency and actor library for Groovy, has reached its 0.8 release. Besides further maturing the actor support and the collection concurrency, you can now find an inspiring Dataflow Concurrency DSL bundled with GParallelizer. Check out the details on Dataflow Concurrency on the project wiki.

To list a few of the new features, here's the top 5 items from the release notes:

  • Added DataFlow concurrency support
  • Enabled asynchronous collection processing through meta-class enhancements
  • Added sendAndWait() methods to actors to block the caller until a reply arrives
  • Ability to join actors to await their termination
  • Added special-purpose actors, the DynamicDispatchActor and the ReactiveActor, to allow for an alternative message handling syntaxes

Check out GParallelizer today and don't forget to experiment with all the samples.

To get a feel for what actors can do for you, have a look at the sample actor solutions to several common concurrency issues, like The Dining Philosophers or The Sleeping Barber.

Thank everyone for the feedback I've received. Since it is the comments and suggestions I hear from the community that drives my development further, please, keep on commenting.

Posted at Jul 02, 2009 by Vaclav Pech | 0 comments
Last changed Jun 24, 2009 05:31 by glaforge

The SpringSource Groovy & Grails team is providing a great opportunity for developers to learn all they need to know about Groovy & Grails from the G&G leads themselves: Guillaume Laforge, Graeme Rocher & Jeff Brown. To make the training available to as many developers as possible, SpringSource also lowered the prices for these famous trainer courses.

During the Groovy & Grails training course attendees will:

  • Receive an introduction to Groovy by learning how to install it, use its compiler, shell and console, and how to integrate it in your applications
  • Learn the language fundamentals, such as its Java-based syntax, its powerful strings, how to define operator loading or how to leverage its easy
  • XML parsing capabilities, and more
  • Learn all you need to know about Meta Object Protocol (MOP), Metaprogramming Hooks and ExpandoMetaClass
  • An introduction to Grails, the Grails Stack, getting started with scaffolding and getting to know the Grails command-line environment
  • Learn how to maximize use of MVC in Grails by using services, controllers, views, tag libraries, GSP templates and Ajax
  • Learn how to use and optimize Grails plug-ins including lessons on extension points, architecture, how to package and install, artifacts and command line scripts
  • And much more

The full schedule for these courses can be found below:

  • United States
  • Europe
    • July 21 - 24: Paris, FR (Guillaume Laforge)
    • July 28 - 30: London, UK (Graeme Rocher) - register before June 28 and save £160
    • September 16 - 18: Oslo, NO - register before August 16 and save kr 1500

If this course is not provided in your state or country ask for the special hotel - travel deal or if you have five or more developers interested in this course take a look at onsite training to save money.

Posted at Jun 24, 2009 by glaforge | 0 comments