2013年1月2日 星期三

Grails 2.2









Grails 又升級了!
最近的升版都很快,才剛適應 2.1 , 2.2 又來了。

根據官網的說法,升級重點如下
http://grails.org/doc/2.2.x/guide/introduction.html#whatsNew22

1.Namespace support


Bean names for Service artifacts provided by a plugin are now prefixed with the plugin name

grails 有一個很討厭的東西,就是 groovy 的 class name 不能重複,即使 package name 不一樣也不行。不然 runtime 時常常會給你驚喜!!
因此 Grails 決定如果名稱衝突的話,將會加上 plugin name 成為預設的 Serivce or Bean name,  讓 DI 找到對的 class。

Domain Class 的 Bean name 有了 plugin name , 將會影響建 DB 的 table name。當然也是可以設定的。

2.Forked Tomcat Execution


Grails 2.2 supports forked JVM execution of the Tomcat container in development mode.

嗯,我想最大的好處就是減少 memory 使用量,跟減少 Jar 檔衝突的可能。

3.SQL Projections In Criteria Queries

 

4.Groovy 2

最大的進展就是從 Groovy 1.8 跳到 Groovy 2 。除了對JDK 7  的 Support 外(Project coin),一些 enhancement 都有針對 Groovy 太動態,而產生無法管教的問題做一些修正。
像是static type checking @TypeChecked ,  或是 Static compilation @CompileStatic

 

 

沒有留言: