Offline Air Application Support - Adobe COLDFUSION 9 Manual

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Flex and AIR Integration in ColdFusion
Compile and run the application using Flash Builder
To compile and run an application using Flash Builder, make sure that Flash Builder is configured as described in
"Configure Flex
Compilation" on page 620. Compile your application normally to create a SWF file. When you
configure your Flash Builder project you can specify the location in which to place it. By default, Flash Builder attempts
to place the SWF file and an HTML wrapper page under the web root. You can then run the application as appropriate,
for example, by requesting the HTML wrapper for the SWF file in a browser.
Compile and Run the application without Flash Builder
To compile the application directly using the SDK, set the Flex compiler to use the ColdFusion services-config.xml file.
Set the Flex compiler by adding to the mxml command line "
services-config.xml file in the local ColdFusion installation. For example, on a Windows system with a default
ColdFusion standalone installation, specify the following argument string.
-services=C:/ColdFusionCentuar/wwwroot/WEB-INF/flex/services-config.xml

Offline AIR Application Support

ColdFusion 9 provides offline AIR application support, which includes data persistence and synchronization. These
features let an AIR application use a local SQLite database that represents data on the ColdFusion server.
You cannot use these features in applications built with Flash, which run in a browser or Flash Player. These features
only support AIR applications with intermittent connectivity to the ColdFusion data provider. They enable users to
run the AIR application offline and then synchronize data with the ColdFusion application the next time the
application runs online.
To support offline AIR data access, you code ActionScript elements on the client side and CFML on the server side.
Note: Some of the code in the following discussion uses an AIR application that displays and updated an Employee
database that ColdFusion manages for its sample code. However, the snippets below are not all from this example, and
do not make up a complete or consistent application.
More Help topics
"Offline AIR application support in ColdFusion
ColdFusion server side
The ColdFusion application uses a CFC to represent the data being exchanged and synchronized. For example, you
could have an ORM employee component with a structure as follows:
<cfcomponent persistent="true" displayname="EMP">
<cfproperty name="id" type="numeric" fieldtype="id" generator="native">
<cfproperty name="firstName" type="string">
<cfproperty name="lastName" type="string">
...
<cfproperty name="countryCode" type="string">
</cfcomponent>
You can also use a traditional non-ORM CFC. In this case, the Fetch and Sync Methods use the
related tags and function for database operations.
-services=
9.0.1" on page 646
Last updated 8/5/2010
" followed by the absolute path to the
cfquery
625
tag and

Advertisement

Table of Contents
loading

Table of Contents