I'm thinking about adding an "auto-save" feature to our RIA so that users can navigate away from the app and not lose any data. The common AJAXy approach (e.g. Gmail) is to periodically send updates back to the server. But I'd like to avoid hitting the server with that regular network traffic if I can, and I want something quicker than traversing the wire...
So, I thought of local SharedObjects. They can store up to 100KB without bugging the user (by default), which would be plenty. I've got a few questions, though, because I can't find anything but very trivial examples. - When serializing an object to the SharedObject, is the whole object hierarchy traversed? For example, if I have a model that stores a ParentObject which has an array of ChildObjects, and I stick the ParentObject in the SharedObject, when I retrieve it will I get back the ParentObject with a complete array of ChildObjects? - I'm guessing the above question probably relates to the default behavior of AMF3 serialization, which I know can be customized by defining the IExternalizable interface and implementing the read/write bytes methods... anyone have any pointers on writing robust r/w methods? - From what I get in the documentation, it sounds like the *default* Player security is such that I could store a local SharedObject smaller than 100KB with virtually guaranteed success. Of course, if the user has disabled local storage all together, it won't work, in which case I'll need to prompt the user about it. Is there any existing examples or libraries that provide a good, robust handling of a local persistence, i.e. handling the edge cases gracefully and/or prompting the user appropriately? Thanks, Troy.