Skip to: Site menu | Main content

Groovy 

      Download | Documentation | Developers | Community

An agile dynamic language for the Java Platform

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

Groovy란 ...

자바 플랫폼에서 실행되는 기민한 동적 언어(agile dynamic language) 이며, Python, Ruby, Smalltalk 언어에서 영향을 받은 많은 특징을 가지고 있습니다. 자바 개발자들은 자바와 비슷한 문법을 사용하여 이러한 특징들을 구현할 수 있습니다.

웹 어플리케이션 개발, 쉬운 쉘 스크립트 사용, Groovy의 JUnit 기능을 이용한 간결하고 의미있는 테스트 케이스 작성, 복잡한 실제 어플리케이션 의 프로토타이핑과 구현은 너무나 간결하고 매혹적입니다.

Groovy는 이미 작성된 모든 자바 객체, 라이브러리와 깔끔하게 동작하며, 어플리케이션 개발스크립팅 모드에서 모두 자바 바이트코드 로 직접 컴파일 됩니다.

간단한 hello world 스크립트:

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!" 출력

기존 자바 라이브러리의 사용:

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

참고문서 [전체보기]

모듈 [전체보기]

다음 모듈들을 사용할 수 있습니다:

  • Scriptom 1.2Groovy 스크립트에서 ActiveX 스크립트, COM 윈도우 컴포넌트 사용을 가능케하는 모듈
  • GantXML 대신 Groovy를 사용한 Ant 작업 모듈
    • Gant_Script
    • Gant_Tasks
  • Google Data SupportGoogle Data API 사용을 위한 모듈
  • Gramdoclet 태그와 Java 5 annotation 처리를 위한 간단한 xdoclet 형식의 도구
  • Groovy Jabber-RPCJabber 프로토콜을 사용한 XML-RPC 호출 모듈
  • Groovy Monkey이클립스 플랫폼을 위한 동적 스크립팅 도구
  • Groovy SOAPSOAP 서버 생성 및 외부 SOAP 호출 모듈
  • GroovySWTSWT(이클립스 Standard Widget Toolkit) Wrapper
  • GSPGroovyServer Pages, JSP (JavaServer Pages)와 유사
  • GSQL데이타베이스 연결 지원 모듈
  • Native Launchergroovy 스크립트 처리에 사용되는 실행 프로그램
  • Groosh외부 프로세스 처리를 위한 쉘 기능 지원 모듈
  • XMLRPCXML-RPC 서버 생성 및 외부 XML-RPC 호출 모듈
  • GrailsRuby on Rails에 착안한 Groovy 기반 웹 프레임웍
  • GORMGrails Object-Relational Mapping persistence 프레임웍
  • GroovyPluginJSPWiki를 위한 Groovy 플러그인

당신의 코드를 좀 더 멋지게 만드세요 !!!!

최근 뉴스

활발한 커뮤니티의 최근 모습을 보고 싶다면, 다음에서 좀 더 많은 정보를 얻으세요:

그리고 최근 공지 사항은 아래를 참고하세요:

Last changed Sep 21, 2008 11:16 by dierk

I'm very happy to announce that the japanese edition of Groovy in Action has just hit the shelves.

Please visit the publisher's page or amazon.jp.

Kazuchika Sekiya and his five friends did an awesome job in not only translating the book "as is" but also updating it to the latest Groovy version (1.5.6), adapting all listings and explanations. Furthermore, they went through all known errata of the original version.

Above all, they did not blindly translate word-by-word but challened the meaning of every sentence, asked for clarification, and came up with improved wordings that avoid any kind of ambiguity.

It should not be left unmentioned that the translators work for Sun Microsystems Japan in their day job but did all that hard work in their spare time.

I'm very thankful for the experience of having seen this translation develop and now seeing the grace of the final result. Let's spread the word about Groovy!

Thank you, guys - domo arigato gozaimasu!

Posted at Sep 21, 2008 by dierk | 0 comments
Last changed Sep 11, 2008 08:32 by Danno Ferrin

After over a year of poking and prodding at the various parts of desktop Java the Groovy swing developers are proud to announce the first release of Griffon, a Grails-like tool for Swing development. While not yet industrial strength we felt it was important to put out a release so people can get a feel for what Griffon is and where it will be going. And since all good computer scientists start counting from zero, 0.0 seemed to be the perfect release number.

What are some of the highlights of Griffon?

  • A Grails like build system for desktop apps, including targets to run the application.
  • A directory structure that rewards MVC separation of code.
  • Use of Groovy programming language features to reinforce MVC separation (builders, @Bindable annotation, metaclass method injection, scripts, etc).
  • A view layer based on Groovy's SwingBuilder, allowing for a declarative layout of GUI code.
  • An infrastructure to allow seamless injection of other widget libraries. JIDE and SwingX are supported out of the box.
  • Automatic packaging and signing for WebStart, Applet, and traditional application deployment.

Why call it Grails-like instead of rails-like? The structure of the directories and some of the design idioms do have a heritage back to Ruby on Rails, but Griffon is more inspired by Grails than it was by Rails. And by "inspired" I mean "taking large chunks of Grails code to bootstrap the codebase" (thanks to the ASL 2.0 this is permissible). Not all Grails features have been brought over yet. Plugins and GORM are two notable standouts that we would like to add in future releases.

To download the current release please visit the wiki page at Download Griffon and follow the links. There is also an installation guide and a quick start tutorial on the wiki as well.

The distribution also comes with three demo apps developed in Griffon: Greet, a Twitter client; GrailsSnoop, a swing wrapper around the Grails docs; and WidgetKitchenSink, a demo app of various widgets supported by Griffon. These applications live in the samples directory and can be run directly by "griffon run-app".

There is clearly much more that can be done, and this is just the beginning. Future releases hope to bring in client side GORM, pack200 support, plugin support, and more GUI libraries. Like most open source projects external contributions and participation are always welcome. For questions and comments there is a griffon-user@groovy.codehaus.org mailing list set up.

Posted at Sep 11, 2008 by Danno Ferrin | 0 comments