作者:Eastsun 来源:JavaEye   酷勤网收集 2008-06-08

摘要
  现在想想Grails1.0.2发布也有些许时间了,其间Groovy倒是在性能优化方面做了很多改进。从Grails1.0发布以来,下载次数达186000,平均下来50000次/月,插件的数量也大大增加,目前为止有70个之多,范围涉及到安全,RIA,WebService等等。
Grails 1.0.3于近日发布,该版本除了一些功能增强和修正bug外,还包含一些新的特性(对Grails不熟,就不翻译了:-)):

Interactive Mode
  An experiment feature in this release, interactive mode lets you load up Grails command line interface and keep it running simply by typing:
  grails interactive
  The advantage here is you don't suffer the additional JVM start-up cost and the JVM can start to inline code resulting in the ability to run the commands faster. This is particularily advantageous for testing with the unit tests running much quicker than before

Enum support in GORM
  GORM now supports JDK 1.5 enums which allows for type safe, enumerated types. For example:
  
Java代码 复制代码
  1. enum VehicleStatus { OFF, IDLING, ACCELERATING, DECELARATING }  class Vehicle {   
  2.      Long id   
  3.      Long version   
  4.      VehicleStatus status   
  5.   }  


I18n URL mappings
  You can now use URL mappings to map URLs onto particular languages extending Grails i18n support. For example:
Java代码 复制代码
  1. "/german/$controller/$action" {   
  2.      lang = "de"  
  3. }  



agile_boy 写道:


现在想想Grails1.0.2发布也有些许时间了,其间Groovy倒是在性能优化方面做了很多改进,现在Grails1.0.3终于发布了,虽然没有在性能方面做特殊调整,但在bug修复和特性开发还是有改进的。

下边就摘录一下Grails1.0.3的ReleaseNotes。
从Grails1.0发布以来,下载次数达186000,平均下来50000次/月,插件的数量也大大增加,目前为止有70个之多,范围涉及到安全,RIA,WebService等等。最新1.0.3的文档也做出了更新(看来中文文档也要抓紧时间同步到1.0.3了 :))

下面看看新特性:

Interactive Mode

要执行Interactive Mode只需要键入:
Java代码 复制代码
  1. grails interactive  

此特性的主要目的是加快启动,尤其在测试的时候,你会明显感觉比原来快!

Enum support in GORM

GORM终于支持JDK5的Enum了,示例如下:
Java代码 复制代码
  1. enum VehicleStatus { OFF, IDLING, ACCELERATING, DECELARATING }   
  2.   
  3. class Vehicle { Long id Long version VehicleStatus status }  


I18n URL mappings

看来Grails在I18n方面做的越来越人性化了,现在只需要在URL mapping中就可以轻松指定了,示例如下:
Java代码 复制代码
  1. "/german/$controller/$action" {   
  2.      lang = "de"  
  3. }  

Upgrade notes

升级的命令还是老样子,只需键入:
Java代码 复制代码
  1. grails upgrade  

但是后台还是改变了不少:
  • 开发环境的缓存现在已经改成了OSCache,但是生产环境的依旧是Ehcache
  • WebTest插件将升级成0.5版本

来自:Grails 1.0.3发布

分类: .NET技术 网页设计 交互设计



关于酷勤 | 联系方式 | 免责声明 | 友情链接