1,網上資源
http://groups.google.com.hk/group/grailsunion
http://grails.group.javaeye.com/
2,grails知名應用
?grailsflow
?grailsblog
http://www.grails.org/OpenSource+Projects
?? http://code.google.com/p/grailsblog http://www.grailsblog.com
?http://code.google.com/p/grails-domain-uml/
http://code.google.com/p/grails-petstore
http://code.google.com/p/ket-framework/
http://code.google.com/p/grailsmda
http://code.google.com/p/6footplus/
http://code.google.com/p/grum/
http://code.google.com/p/groovyblogs
http://code.google.com/p/simpejob
http://code.google.com/p/biz-portal
http://code.google.com/p/grailsportal
http://svn.codehaus.org/grails/trunk/grails-samples/grails.org/
http://www.grailsdeveloper.com/blog/2008/09/a-lot-of-grails-sample-applications-grails-open-source-projects/
3,工具
? grails文檔里說沒有自帶功能測試,但支持
Canoo WebTest4,網站
? http://www.grailsjobs.com/
4,好文章
? ibm網站有一系列Mastering Grails文章,非常棒。主題有 Testing your Grails application, Grails in the enterprise,Asynchronous Grails with JSON and Ajax等十來個。
? http://www.ibm.com/developerworks/views/java/libraryview.jsp?search_by=mastering+grails
? http://www.ibm.com/developerworks/java/library/j-grails10148/index.html
?
?
SiteMesh學習入門GRAILS對于我這樣的所謂老Java程序員來說,上手還是挺容易的,所謂最難掌握的閉包概念,我認為可以簡單的認為是以前的匿名類+委托(當然
還有很多其他的好處)。GRAILS給控制器劃分了一個Service層,在業務邏輯重用上,比RAILS做的更好。GRAILS相對沒有太多的單復數規
約,相對RAILS的“約定”要簡單很多。GRAILS目前沒有RAILS那么強大的路由功能,不過反而可以帶來的相對簡單。
言歸正傳,其實我這里不是準備比較兩個框架的優劣,而是想分享一下GRAILS多對多查詢的一些經驗。關于GRAILS本身還有GROOVY,我建議大家可以看看這里。
GRAILS使用Hibernate作為ORM的基礎。方便的同時也帶來一些復雜,比如多對多查詢。假設我有兩個領域模型(其實就是rails里面的model,不過Java的東西嘛,總是比較學術化)
class Product {
static hasMany=[scenario:Scenario]
static belongsTo=Scenario
}
class Scenario{
static hasMany=[product:Product
]
}
如果我要查詢Product中,所屬scenario在scenario表中的id為1,可以通過如下的方法查詢:
def scenario=Scenario.get(1)
return scenario? Product.findAll("from Product p where :scenario in elements(p.scenario)",[scenario:scenario]):[]
來源:http://www.leesoft.com.cn/2009/04/12/grails%E5%A4%9A%E5%AF%B9%E5%A4%9A%E7%9A%84%E6%9F%A5%E8%AF%A2%E6%9E%84%E9%80%A0/
http://rainboyan.com/post/use_groovy_tables_to_doc.html
可以通過Scriptom(現在還是beta版)嵌入vbs、js腳本(包括使用WSH,FSO)或者調用InternetExplorer、Media Player、Word和Excel等windows組件Groller項目啟動http://rainboyan.com/post/groller_was_launched.html
http://code.google.com/p/rainboyan/source/browse/groller
http://www.tkk7.com/emu/archive/2005/05/18/4784.html里面有講到8皇后