Grails And Flex

Friday, February 22, 2008 by Mistlee

Grails And Flex

By Sean Corfield

Most of us know by now just how easy it is to write Flex applications backed by ColdFusion. Adobe have done a lot of work to ensure that integration with ColdFusion is seamless. It's very impressive.

Browsing through the Grails site, I noticed they have a plugin for Flex so I figured I'd try it out.

Following the instructions, I installed the plugin (grails install-plugin flex) which took a fair while to fetch the plugin from the codehaus.org site and build it and install it into my project. Then I created a service class - a regular Groovy class - with just this one additional line:




You don't need to build the project. You don't need to set any paths in FlexBuilder. Just create the MXML file.

Then I hit the MXML file in my Grails app:



Much churning ensued as the Flex app was compiled on demand and then up it came with the Hello button. Click. The return value from my HelloService.groovy hello() appeared in the text box.

It's a trivial app but it showed just how incredibly seamless the integration is. It uses the Web Tier Flex compiler for on-demand MXML compilation and it automatically manages the destinations for you.


DevWebPro News Archives About Us Feedback DevWebPro Home Page About Article Archive News Downloads WebProWorld Forums Jayde iEntry Advertise Contact

0 comments: