One of the requirements was to provide seamless integration between the browser flex application serving the client needs when the network is on vs an AIR Application as an offline system when the network turns off. But the requirement isnt straight as you think. What it says is, When network is connected the end user will be using flex browser application by navigating to the URL which downloads a lot of data on to the client machine from the server which periodically gets updated based on the data-change on the server. This is stored as client side SharedObjects through the browser ran flex app. Now when the network turns off, the end user would launch the offline system that should read through earlier created sharedobjects while network was on and work through it. AIR App should also be able to write a shared object containing data required to be parsed through the browser flex app when launched (when network is back)...
This kind of sounds so wierd to me. After hearing the requirement, i was like WHAT?? But then i started to see through different ways of achieving it. With Browser Sandbox Security, browser flex app always can get hold of SO (Shared objects) created through SharedObject.getLocal(). Even if we were to understand and agree to one common location that AIR Could understandably read, keeping the location parameter excluded for a whole lot of argument... The Important thing is to consider serialize and de-serialize a FileStream read ByteArray into AS Objects that can be natively used in the code. Well, more to that is the SharedObjects written through the browser flex app could also carry complex data structures which could carry more information rather than a simple data->name/value
While doing the research, i went through a lot of google search - .minerva was exactly doing what i was looking for but its not open to go through the bits of it and tweak to get it working !!
- Link to AMF 3 Specification document
- Format of a Shared Object
- Open Source Flash
- Storing Custom AMF Objects for AIR App Storage
-
Reading ByteArrays either from Web or AIR app (I couldnt connect through it well)
- Reading and Writing a ByteArray - Flex Docs (on zip file formats) & also here
- AIR App Named .minerva (this is exactly what i was intending to do, but after installing .minerva i didnt open up some of my other .sol files even though they were good)
- Link to AMF-PHP Open Source porting link
-
Persistence Storage with .SOL (shared objects), a just like that content.
- SharedObject API doc
- AMF Serializer/deserializer for java/flex - Google Code
- Granite DS (what they claim is alternative to LCDS)
Here is a sample code demoing the problem:



















