Currently, I have a form that has various radio buttons, directory browsers, date pickers etc. The application uses the settings, and executes a file deletion task. I was wondering what is the best strategy to save these settings to an external file that can be loaded at a later date. So essentially each configuration can be loaded, executed, and then another configuration loaded. Also, the configuration can be passed across installations / users.
I dont believe I can use the internal .settings file because I will have multiple sets of settings that can be loaded.
There are many formats to choose from for storing settings such as:
One of the best strategies would be to use XML. XML is one of the most popular formats for setting/configuration files because its easy to parse, the syntax is well specified and is powerful yet easy to read.
Using XML files allows configurations to be passed across installations and shared among users.
In addition if you have an XSD (schema file) that describes your XML configuration files, it is trivial for your application to validate different configuration files.