views:

80

answers:

2

Hi

I need some help developing my mobile app. I have to store user data permant (name, password), so what is the best way to do that? I dont know a special API for it, so where to store persistent data's on a windows phone?

Maybe in the win mobile registry or inside a file? Or should I use a light database? Someone has experience with this?

thx, Stefan

A: 

Well I would suggest you to use XML file with encryption. As the performance is very much critical for mobile applications, you should avoid light database as it will consume more processor and memory compared to a simple XML file. XML file with encryption will help in performance as well as security of the data.

Ram
XML parsing is pretty far from what I'd consider "high performance". Once you add in encryption anything you think you might be losing with accessing database becomes a non-issue. For example, TableDirect with SQL CE is just as fast as direct file access and doesn't require XML parsing so general hand-waving about "performance" needs to be weighed against actual use requirments. Who knows, maybe he's already using a database for other features - in that case it probably makes sense to use a database.
ctacke
Yes, you are right. If he is already using DB, then he can consider storing it in DB.
Ram
+1  A: 

When Microsoft stores credentials (i.e. for WiFi, or something) it stores them in the registry. Access is relatively fast and, with encryption, it is relatively secure.

The Windows Mobile OS has some encryption built in. You can use the Cryptography API; particularly the ::CryptProtectData() function with the CRYPTPROTECT_SYSTEM flag.

-PaulH

PaulH