I recently had the opportunity to put together a really quick survey application for our booth at the Adobe Max event in Los Angeles. When I started in on this application I was extremely excited. The application contains videos, online offline syncing, and a slew of nifty Air only capabilities.
My excitement quickly wore thin when working with the new cfair.swc utility that assists with creation of local storage and facilitates online offline synchronization of data. The cfair.swc is kind of a black box. It’s extremely frustrating to try to debug when you can’t dig in and see the code.
At first I was just getting errors like “ReferenceError: Error #1065: Variable Prize is not defined.” So I probably didn’t define a Prize value object in the project or I didn’t properly define this in the metadata. No problem. After some quick corrections I was elated to see that cfair.swc had helped me properly built out my sqlite tables with all of the correct join tables and columns. Now on to saving.
When saving responses to our local database, I was perplexed to see that all of the saves I was doing were resulting in primary key values of zero. My confidence was shaken.
I also ran into ‘undefined’ errors when retrieving relational data. The source of the issue is coming from the cfair.swc but I can’t dig in to take a closer look at what has gone wrong.
While we were able to struggle through each of these issues, we still found hiccups and missing data when using the cfair.swc over a number of application sessions and over long intervals of usage. For this reason, and because of the limited amount of time I believe the correct thing to do was to move on without the cfair.swc.
I briefly considered using AirOrm (http://code.google.com/p/airorm/) but decided to switch the application over to ‘Air Active Record’ (http://jacwright.com/blog/55/air-active-record/), which I’ve used on previous projects and never had any major issues with.
I have no doubt that Adobe will continue to develop the documentation and correct any issues with cfair.swc. This is brand new code and issues are to be expected. As AdobeÃ¢??s community digs in, I have no doubt that many of these problems will be corrected and resolved.
Has anyone else run into issues with somewhat complex data mappings while using this tool?