Start RESTing on your laurels | Home | ColdFusion 8.0.1 Released With New Features!

Filed under Quick Tips on April 4, 2008 by Javier Julio

Using ColdFusion Components (CFCs) in AIR Powered Flex Applications

Recently, I took one of my Flex/CF projects here at work to see how much effort and time it would take to deploy it on AIR without any of the desktop enhancements. I had no prior experience with AIR so I wasn’t sure what was involved.

The application uses the RemoteObject component in Flex to connect to CFCs to pass data and typed objects back and forth. Since it's deployed as a web application, Flex can figure out the “endpoint” automatically but since we are now on AIR, we need to provide that. An example if you were doing local development would be something like:

All I had to do was to add the "endpoint" property to all of my RemoteObject definitions. Since I used the PureMVC framework I had that nicely abstracted out as delegates within a business folder so it was even easier to find and get too. No other changes at all were required because my application now functioned on AIR as it would if it were in a browser.

Post a Comment Digg Del.icio.us

Trackback Pings (TrackBack URL for this entry)

http://www.arc90.com/cgi-bin/mt4/mt-tb.cgi/130.

Post a Comment:

Start RESTing on your laurels | Main | ColdFusion 8.0.1 Released With New Features!