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](英)
The following modules and contributions are currently available:
- COM Scripting — script Windows ActiveX and COM components with Groovy
- Gant
- GFreeMarker — an integration of the FreeMarker template engine for Groovy
- GMaven — GMaven provides integration of Groovy into Maven.
- Google Data Support — makes using the Google Data APIs easier from within Groovy
- Gram — a simple xdoclet-like tool for processing doclet tags or Java 5 annotations
- GraphicsBuilder — GraphicsBuilder is a Groovy builder for Java 2D
- Grapplet
- Griffon — Dekstop Enhancements for Groovy
- Groosh — Provides a shell-like capability for handling external processes.
- Groovy Jabber-RPC — allows you to make XML-RPC calls using the Jabber protocol
- GroovyJMS
- GroovyLab — Provides a domain specific language (DSL) for math engineering (matlab-like syntax).
- Groovy Monkey — is a dynamic scripting tool for the Eclipse Platform
- GroovyRestlet — Groovy DSL for constructing Restlet application
- Groovy Science
- Groovy SOAP — create a SOAP server and make calls to remote SOAP servers using Groovy
- GroovySWT — a wrapper around SWT, the eclipse Standard Widget Toolkit
- Groovy Transforms — Provides additional AST Transformations
- GroovyWS — GroovySOAP replacement that uses CXF and Java5 features
- GSP — means GroovyServer Pages, which is similar to JSP (JavaServer Pages)
- GSQL — supports easier access to databases using Groovy
- HTTP Builder — provides a convenient builder API for complex HTTP requests
- JideBuilder — JideBuilder is a Groovy builder for the open source JIDE Common Layer
- MetaBuilder — MetaBuilder is a builder that builds builders.
- Native Launcher — a native program for launching groovy scripts
- Proxy-o-Matic — Proxy-o-Matic lets you create dynamic proxies fast and in an homogeneous way
- Windows NSIS-Installer — a Windows-specific installer for Groovy
- Windows Services — framework for Groovy-based WinNT (Windows) Services
- WingSBuilder — WingsBuilder is a Groovy builder for the wingS Framework
- XMLRPC — allows 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:
- the latest posts from our mailing-lists
- the latest commits to our SVN trunk
- the buzz around Groovy in the blogosphere
And below, you will find the latest announcements:
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.
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
- July 21 - 23: Herndon, VA (Jeff Brown)
- September 22 - 24: San Francisco, CA (Jeff Brown) - register before August 22 and save $300
-
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.








