
Adobe
Note: This article was created based on the Flex 3 beta releases. Minor changes in the description and code may be necessary before it can be applied to Flex 3.
Important note: Effective with the release of Adobe LiveCycle ES, the Adobe Flex Data Services 2 server product has been rebranded as a Solution Component of LiveCycle ES. This article was written based on Flex Data Services but will likely work as is with LiveCycle Data Services ES. Any articles referring to or using ColdFusion and Flex Data Services are not compatible with LiveCycle Data Services ES. To learn about the new capabilities of LiveCycle Data Services ES, see the tutorials in the LiveCycle Developer Center and read about Adobe LiveCycle Data Services ES.
One of the most exciting new features of Adobe Flex Data Services 2 is the ability to manage easily data synchronization between Flex clients and back-end services and data. In Flex applications a version of the application data exists on the client tier in a structured, meaningful way. This allows data manipulation to be performed on the client tier, but it requires that the changes to that data be synchronized with back-end data sources. Flex Data Services provides the server-side infrastructure and the client-side APIs needed to build these data rich applications.
Before all the persistence options available today existed (such as CMP, Hibernate, JDO, and so on), data was typically managed though RPC-style operations through JDBC. This led to complex and difficult-to-maintain code. Developers felt this pain and numerous persistence frameworks were created to address this problem. Early RIA developers have also begun to feel the pain of RPC-style data management. Data Management Services represent the first real end-to-end persistence framework for Flex applications, allowing code to be simpler and more organized.
All frameworks have associated patterns that help developers use the framework most effectively. Data Management Services is no different. In fact, Data Managment Services display many features that will appear familiar to developers used to Model View Controller (MVC) design patterns. Applications typically rely on a set of objects and collections of objects that act as the application's model. The display components that correspond to the view can then use data binding to connect to the model data. The framework ensures that this data and the presentation components remain in sync as the data changes state.
This article focuses on making the shift to Data Management Services as a programming model using the Restaurant Finder sample application for code examples of RPC-style data management. For more information on Flex Data Services, read the Flex Data Services Overview.
Important note: Effective with the release of Adobe LiveCycle ES, the Adobe Flex Data Services 2 server product has been rebranded as a Solution Component of LiveCycle ES. This article was written based on Flex Data Services but will likely work as is with LiveCycle Data Services ES. Any articles referring to or using ColdFusion and Flex Data Services are not compatible with LiveCycle Data Services ES. To learn about the new capabilities of LiveCycle Data Services ES, see the tutorials in the LiveCycle Developer Center and read about Adobe LiveCycle Data Services ES.
James Ward is a Technical Evangelist for Flex at Adobe and Adobe's JCP representative to JSR 286, 299, and 301. Much like his love for climbing mountains he enjoys programming because it provides endless new discoveries, elegant workarounds, summits and valleys. His adventures in climbing have taken him many places. Likewise, technology has brought him many adventures, including: Pascal and Assembly back in the early '90s; Perl, HTML, and JavaScript in the mid '90s; then Java and many of its frameworks beginning in the late '90s. Today he primarily uses Flex to build beautiful front ends for Java based back ends. Prior to working at Adobe, James built a rich marketing and customer service portal for Pillar Data Systems. James Ward's blog can be found at www.jamesward.org.