Data synchronization patterns in Flex applications
Flex May 28th, 2008
Presentation slides: here
Demo source code: here
I recently spoke at the Webmaniacs conference in Washington DC.
I spoke about "Client/server data synchronization patterns in occasionally connected clients". I’m uploading the demo files and the ppt files here.
The first part of the talk is pretty general, and I think you can apply it to any kind of occasionally connected client - you may be building it with AIR + LCDS, Flex + LCDS or with AJAX toolkits e.g. Google Gears. The latter half of the ppt & the demo - showcase the features of LiveCycle Data Services (LCDS) that allow users using Flex/AIR to build such apps. It talks about conflict resolution, transactions, batch updates (TODO).
An occasionally connected clients is a software that functions in the same manner while disconnected from the network, as while connected - only with certain restrictions on transactional functionality - the idea is that the user should be least discomforted by disconnections to the network.
I just wanted to get this demo out, it is not polished and some things are not working really but I will keep updating the demo and commenting the source code to make it easier to understand. I’m not using any MVC patterns to avoid adding any complexity to the code. So it is pretty bare bones.
Steps to compile the application:
- The application uses LCDS 2.6 beta (available from Adobe Labs)
- The application is compiled as a Flex project using Flex Builder 3. (You dont need the project to be a LCDS project, a simple Flex project will do. I create all connections to LCDS server on the fly.)
- If you want you can extend it to be an AIR application as well.
- The application will run as a simple drop-in to LCDS.
Steps to run the application:
- You can see various usecases by running the application.
- You will need to run at least two clients at the same time.
- The clients start disconnected from the server.
- Click on connect, and then fetch data to get the data in the clients.
- You can then start playing around with various controls to see how things change.
TODO: I need to put a video demo to show the various functionality.
I will write a more thorough discussion on the topic in a couple of weeks.
This work is licensed under a Creative Commons Attribution 2.5 India License.


