Wednesday, October 15, 2008

Using a DataService in AIR to automatically cache complex data in SQLite without LCDS Data Management

One of the most powerful features of a DataService in AIR is its ability to cache complex data either automatically or by calling DataService.saveCache(). The data is persisted to SQLite automatically with this call and typically the data that is cached is the data found in the ArrayCollection returned from the fill() method.

Well, what if you simply wanted to automatically save a complex hierarchy of Value Objects in an ArrayCollection but you didn't want to use LCDS Data Management and build Assemblers for your application. What if you just wanted to use BlazeDS?

Well, you can....

I figured this out because you cannot rely on any event, not even the ResultEvent, from LCDS to tell you that a fill() has finished loading data to your AIR Application...I needed a notification.

I built a solution that does exactly this....details to follow soon...

No comments: