I wanted to know whether it is better to use Titanium.Database or Titanium.App.Properties to store account information. I want to implement that my users can setup and store multiple accounts (username, password, url, …) in my Titanium mobile app. I think no user will store more than five accounts.
Will it be better to create a database (I haven't used databases in Titanium before) to manage these accounts or should I store it as JSON via Titanium.App.Properties?
With better I mean is reading from the storage in database faster? Does the database needs much more resources/memory?
I have to fetch account information each time a user opens a new window.
Does the database module works good or is it a bit buggy / unstable? My app has to work on iOS and Android devices.
As I know both database and Titanium.App.Properties is stored persistent?
Thank you in advance
Definitely Ti.Database if you're using an account system.
In my mind, Ti.App.Properties is used more for "setting"-typed things. For things that are stored by the user (Such as accounts, passwords, etc.) I would use the in-app database.
Colton, thank you for your answer. I already thought that database will be the better place.
But I'm a bit afraid when thinking of database updates. As it is not possible to run ALTER sql queries it would be not that simple to handle database migrations. Especially handling upgrades from different versions to the current database version (assuming that a user haven't updated for a long time). I'll have a look whether I can find a good solution for this issue before using the database module.