DevWebPro Newsletter:


Get Your Site Submitted for Free in the World's Largest B2B Directory!

Email Address:
* URL:
*
*Indicates Mandatory Field

Terms & Conditions

Grails And Flex

By Sean Corfield
Expert Author
Article Date: 2008-02-22

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:

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.

Comments

About the Author:
Sean is currently Senior Computer Scientist and Team Lead in the Hosted Services group at Adobe Systems Incorporated. He has worked in the IT industry for nearly twenty-five years, first in database systems and compilers (serving eight years on the ANSI C++ Standards Committee), then in mobile telecoms, and finally in web development. Sean is a staunch advocate of software standards and best practices, and is a well-known and respected speaker on these subjects. Sean has championed and contributed to a number of ColdFusion frameworks, and is a frequent publisher on his blog, http://corfield.org/


Newsletter Archive | Article Archive | Submit Article | Advertising Information | About Us | Contact | Site Map

Dev Web Pro is an iEntry, Inc.® publication - 1998-2009 All Rights Reserved Privacy Policy and Legal