Fusion Authority Quarterly Update

Viewing By Category : grails / Main
February 12, 2008
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:

static expose = [ 'flex-remoting' ]
It had a method, hello(), that returned a string.

Then I put my main.mxml file in the web-app directory of my Grails project with these lines inside the mx:Application tag:

<mx:RemoteObject id="ro" destination="helloService"/>
   
<mx:Button label="Hello" click="ro.hello()"/>
<mx:TextInput text="{ro.hello.lastResult}"/>
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:

http://localhost:8080/bookstore/main.mxml

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.


February 10, 2008
There's still a lot of buzz about Ruby on Rails and I've played around with it but I really don't like the Ruby syntax. I've tried a few different Rails packages and just find the experience... clunky. Lots of people are very excited about Rails and Ruby in general, especially with JRuby (Ruby for Java) now running Rails. In fact, Maxim Porges thinks JRuby has taken ColdFusion's place as the new web productivity layer for Java, after watching Charles Nutter demo JRuby at the acts_as_conference Rails conference recently in Florida.

[More]




Hosting provided by