EBD defined Nokia N800
Feb 12

A common design pattern is to encapsulate application preferences in a singleton class. The class handles persistence, and any other class which wants to access the preferences can just declare the singleton and access away.

This makes me uneasy. It’s a bit too much like we’ve just thought of a polite new euphemism for global variables. So, my question:

Has anyone encountered a real-world scenario where it was necessary or desirable to have multiple application-preference-encapsulating objects instantiated at the same time?

(This is also my early entry for “nerdiest joke-in-the-title of 2007″.)

Tagged: , ,

One Response to “public static Valerie getInstance()”

  1. Tony Finch Says:

    You might use multiple preferences objects to implement virtual server configurations.