aspose file tools*
The moose likes OO, Patterns, UML and Refactoring and the fly likes Preference Manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Bookmark "Preference Manager" Watch "Preference Manager" New topic
Author

Preference Manager

Vis Deo
Ranch Hand

Joined: Jul 02, 2004
Posts: 41
We come across many Prefrences that are managed within application, OS level, windows, MAC, handheld devices. Can any one point me - different design patterns, ideas to design Preference Manager.

Some of the things it should do
Some preferences are by deafult assigned,
Some preferences are subscription based,

What is the best underlying data structure to store these preferences?
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
Do you have any design ideas yourself? If so, please share them.

Before you can efficiently design something, you need to have requirements and/or specifications. Do you have any of these?
Vis Deo
Ranch Hand

Joined: Jul 02, 2004
Posts: 41
Simplest solution can be xml based per user.
Define schema for different types of preferences

If I am designing preference manager for Internet option,
Default browser, size, default site to open, pop up blocker etc can be required preferences,
Subsciption based preferences may be allowed sites, user can be asked to subscribe for allowed sites..

Irrespesctive of the requirements, I would like to understand best way of storing the preferences and retrival using Java.

If you have to design preference Manager for Internet Options - what are different types to design?

One part of it is storing preferences per user, that is going to be simple
Difficult part would be Providing new preferences on Fly. Let's say x Company has y applications and each applications is allowing 1-n number of preferences to set. Preference Manager sould allow to save these preferences. Also new application comes up and Preference manager should allow to provide preferences for this new application with no code changes.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18911
    
    8

Vis Deo wrote:Simplest solution can be xml based per user.

Stop right there. If you don't have any requirements yet, it's too early to decide how you're going to store the preferences.
Irrespesctive of the requirements, I would like to understand best way of storing the preferences and retrival using Java.

Nope. There is no "best" way until you have some requirements to guide your choice.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Preference Manager