'Grails 설치'에 해당되는 글 3

  1. 2012.12.19 Grails - Installation
  2. 2010.06.12 [Getting Started with Grails] 1. Introduction, 2. Installing Grails
  3. 2009.03.06 [IBM dWs] Grails 마스터하기: 첫 번째 Grails 애플리케이션 구축하기

Grails - Installation

  1. Download, extract the archive
  2. Set GRAILS_HOME, JAVA_HOME environment variables
  3. Add $GRAILS_HOME/bin/ to PATH
  4. Type grails -version to check installation

[Getting Started with Grails] 1. Introduction, 2. Installing Grails

1. Introduction
Grails는 Spring, Hibernate등을 이용한 오픈소스 웹 어플리케이션 프레임워크다.

달리기 클럽을 위한 RaceTrack이라는 웹 어플리케이션을 만들고 이 어플리케이션을 확장시켜 본다.

2. Installing Grails
JDK 1.5 필요
여기서는 Grails 1.2 사용

- 설치방법
압축을 풀고 , GRAILS_HOME 환경변수를 잡고, GRAILS_HOME/bin을 PATH에 추가한다.

Grails는 HSQLDB를 내장하고 있다.
이 책에서는 나중에 MySQL을 사용한다.

[IBM dWs] Grails 마스터하기: 첫 번째 Grails 애플리케이션 구축하기

- Installation

- Sample
> grails create-app trip-planner
> cd trip-planner
> grails create-domain-class Trip
Add member variable to grails-app/domain/Trip.groovy
> grails generate-all Trip
> grails run-app

Browse to http://localhost:8080/trip-planner
- 포트 변경




- 동적 스캐폴딩
trip-planner/grails-app/controllers/TripController.groovy
class TripController{
    def scaffold = Trip
}
전체 코드 15줄(grails stats 로 확인가능)로 CRUD 기능을 처리하는 웹어플리케이션을 작성할 수 있다.

- 참고자료
IBM developerWorks : Grails 마스터하기
NetBeans : Introduction to the Grails Web Framework

[Grails1.0 사용자 가이드] 전체 목록
Grails Korean Home