LiveCycle® Data Services Developer's Guide |
|||
| Developing Data Services Applications > Taking the LiveCycle Data Services ES Test Drive > Getting started with the Test Drive | |||
Before you begin the LiveCycle Data Services ES Test Drive, you should be familiar with the Adobe Flex programming environment and how to use Flex to build rich Internet applications. For more information, see the Flex 2 Developer's Guide.
You must install LiveCycle Data Services ES to access the Test Drive. For installation instructions, see http://www.adobe.com/go/lcds_installation[
After you start the Integrated LiveCycle Data Services server, open a browser and go to http://<hostname>:<port_num>/samples.
A link to the Test Drive appears at the top of the page. The page also includes links to other sample applications.
The Test Drive includes several sample applications: a catalog with mobile phone product information (one with text only, and the other with images), and a chat client.
You can use the HTTPService component to send and receive HTTP requests by using HTTP GET or POST. The HTTPService component consumes different types of responses, but typically you use it to consume XML. HTTPService calls are asynchronous. You also use the component with any kind of server-side technology, such as JSP, Servlet, ASP, Ruby on Rails, and PHP.
In the sample, when you click the Get Data button, the data grid is populated with XML data returned by a JSP file. It shows built-in data grid features such as sortable and movable columns. You can click the column head to sort data in ascending or descending order. Drag a column head to move a column of data to another location in the grid. You can also increase or decrease the width of the columns from the header row.
With the WebService component, you can invoke SOAP-based web services deployed on your application server or the Internet. WebService component calls are also asynchronous.
The sample also uses data grid column definitions. When you click the Get Data button, the grid is populated with data returned by a web service.
Like HTTPService and WebService components, Java RPC calls are also asynchronous. With the RemoteObject component, you can directly invoke methods of Java objects deployed in your application server, and consume the return value. The return values can be a primitive data type, an object, a collection of objects, or an object graph.
In the sample, when you click the Get Data button, the grid is populated with data returned by the getProducts() method of the ProductService Java class.
Like in any other object-oriented programming language, a Flex application is made of a collection of classes. Using Flex, you can create classes using MXML or ActionScript. You typically create view classes in MXML, and Model and Controller classes in ActionScript. After you define a class, you can use it programmatically or declaratively (as a tag in MXML) without the need for an additional descriptor file. Public properties are automatically available as tag attributes.
In this sample, basic Flex features are displayed. When you click on an image in the Catalog panel on the left side of the page, more information appears in the Product Details panel on the right.
In this sample, you can update data from one panel of data and see the changes quickly displayed in another panel. The panel on the left shows a data grid with sortable, movable columns. When you click on a row in the Catalog panel on the left, detailed information about that item appears in Details panel on the right. In the Details panel you can modify data in any field, click Update, and the change is passed from the client side to the server side.
Flex supports publish-subscribe messaging through the LiveCycle Data Services ES Message Service. The Message Service manages a set of destinations that Flex clients can publish and subscribe to. Flex provides two components, Producer and Consumer, that you use to publish and subscribe to a destination, respectively.
In the example, a Java component publishes simulated real-time values to a message queue. The Flex client subscribes to that queue and displays the values in real time. Click the Subscribe To 'Feed' destination button. Pushed values appear in the text field. Click the Unsubscribe To 'Feed' destination button to stop the feed.
The sample builds on the concepts and APIs introduced in sample 6. The messaging and real-time infrastructure available in Flex lets you build collaboration and data push applications to in a scalable and reliable manner while preserving the lightweight web deployment model.
Open the sample application in two different browser windows. Enter a message in the Send box at the lower edge of the page, and click the Send button. The message appears in the Chat windows in both clients.
In addition to the RPC services described in samples 1, 2, and 3, Data Management Service provides a different approach to synchronize data across tiers and between clients. You do not have to track changes to the data, or invoke remote services to notify the back end of the changes (such as create, update, delete) to the client side.
The Data Management Service consists of a client-side API and server-side services. On the client side, the DataService component tracks changes to the data, and notifies the back end of the changes. On the server side, the Data Management Service receives the list of changes and passes it to server-side persistence components. Data Management Service also pushes the changes to other clients.
In the sample, you can test persistence of the data, and the movable, sortable columns. After you click the Get Data button, the data grid is populated with data. Click in a cell, modify the data, and press Enter. The new value appears in that cell and the cursor jumps to the cell below it.
You can also test data synchronization across clients. To do this, open the sample application in a second browser window and resize so you can see both. Modify data in one browser, and press Enter. Notice that the update is automatically pushed to the other browser window.
LiveCycle Data Services ES 2.5
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/livecycle/es/sdkHelp/programmer/lcds/getstarted_2.html