473,249 Members | 1,448 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,249 software developers and data experts.

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

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
6 1527
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Joshua Beall | last post by:
Hi All, What is the best way to use a cookie to remember a logged in user? Would you store the username and password in two separate cookies? Should the password be plain text? Hashed? Not...
136
by: Matt Kruse | last post by:
http://www.JavascriptToolbox.com/bestpractices/ I started writing this up as a guide for some people who were looking for general tips on how to do things the 'right way' with Javascript. Their...
41
by: Mountain Bikn' Guy | last post by:
What is the current preferred way to save user preferences in dotnet? Is the registry the right place to do this? Can anyone recommend a good article (or book) for this topic? Thanks.
11
by: Tom | last post by:
I am planning on adding a Preferences form to my application and using the Property Grid to display the preferences to the user. What do you think would be the best way to save these preferences...
5
by: BK | last post by:
We've got a fairly large scale development process under way in .NET 2003. We are about a month away from go-live for phase 1, second phase is rather short and all work should be completed in the...
6
by: The Colonel | last post by:
In a .vb class function, can I assign user-specific information (e.g. First Name, Role, etc.) to local variables (as opposed to referring to the session variable multiple times)?
9
by: david | last post by:
I have a class with some business-logic and with every roundtrip, I need an instance of this class, so I have to create it, every time again. That doesn't seem very efficient. I thought it would...
7
by: Steve | last post by:
I am building an object library for tables in a database. What is the best practice for creating objects like this? For example, say I have the following tables in my database: User: - Id -...
3
by: at_the_gonq | last post by:
Hello, I am hoping to get some guidance on the following scenerio: I have a password protected site where users have various permissions. Are sessions the best way of storing the user's id? ...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.