Friday, August 31, 2007

Grails 0.6 Released with Rich Conversation Support (AKA Spring Web Flow)

We've just released Grails 0.6 which takes Grails even further away from its Rails-like beginnings. Thanks to integration with the Spring Web Flow project and support for Spring scopes Grails now supports rich conversations a la Seam.

The essence of it is that we have created a Groovy builder for construction Web Flows. This is both a good thing for Grails and for the Web Flow project as the current mechanism for flow definition in Web Flow is via XML which has limited expressiveness and too many angles for my liking.

An example of a Grails Flow can be seen below:

showCart {
on("checkout").to "enterPersonalDetails"
on("continueShopping").to "showCatalogue"
enterPersonalDetails {
on("submit") {
def p = new Person(params)
flow.person = p
def e = yes()
if(p.hasErrors() || !p.validate())return error()
}.to "enterShipping"
on("return").to "showCart"
on(Exception).to "handleError"
enterShipping {
on("back").to "enterPersonalDetails"
on("submit") {
def a = new Address(params)
flow.address = a
if(a.hasErrors() || !a.validate()) return error()
}.to "enterPayment"

Web Flow will completely manage the state transitions and Grails integrates Hibernate into the picture to make sure you get atomic conversations.

You can also encapsulate business logic inside service classes and define services as living in a particular scope:

class BookService {
static scope = "flow"

Thus allowing conversations with a particular service scoped to individual clients. It is all rather exciting stuff and extends Grails' capabilities allowing much more complex workflows.

This is not the only exciting feature in Grails 0.6. The headliners are:

* Joint Groovy/Java Compilation
* Spring Web Flow Integration
* Support for Spring scopes to allow scoped services
* Improved support for REST with automatic XML/JSON marshalling and RESTful URL mappings
* New Config DSL for configuration not possible by convention
* Refreshed scaffolding interface and branding
* Support for Sitemesh inline decorators
* Controllers can now call tag libraries as methods
* New GSP tags
* Massive improvements to speed of start-up time, unit tests and generation tools

Checkout the full release notes for details and download here


John Wilson said...


could you not get rid of the need to quote the targets? Add a delegate which implements getProperty and just returns the property name. I do this in GraphBuilder and it seems to work well.


Charles Oliver Nutter said...

Congratulations! Sounds like a bangup release.

Graeme Rocher said...

Yeh I thought about that, but i like the way with the current DSL a good text editor (TextMate) or IDE will highlight the quoted targets. For me they stand our more quoted. Maybe its a personal thing I dunno.


Markus Jais said...

Great work. Grails amazes me with every new release. Keep up the good work.

any plans to update your book ?


John Wilson said...

First let me congratulate you on the release, I forgot last time:)

I take you point about the highlighting, however the proposal just makes string quotes optional. Can you write "Exception" instead of Exception at the moment?

Have you considered serialising the flow graph to dot files?


Graeme Rocher said...

Hey John,

Yeh we could make them optional certainly. It won't be that hard to do. And yeah the potential is certainly there to make dot files or freemind mindmaps and all sorts of formats from the builder syntax

It would be great!

Maybe after 1.0 thought :-)

Cheers, Graeme

Dmitriy Kopylenko said...

Congrats on the fantastic realease! Yeah, the up to date book would be great!

Dmitriy Kopylenko said...
This comment has been removed by the author.
Anonymous said...

Graeme, could you comment on a possible book update? Maybe for 1.0?

Niels Bech Nielsen said...


I congratulate you on goin beyond normal rails de facto standards and get much more into a web based application.

I have so waited for someone to push the bar. Keep up the good work.

Stephan said...

Excellent, excellent, excellent. This is so much more readable than other implementations. The way to go for some kinds of applications.


Stephan Schmidt ::
Reposita Open Source - Monitor your software development
Blog at - No signal. No noise.

Graeme Rocher said...

@Anonymous - I will do a refresh of the book after 1.0. Possibly a collaboration as it took way too much time last time round ;-)

Peter said...

Congrats! The Spring Web Flow integration is really elegant, it is so much easier to read and use than the traditional Java/XML Spring Web Flow.

Kito said...

I'm really digging the Spring Web Flow integration, Graeme. Looks very cool!

ATField said...

runescape money
runescape gold
runescape money
runescape gold
buy runescape gold buy runescape money runescape items
runescape accounts
runescape gp
runescape money
runescape power leveling
runescape money
runescape gold
dofus kamas
cheap runescape money
cheap runescape gold
Guild Wars Gold
buy Guild Wars Gold
lotro gold
buy lotro gold
lotro gold
buy lotro gold
lotro gold
buy lotro gold

Hellgate Palladium
Hellgate London Palladium
Hellgate money
Tabula Rasa gold tabula rasa money
Tabula Rasa Credit
Tabula Rasa Credits
Hellgate gold
Hellgate London gold
wow power leveling
wow powerleveling
Warcraft PowerLeveling
Warcraft Power Leveling
World of Warcraft PowerLeveling World of Warcraft Power Leveling runescape power leveling
runescape powerleveling
eve isk
eve online isk
eve isk
eve online isk
tibia gold
Fiesta Silver
Fiesta Gold
Age of Conan Gold
buy Age of Conan Gold
aoc gold

china tour
beijing tour
beijing travel
china tour
tibet tour
tibet travel
computer monitoring software
employee monitoring

derfefww said...

It is the 2moons dil which make me very happy these days, my brother says 2moons gold is his favorite games gold he likes, he usually buy some 2moon dil to start his game and most of the time he will win the buy 2moons dil back and give me some cheap 2moons gold to play the game.

sm said...




Anonymous said...

Do you know that in the game the requiem lant is very important, because the requiem gold can let you level quickly up, in the game you can by the cheap requiem lant then become more and more popular players, so if you want to buy requiem lant, you can come here.

Anonymous said...

Tibet Travel Dot Info offers first-hand and up-to-date tibet travel information - tours, maps, climate, transportation, accommodation, travel tips,We are offering tibet tour in great discount,Tibet tours by local Tibet travel agency - Access Tibet Tour help you travel to tibet with ease, with tibet tour guide, Tibet Adventure Travel packages!U-Way is a new travel company Specilized in china tibet tours, furnish cheap tibet tours in 2009, if you wanna travel to tibet, please believe in u-waytours, let we work-team service for you.. We are provide tibet trekking routes,Tibet travel permit and overall service of travelling to Tibet
As we know,wow gold guide and on our website.Free gold guide We have available stock of gold on most of the servers

Anonymous said...

^^ nice blog!! ^@^

徵信, 徵信網, 徵信社, 徵信社, 感情挽回, 婚姻挽回, 挽回婚姻, 挽回感情, 徵信, 徵信社, 徵信, 徵信, 捉姦, 徵信公司, 通姦, 通姦罪, 抓姦, 抓猴, 捉猴, 捉姦, 監聽, 調查跟蹤, 反跟蹤, 外遇問題, 徵信, 捉姦, 女人徵信, 女子徵信, 外遇問題, 女子徵信, 外遇, 徵信公司, 徵信網, 外遇蒐證, 抓姦, 抓猴, 捉猴, 調查跟蹤, 反跟蹤, 感情挽回, 挽回感情, 婚姻挽回, 挽回婚姻, 外遇沖開, 抓姦, 女子徵信, 外遇蒐證, 外遇, 通姦, 通姦罪, 贍養費, 徵信, 徵信社, 抓姦, 徵信, 徵信公司, 徵信社, 徵信公司, 徵信社, 徵信公司, 女人徵信,

徵信, 徵信網, 徵信社, 徵信網, 外遇, 徵信, 徵信社, 抓姦, 徵信, 女人徵信, 徵信社, 女人徵信社, 外遇, 抓姦, 徵信公司, 徵信社, 徵信社, 徵信社, 徵信社, 徵信社, 女人徵信社, 徵信社, 徵信, 徵信社, 徵信, 女子徵信社, 女子徵信社, 女子徵信社, 女子徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信社,

徵信, 徵信社,徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 外遇, 抓姦, 離婚, 外遇,離婚,

徵信社,徵信, 徵信社, 徵信, 徵信社, 徵信,徵信社, 徵信社, 徵信, 外遇, 抓姦, 徵信, 徵信社, 徵信, 徵信社, 徵信, 徵信社, 徵信社, 徵信社, 徵信社,徵信,徵信, 徵信, 外遇, 抓姦

cvxv said...

看房子,買房子,建商自售,自售,台北新成屋,台北豪宅,新成屋,豪宅,美髮儀器,美髮,儀器,髮型,EMBA,MBA,學位,EMBA,專業認證,認證課程,博士學位,DBA,PHD,在職進修,碩士學位,推廣教育,DBA,進修課程,碩士學位,網路廣告,關鍵字廣告,關鍵字,課程介紹,學分班,文憑,牛樟芝,段木,牛樟菇,日式料理, 台北居酒屋,日本料理,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,台北結婚,場地,住宿,訂房,HOTEL,飯店,造型系列,學位,SEO,婚宴,捷運,學區,美髮,儀器,髮型,看房子,買房子,建商自售,自售,房子,捷運,學區,台北新成屋,台北豪宅,新成屋,豪宅,學位,碩士學位,進修,在職進修, 課程,教育,學位,證照,mba,文憑,學分班,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,台北住宿,國內訂房,台北HOTEL,台北婚宴,飯店優惠,住宿,訂房,HOTEL,飯店,婚宴,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北結婚,場地,結婚,場地,推車飲茶,港式點心,尾牙春酒,台北結婚,婚宴場地,結婚,婚宴場地,推車飲茶,港式點心,尾牙春酒,台北結婚,場地,居酒屋,燒烤,美髮,儀器,髮型,美髮,儀器,髮型,美髮,儀器,髮型,美髮,儀器,髮型,小套房,小套房,進修,在職進修,留學,證照,MBA,EMBA,留學,MBA,EMBA,留學,進修,在職進修,牛樟芝,段木,牛樟菇,關鍵字排名,網路行銷,PMP,在職專班,研究所在職專班,碩士在職專班,PMP,證照,在職專班,研究所在職專班,碩士在職專班,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,SEO,廣告,關鍵字,關鍵字排名,網路行銷,網頁設計,網站設計,網站排名,搜尋引擎,網路廣告,EMBA,MBA,PMP
,在職進修,專案管理,出國留學,EMBA,MBA,PMP,在職進修,專案管理,出國留學,婚宴,婚宴,婚宴,婚宴,漢高資訊,漢高資訊,比利時,比利時聯合商學院,宜蘭民宿,台東民宿,澎湖民宿,墾丁民宿,花蓮民宿,SEO,找工作,汽車旅館,阿里山,日月潭,阿里山民宿,東森購物,momo購物台,pc home購物,購物