1

How to store data locally using Flex 3 in web applications. Without using backend or using shared object.

I came to know that there is something called Data Management in Flex 3. And it is not for AIR application.

2 Answers2

4

Flex Data Management is part of Flex Data Services. It is a framework and toolset for storing data on the server (not locally in the web browser). Here is a tutorial for using Data Management with a java-based server.

Shared Objects are designed for local (in-browser) storage. I know you said you don't want to use them, but why not? That's what they're there for.

The only other approach that might be feasible, is to utilize the new HTML5 database storage (see this S.O. answer). In order to access it from flex/flash you'd have to (a) write some JavaScript function(s) to do the storage/retrieval, and (b) use External Interface to call your JavaScript from within flex/flash.

I'd strongly suggest that you consider using Shared Objects.

halfer
  • 19,824
  • 17
  • 99
  • 186
Lee
  • 13,462
  • 1
  • 32
  • 45
  • thanks for the answer. I said I don't consider Shared Object because, shared object has some limitation for storage. If the data is more then shared object is not useful. Anyway thanks – Santhosh.H.R Dec 15 '10 at 07:01
  • Shared Objects are limited in size to 100k each. But you can create more than one of them. So you could split your data into chunks, and store the chunks separately. As an alternate option, the HTML5 databases that I mentioned are (I think) allowed to be quite large. – Lee Dec 15 '10 at 07:13
  • the use case is, there is a e-learning app. Where user answers questionnaires and click next button to go to next question. Say suppose, user answered 15 question out of 25 and suddenly system breaks. When the system is up again, I need to start the questions from 16 and not from the first question and I need to store the all 15 question information locally. this is the scenario. What will be the best solution?. – Santhosh.H.R Dec 15 '10 at 12:22
0

I don't know your use case, but you CAN store larger files, but it will prompt the user for the location to save the data. You can use FileReference.save() for this.

Brian Genisio
  • 47,787
  • 16
  • 124
  • 167
  • the use case is, there is a e-learning app. Where user answers questionnaires and click next button to go to next question. Say suppose, user answered 15 question out of 25 and suddenly system breaks. When the system is up again, I need to start the questions from 16 and not from the first question and I need to store the all 15 question information locally. this is the scenario. How to do this without using back-end. – Santhosh.H.R Dec 15 '10 at 11:43
  • 1
    That doesn't sound like a lot of data. Why are you limited by 100k? This certainly sounds like a case for Shared Objects from what you have said. It was created for use cases like this. – Brian Genisio Dec 15 '10 at 13:42