I am writting Windows Phone messanger application and I have dilemma how to store my messages. At this moment my message class looks like:
public class MessageModel
{
public string Side { get; set; }
public string Message { get; set; }
public DateTime TimeStamp { get; set; }
}
I don't know is it good idea to have an class like I mentioned and store them in IsolatedStorage. Is better solution to have a file and save them in XML or JSON format ? Or maybe some database ? In other way having a class of MessageModel makes Binding really easier. I would like to keep my messages in format of dictionary: Dictionary<username, ObservableCollection<MessageModel>>
where username key is an string. If you can tell me some advice about that I will really appreciate that.
This is interestinq question. I did some tests. Test algorithm for 1 iteration:
Table below show results for 1000 and 10 000 iterations. Tested on emulator.
In yours scenario - I don't think you'll have many records. If u don't need any complex query and update etc. XML is good choice. It is easy to use, the resulting file is readable and don't need any third party library.