Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maintaining Persistence

Status
Not open for further replies.

djam

Technical User
Nov 15, 2002
223
CA
I'm wondering what is the best way to maintain persistence for a small software program I'm working on. I need to track some contact information. Should I be saving these as XML files? Parsing text files? This program is for a PDA and resources are limited, I don't want to parse a file and store them as objects in RAM until I exit the program and write it to a file. What is the best way to do this?

thanks

" ahhh computers, how they made our lives much simpler ;) "
 
Well - if the minimum size a file occupies is 65kb, it will be equal if your file uses 200 bytes or 2000 bytes.

If a xml-api is already installed, there isn't much to save here too.

How complicated is your information to store, and how complicated might it get in future?
If there are only few, plain values, I would go for a kind of .ini - or ...rc - format - simple text with name=value pairs.

If you use some indirection, you may start with a simple-text format, and replace it with an xml-format when needed:
Code:
Application -> (uses) -> Configurater -> uses plain iniFile
Application -> (uses) -> Configurater -> uses xml-File
When updating, you know that the single point to modify is your Configurator.


seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top