0 Replies Latest reply on Dec 3, 2008 11:10 AM by marcin.hagmajer

    Flex local storage

    marcin.hagmajer Level 1
      Hello,

      Firstly, I would like to express how impressed I am with all the Flex/Flash Player capabilities and the RIA concept.
      Nevertheless, I want to mention some important drawbacks I've come across in hope that you can fill me in with some clever walk-arounds.

      Local storage of user data (local shared objects) is, to me, done really poorly. This ability is quite important. If something goes wrong (eg. connection to server) goes wrong, application should be able to store the state and restore it upon next execution. It also can be used to cache already downloaded files no to download them each time. It would great, if Flex provided the easiest and best solution - allow an appliation to access local files contained in a special app-specific directory. I see no security issues (reasons) not to implement it this way.

      Let me now explain why I am so unsatisfied with local SharedObjects:

      1. Once opened, they are never closed. What is even worse the stored value is flushed to disk on exit! There is now way to turn it off (even if you null all references to the SO - try it!). Why this is such a problem? Imagine that user opened a second instance of the application and made some changes - it happens all the time. The data stored in SO would get overwritten after closing each instance. For me it is a reason not use them at all.

      2. The whole data stored in SO is loaded to the operation memory at once. Imagine that we store there something bigger that a few strings. Why to bloat memory with this all?

      3. SO fetches data according to references. It is a huge design problem if you try to store some Value Objects there which have references to some other objects. Practically, the result is that you have to serialize the objects using your own algorithms.

      The files - based way of providing local storeg capabilities is what Silverlight offers. I do not want to start the which is better discussion but to point out that the local storage should be improved quickly.

      Thumbs up for the ability to read / save files (after using FileDialog) directly from Flex! Certainly a step in good direction.

      Please state whether you agree or disagree with me points. Let us make RIA experiance even better ;)