
673
DEVELOPING
COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Las
t
upda
te
d 8/5/2010
2
Create the Flex application, in which you define a DataService component in MXML or ActionScript. The
DataService component calls methods on a server-side Data Management Service destination to perform activities
such as filling client-side data collections with data from remote data sources and synchronizing the client and
server versions of data.
3
Configure a destination for the ColdFusion Data Service adapter so that the Flex application to connect to the
ColdFusion back-end application. For more information, see “
Configuring a destination for the ColdFusion Data
Service adapter
” on page 673.
4
Write your ColdFusion CFCs. For more information, see “
Writing the ColdFusion CFCs
” on page 680.
Note:
To make creating the CFCs easier, ColdFusion includes wizards that you can use in Flash Builder. For more
information, see “
Using the ColdFusion Extensions for Eclipse
” on page
1334.
5
Test your application by using Flex.
Configuring a destination for the ColdFusion Data Service adapter
To provide the information necessary for the Flex application to connect to the ColdFusion back-end application, you
configure a destination. In the destination, you specify the ColdFusion Data Service adapter, the channels to use to
transport messages to and from the destination, the CFC that contains the
fill
,
get
,
sync
, and
count
methods, and
other settings.
To provide configuration information, you edit the following files:
1
services-config.xml
You specify channel definitions and enable ColdFusion-specific debugging output in the Flex console in this file.
Change the port numbers in the services-config.xml file for the RTMP channels if you run more than one
ColdFusion instance with the integrated LiveCycle Data Services ES.
2
data-management-config.xml
This file is added only when you install LiveCycle Data Services 2.6.1 manually. You specify adapters and
destinations in this file.
To ensure that Flex recognizes the LiveCycle Data Services ES assembler and can transport messages to and from the
destination, by doing the following:
•
Specifying ColdFusion-specific channel definitions
•
Specifying the ColdFusion Data Service adapter
•
Specifying a destination
•
Enabling ColdFusion-specific debugging output
Enhanced Flash Remoting
ColdFusion 9 has introduced enhanced Flash Remoting.
•
Enhanced Flash Remoting supports Circular references for objects which are not supported in old Flash Remoting
(ColdFusion 8).
•
Enhanced Flash Remoting is significantly faster than the old one
The default ColdFusion 9 installation makes use of this Enhanced Flash Remoting. The structure inside the xml
configuration files under WEB-INF/flex directory has been changed to support Enhanced Flash Remoting.
Содержание COLDFUSION 9
Страница 1: ...Developing Applications ADOBE COLDFUSION 9...