8 November 2010
This tutorial assumes that you have a solid understanding of the Java programming language as well as ActionScript. You should also be familiar with LiveCycle Data Services.
You can programmatically create a Rich Internet Application (RIA) that displays stock data by using LiveCycle Data Services. You use the Flex client-side API to create the client application. You use the Java API to create server-side classes that retrieve financial data from a content provider and sends messages to a destination. When the client application detects new messages, the application is updated in real time with financial data. For example, assume that the client application tracks Adobe stock. When the server retrieves updated data from the financial content provider, it creates an updated message and pushes the message to the destination. The client application detects the new message and displays changes to the stock price.
The following illustration shows the stock quote application that is created in this tutorial (see Figure 1).
The stock quote application displays data related to the stock symbol that a user entered. In the previous illustration, notice that the Adobe stock price is displayed. This application displays the following data:
- The first section displays current stock activity within a data grid control. The data grid control displays information such as the stock name, its symbol, the change in the price, and so on.
- The second section displays daily stock activity within a line chart control. As a stock price either moves up or down, the activity is plotted within this control. The user can modify the zoom perspective by adjusting the slider control.
- The third section displays stock history information within an area chart control. The user can view different ranges by clicking different time range buttons. For example, the user can view the stock activity over the past year by clicking the 1y button.
LiveCycle Data Services is used to retrieve all financial data that is displayed within this client application. The following illustration shows LiveCycle Data Services retrieving financial data from a third party financial content provider (see Figure 2).
LiveCycle Data Services retrieves stock data from the content provider by using a Java API. As the server receives stock data, it creates messages and sends the messages to a destination. A client application written using Flash Builder can receive messages from a destination and display message data. In this workflow, LiveCycle Data Services is a message producer and the client applications are message consumers.
Special thanks to Mattieu Gamache-Asselin. Mat's development efforts played an important part of this development article. Mat is a co-op student currently attending the University of Ottawa working on a computer science degree.
Where to go from here
For more information about creating Data Management applications, see the Using Adobe LiveCycle Data Services ES2 Guide.