Best practices to store environment or user options

  • Thread starter Thread starter Earl
  • Start date Start date
E

Earl

..Net Winforms app. I'm currently using the database to store user options.
But I wonder if there is a better, faster technique. For a simple example,
look at the Visual Studio 2005 Tools > Options screens ... are all of these
choices being saved XML, a database or where? Is the OK button a "Save"
button or are the changes committed at the time you check/uncheck? I'm doing
everything Winforms and while my system works well, I'm always looking for
fewer trips across the network (so long as it doesn't come at a price!).
 
The stock anwer is "It depends" on what your requirements are. If the
clients of your application don't always work on the same computer a
database is a good choice. When they always work on the same machine you can
use the app.config file.
 
i use the Isolated Storage Settings Helper found here:

http://idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11

Smart client applications often need to store application settings in a
partial trust environment. For strongly typed settings building
applications with Visual Studio 2005, user settings can be written in
partial trust once .NET 2.0 releases. In addition, sometimes you may
need to store ad-hoc settings in separate files and you may not want to
use user settings for those settings. Isolated storage provides a good
place to put custom settings that can be written to in partial trust.
This helper class allows you to read and write custom settings

simple to use
 
Thanks to both for the ideas.

jay parzych said:
i use the Isolated Storage Settings Helper found here:

http://idesign.net/idesign/DesktopDefault.aspx?tabindex=5&tabid=11

Smart client applications often need to store application settings in a
partial trust environment. For strongly typed settings building
applications with Visual Studio 2005, user settings can be written in
partial trust once .NET 2.0 releases. In addition, sometimes you may need
to store ad-hoc settings in separate files and you may not want to use
user settings for those settings. Isolated storage provides a good place
to put custom settings that can be written to in partial trust. This
helper class allows you to read and write custom settings

simple to use
 
Back
Top