輕量級 Groovy 框架 Gaelyk 1.0 發布
Gaelyk是一個專門針對 Google App Engine 設計的輕量級 Groovy 框架。 此版本最大的亮點就是“URL routing system”。
在 Gaelyk 1.0 中,你可以這樣來編寫數據庫查詢:
def latestArticles = datastore.execute { select all from articles sort desc by dateCreated where author == params.author limit 10 }
該版本主要改進記錄包括:
- GAE SDK updated to 1.5.2 and Groovy to 1.8.1
- Introduction of a Query DSL for creating SQL-like queries against the datastore
- Updated template project with a Gradle build, the usage of Gradle GAE / Gaelyk plugins, and the support of Spock for testing Groovlets
- Introduction of the plugins page in the Gaelyk website, for referencing known plugins
- By annotating classes with GaelykBindings, the same services and variables are injected in your classes as properties, as the ones which are injected in Groovlets and templates
- The validation closures of the routes in your URL mapping have access to the request, so you can validate a URL depending on what's in your request (attribute, session, etc.)
- Added a DSLD file (DSL descriptor) for Eclipse for easing code-completion and navigation
- Added a get() method on Key, as well as on lists of keys
- Ability to convert lists to Keys
- Added two encoded string and key conversion utilities
- Additional datastore.get() methods to retrieve entities by their keys more concisely
- Problems with the recent XMPP support fixed
- Fixed inability to access the various services and variables from within binding/before/after blocks in plugin descriptors
完整內容請看:http://glaforge.appspot.com/article/gaelyk-1-0-is-out
本文由用戶 openkk 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!