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.
May 28th, 2008 at 12:58 pm
cool blog about flex loads of info here
May 28th, 2008 at 3:48 pm
Thanks but what happened to the fonts inside the PDF?
May 28th, 2008 at 4:07 pm
@Mat
Is there a problem with the fonts?
May 30th, 2008 at 6:31 pm
You have mixed up between the slides and the source links. The presentation looks nice (fonts are okay) but seems unfinished without the complimenting talk. Waiting for the video demo.
June 11th, 2008 at 4:55 pm
Hi,
I’m new to flash/flex/lcds and am excited about the possibilities for occasionally connected clients in Flex. I’m from a .Net background. Just tried to install the demo by importing into flex builder 3. No go there as it asks about the LCDS_FLEX_SERVER_ROOT which I just cant get working(Root folder:Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml..which contains the needed file). Then I extracted the zip file into a directory and created a new project in builder and just copied and pasted the xml files/resources etc into this new project. I can see the source etc but when I run it it returns an error….File not found: file:/C:/Users/Administrator/Documents/Flex%20Builder%203/Prayank/bin-debug/CompanyForm.html
I am a complete noob in this arena and suspect that I am doing something very basic wrong. There are not that many examples of synchronisation out there and was wondering if you could give me a few pointers as to where I am going wrong!
Many thanks for your efforts anyway.
John
September 8th, 2008 at 4:09 am
Demo was great. Thanks.