jQuery in Action, 3rd edition
The moose likes Java in General and the fly likes Properties vs. Preferences Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Properties vs. Preferences" Watch "Properties vs. Preferences" New topic

Properties vs. Preferences

Tim Lovern

Joined: Dec 11, 2002
Posts: 11
I am trying to understand, or at least gain some insight, on when to use properties and when to use preferences.
I'm drawn to the fact that preferences is set up to use XML. Plus the backing store can be LDAP, or whatever.
However, it seems that it is more complex to set up and there are more things to code for than using properties.
Does anyone have any insight, or experiences with both that they are willing to share?
We need to determine what the standard will be within our organization. (I'm involved in the first JAVA project for our company.) The decisions I make now will impact future development, so I'd like to get it reasonbly right so that we won't refactor it into a completely different design when all is said and done.
Thanks in advance!
Joel McNary

Joined: Aug 20, 2001
Posts: 1824

I am just starting to look at the Preferences API, so I don't quite know what to make of it. It looks like the way to go, and in a couple of months I will almost certainly be using it. Properties has the advantage of being smaller and easier to understand, but for future heavy development, I would suggest using Preferences.

Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580
Preferences is only available since 1.4 If you're using 1.4 I would use preferences. I believe Preferences is supposed to supercede Properties. It is much more powerful and really not difficult to use.
Big D.
I agree. Here's the link: http://aspose.com/file-tools
subject: Properties vs. Preferences
It's not a secret anymore!