473,399 Members | 2,858 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,399 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 1532
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? ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.