Best practice to save user and session preferences for a .NET application?

R

RS

Hi,
What's the best practice to save user preferences for a .NET
application . For example if the user does not want anymore to see
Tip-Of-The-Day (TOTD), the user can tick a checkbox on the window
showing the tip (TOTD). That tick will be recorded so that next time
the user logs in, the application will suppress the display of TOTD.
Now if I expand this simple example, say the user is so expert at what
he does with the application he can choose to hide all the "Warnings
Messages" and other FYI Messages etc... Also say the user would like to
have control over background colours, font size and type etc...

What is best practice to save all those preference?

Is it to capture them in a User-Profile object and persist that object
locally on the machine and then load it every time the user logs in so
its accessible through out the application?

How about if I want the profile to be saved remotely also, say I want
the user to have the same look and feel from any machine he choose to
access the application?


Thanks
 
C

Cor Ligthert

RS,

You ask a lot, and starts already given yourself an answer. However than
first another question if you are sure about it.
How about if I want the profile to be saved remotely also, say I want
the user to have the same look and feel from any machine he choose to
access the application?
How if one is an old portable 12" screen and one is a very advantage
computer with by instance an 21" screen.

Otherwise my answer is always the same in this kind of question.
machine settings is the registry
application settings a xml file, in my case just a dataset.

Cor
 
D

Doug Taylor

RS,

You ask a lot, and starts already given yourself an answer. However than
first another question if you are sure about it.

How if one is an old portable 12" screen and one is a very advantage
computer with by instance an 21" screen.

Otherwise my answer is always the same in this kind of question.
machine settings is the registry
application settings a xml file, in my case just a dataset.

Cor
I would go along with the method you suggested, i.e create a user
options object and persist it to XML, either in a remote shared
location such as a database or shared folder, or a local directory.

However Cor makes a very valid point in that if options are instance
or display capability dependent, it makes sense to make the get method
intelligent enough so that its return is downgraded to the
capabilities of the machine in question.

Doug Taylor
 
R

RS

Thank you all...
We have a pretty much cosistent closed environment.
Please add to the topic and enrich it
Thank you
MSA
 
R

RS

Thank you all. As for the displays. WE have a closed environment where
each one has the same display size. If that is not an issue, So i
assume serilaizing into XML is the new way to go?
 
R

RS

Thank you all. As for the displays. WE have a closed environment where
each one has the same display size. If that is not an issue, So i
assume serilaizing into XML is the new way to go?
 
D

Doug Taylor

Thank you all...
We have a pretty much cosistent closed environment.
Please add to the topic and enrich it
Thank you
MSA

There isn't a right or wrong answer to this sort of question, it comes
down to what your in house development standards say, then your
analysis of the best approach for current situation and the project
throughout its intended life span.

Yes XML is the flavour at the moment and has many distinct advantages,
particularly used with .Net, but in ten years we may wonder why we
ever did it that way!

Doug Taylor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top