waterye

Grails Hello World

1. Installation
http://docs.codehaus.org/display/GRAILS/Installation
Note: ant之后生成个grails-0.1a-alpha-SNAPSHOT.jar, 离1.0太遥远了

2. Quick Start
http://docs.codehaus.org/display/GRAILS/Quick+Start
Note: list.jsp使用GvTags

3. User Guide
http://docs.codehaus.org/display/GRAILS/User+guide

GORM: 对hb3的封装, 功能简单些, Domain Class = pojo + hbm + validation,  one-to-one 和 many-to-one不用定义

 1class User {
 2   @Property Long id
 3   @Property Long version
 4
 5   @Property String login
 6   @Property String password
 7   @Property String email
 8   @Property Date age
 9
10   @Property constraints = {
11          login(length:5..15,blank:false,unique:true)
12          password(length:5..15,blank:false)
13          email(email:true,blank:false)
14          age(range:18..65,nullable:false)
15   }

16}

http://docs.codehaus.org/display/GRAILS/GORM
http://docs.codehaus.org/display/GRAILS/Validation

Builders:
http://docs.codehaus.org/display/GRAILS/Builders

posted on 2005-11-30 16:06 waterye 阅读(522) 评论(0)  编辑  收藏 所属分类: groovy


只有注册用户登录后才能发表评论。


网站导航: