ColdFusion 9.0 Resources |
ColdFusion server sideThe 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 cfquery tag and related tags and function for database operations. To manage interactions with the AIR application and keep the
data synchronized, ColdFusion application uses a component called
the SyncManager. The SyncManager implements the CFIDE.AIR.ISyncManager
interface. The component has two functions:
Incase of Conflict during Sync process, the sync function returns to the AIR client an Array of "CFIDE.AIR.Conflict.cfc" objects. Each of this Conflict object consists of a single serverObject element. The sync function sets the element to equal the server copy of the record that is in conflict. The client application can then handle the conflict as described in Conflict management. |