Groovy란 ...
자바 플랫폼에서
실행하는* 동적
애자일 언어{*}이며
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.2 — Groovy 스크립트에서 ActiveX 스크립트, COM 윈도우 컴포넌트 사용하는 모듈
-
Gant —
XML 대신 Groovy를 사용한
Ant 작업 모듈
- Gant_Script
- Gant_Tasks
- Google Data Support — Google Data API 사용을 위한 모듈
- Gram — doclet 태그와 Java 5 annotation 처리를 위한 간단한 xdoclet 형식의 도구
- Groovy Jabber-RPC — Jabber 프로토콜을 사용한 XML-RPC 호출 모듈
- Groovy Monkey — 이클립스 플랫폼을 위한 동적 스크립팅 도구
- Groovy SOAP — SOAP 서버 생성 및 외부 SOAP 호출 모듈
- GroovySWT — SWT(이클립스 Standard Widget Toolkit) Wrapper
- GSP — GroovyServer Pages, JSP (JavaServer Pages)와 유사
- GSQL — 데이타베이스 연결 지원 모듈
- Native Launcher — groovy 스크립트 처리에 사용되는 실행 프로그램
- Groosh — 외부 프로세스 처리를 위한 쉘 기능 지원 모듈
- XMLRPC — XML-RPC 서버 생성 및 외부 XML-RPC 호출 모듈
- Grails — Ruby on Rails에 착안한 Groovy 기반 웹 프레임웍
- GORM — Grails Object-Relational Mapping persistence 프레임웍
- GroovyPlugin — JSPWiki를 위한 Groovy 플러그인
당신의 코드를 좀 더 멋지게 만드세요 !!!!
최근 뉴스
활발한 커뮤니티의 최근 모습을 보고 싶다면, 다음에서 좀 더 많은 정보를 얻으세요:
그리고 최근 공지 사항은 아래를 참고하세요:
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.








