Search code examples
actionscript-3mongodbairstarling-frameworkrobotlegs

local database for adobe air for JSON on Android


I am building an app that will have local database. I plan to implement local database that will be used for offline work, and when app connects with internet it should sync with the server data.

What is currently the best way to do it?

I prefer JSON type databases over SQL databases so I would like to use MongoDB for web, but then for local database there is only one solution that is not yet available for android. https://github.com/thejustinwalsh/airejdb

How do you do it? Do you save key:value inside of SQLite database, do you use plain text saved somewhere or do you have some other implementation of mongoDB for local Adobe Air?

Thankx


Solution

  • Depends on project, if I have sensitive data then putting it in encrypted SQLite might be necessary, also if JSON data is not so small it might be good idea to just compress it as a string and put as a byteArray->BLOB in SQLite, can save lot of space which in case of mobile project might be useful, otherwise you can do same with some text file without using SQLite at all, just save and load data, IMHO impelementing something like MongoDB is much more harder work then given examples.