Once the transport technology has been selected, you need to try to remove the complexity of the data access and persistence layer. The Data Management Services that come with LCDS provide an excellent model for automation of this task. But you can develop your own framework based on the open source products, and in the following sections, you’ll learn how to re-create all the necessary components for a data persistence framework.
To offer functionality similar to that of LCDS in our framework, we need to create the following data management components:
Data transfer objects
A change-tracking collection
A destination-aware collection
In the following sections, we’ll offer you Farata Systems’ version of such components. If you like them, get their source code in the CVS repository at SourceForge and use them as you see fit. We also encourage you to enhance them and make them available for others in the same code repository.
Using data transfer objects (DTOs) is very important for architecting automated updates and synchronization. In Flex/Java RIA, there are at least two parties that need to have an “exchange currency”: ActionScript and Java. Each of these parties has their own contracts on how to support the data persistence. Let’s concentrate on the ActionScript part first.
In the Café Townsend sample, the data objects responsible for the exchange between Java and ActionScript are EmployeDTO.java and EmployeeDTO.as