blob: 77d2e06306f501573a099962fba33e3fd4e99898 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<p>In addition to the RPC services, the LiveCycle Data Services ES Data Management Service feature provides an innovative and highly
productive approach to synchronizing data across tiers and between clients. The Data Management Service feature consists of a
client-side API and server-side service. </p>
<p>On the client side, managed objects keep track of changes made to the data, and notify the backend of these changes. To implement
this sample, simply:</p>
<ul>
<li>Define a DataService pointing to the "product2" destination defined in data-management-config.xml.</li>
<li>Invoke the DataService's <code>fill()</code> method to populate the products array.</li>
<li>Bind the DataGrid to the products array.</li>
</ul>
<p>You don't have to keep track of changes made to the data, nor do you have to invoke remote services to notify the backend of the
changes (create, update, delete) made on the client side. </p>
<p>On the server side, the Data Management Service receives the list of changes and passes it to your server-side persistence
components. The Data Management Service also pushes the changes to other clients. In this example, the product2 destination configured
in the data-management-config.xml file uses the java-dao adapter, which indicates that custom Java classes handle the persistence code
(another option is to use the SQL or Hibernate adapter). There is no specific contract imposed on the Java class that provides
the persistence implementation. You map methods such as fill and sync to actual methods in an assembler class (in this case,
ProductAssembler). In the assembler class, you typically delegate the actual persistence implementation to existing persistence classes
or a DAO layer, such as shown in this example.</p>
<p>A list of links to the server side files used in this sample are listed below for further reference. </p>
<table>
<tr><td><a href="http://tourdeflex.adobe.com/remotesamples/DataAccess/server-source-code/flex/samples/product2/ProductAssembler.java.txt">ProductAssembler.java</a></td></tr>
<tr><td><a href="http://tourdeflex.adobe.com/remotesamples/DataAccess/server-source-code/flex/samples/product2/Product.java.txt">Product.java</a></td></tr>
<tr><td><a href="http://tourdeflex.adobe.com/remotesamples/DataAccess/server-source-code/flex/samples/product2/ProductDAO.java.txt">ProductDAO.java</a></td></tr>
<tr><td><a href="http://tourdeflex.adobe.com/remotesamples/DataAccess/server-source-code/flex/samples/product2/BaseDAO.java.txt">BaseDAO.java</a></td></tr>
<tr><td><a href="http://tourdeflex.adobe.com/remotesamples/DataAccess/server-source-code/flex/samples/product2/ConcurrencyException.java.txt">ConcurrencyException.java</a></td></tr>
</table>
</body>
</html>