By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,584 Members | 1,750 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,584 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Nov 21 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
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
Nov 21 '05 #2

P: n/a
On Thu, 12 May 2005 15:20:36 +0200, "Cor Ligthert"
<no************@planet.nl> wrote:
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

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

Nov 21 '05 #3

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

Nov 21 '05 #4

P: n/a
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?

Nov 21 '05 #5

P: n/a
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?

Nov 21 '05 #6

P: n/a
On 12 May 2005 10:08:04 -0700, "RS" <lo**********@gmail.com> wrote:
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
Nov 21 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.