Online/Offline Application Take Two (Part 1)
Ok, so with there being some bugs in the cfair.swc (like this one and this one), and it being such a new release, I've decided to take a slightly different approach to an online/offline application for the time being. This new approach is to write a "segway" version of our online/offline software using similar tools, but different implementation. Ultimately it will lead to a pure Air+Flex+CF9 solution, but makes a good transition as I will be re-using my ColdFusion application nearly untouched.
Since this is new ground for me, and some of the techniques and tools I'm playing with are pretty cool I thought I'd make a blog series on it. This initial post will give an overview of the requirements involved, then in future posts I will detail how I accomplished each requirement. As a disclaimer, my techniques may include bad practice, misuse of technology and an all around stupid way of doing it, so take this series with a grain of salt, and suggest better techniques if you've got'em.
First of all a little background to the project is in order. I am taking an "always online" web application built on CF8 and MySQL and creating an offline desktop version to deploy to our markets that either do not have reliable internet connectivity or will be using the application on the road and need access to the data when no internet connction is available. My initial design (inspired by excellent sessions at CFUnited '09) was to re-build the entire application in Flex and deploy as an Air application. I would then use ColdFusion 9's Air integration for database synchronization and client side orm capabilities. This was almost too good to be true...wait, it was too good to be true! At least for now.
With deadlines aproaching and cfair still being too "soft" to use in production I've decided to take another route. After some creative prototyping I have discovered a way to deploy my exisitng CF application offline via Air/Railo/MySQL. The result will be a locally installed (likely via Air badge installer) application that will opportunistically sync to a master server when a connection is available. I'm still working on the details, and there are roadblocks (especially with the data sync stuff), but I *think* all can be overcome.
When all is said and done I will end up with these three layers all included in a single package:
- Client - Dekstop User Interface
- Server - CF Engine
- Database Synchronization
The next post in this series will detail how I tackle the Air/Flex UI for rendering the existing CF web content. Then later I'll detail how I make that happen in a local install using Railo.