1
\$\begingroup\$

I am developing an mobile application (in HTML5) that will run on multiple platforms and will eventually have both single and multiplayer options. The current issue I have is the best method for storing many rows of data so that the user can access it either in single (no internet) or multiplayer.

I have a relational database for the multiplayer users to access the data, however I'm concerned about performance (keep trying to access to the server). I was wondering if there is any reasonable method (apart from localstorage and websql - as I understand, localstorage can't hold a lot of data and websql is only available on certain platforms) to store a lot of data locally on a mobile device so that any non-internet users can still access their data and do so quickly?

\$\endgroup\$

1 Answer 1

1
\$\begingroup\$

It depends, whether you game will run in browser or wrapper (such as PhoneGap, or your custom). In latter case you can simply use device storage to store anything you need.

\$\endgroup\$
8
  • 1
    \$\begingroup\$ I'm planning to use PhoneGap for the mobile version, however I don't want to rely totally on this in case of failure. I was just wondering if there was a certain way to store rows of data locally on a mobile for quick and guaranteed access to the data. \$\endgroup\$
    – Marb
    Apr 3, 2013 at 19:33
  • 1
    \$\begingroup\$ May I ask what kind of failure are you expecting? If you work with PhoneGap, you will be using native file/database access same as every other application. \$\endgroup\$ Apr 4, 2013 at 9:21
  • \$\begingroup\$ Isn't there certain platforms that do not yet support this though? I'm thinking the only errors that may occur if there is a phone OS update or just a rare occurrence of an error. I guess I'm asking for a suitable secure fall back so that I can store multiple rows of data that can always be accessed through HTML 5 rather than a third party. \$\endgroup\$
    – Marb
    Apr 4, 2013 at 18:07
  • \$\begingroup\$ I would say, that even if there were something in browser, that would allow you to store more data than LocalStorage does, it's more likely to loose data than any other means. Browsers have a tendency to clean up old data, when it overflows afaik. Using native methods to store data on each platform provide solution as stable as it can get within platform permissions. \$\endgroup\$ Apr 4, 2013 at 18:12
  • 1
    \$\begingroup\$ Ahh right ok, what that mean that HTML 5 would not be a fall back solution; and seeing that I am using the PhoneGap it would be better to tap into that to get hold of the local data? (in case connecting to server fails) \$\endgroup\$
    – Marb
    Apr 4, 2013 at 18:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .