Blueprints/Patterns for managing configuration in large app?

N

nospawn

Hi all,

The scenario is you have a large set of application configuration
settings comming from: ldap, property files etc.

The problem is many sections of your application depend on many
different configuration settings. I am bored of seeing a big fat and
evil global class having the indecent exposure smell that is used from
every point of the application and the "reading configuration
parameters" concern scattered all over.

Any ideas or approaches to address this very problem?

Given that configuration management is more close to a "non-funtional
concern" would it make sense using AspectJ and take the concern out of
the first OO dimension? examples? also would it bring in this case
another problem that configuration management needs another
"non-funtional concern" logging ...

Thanks in advance,
Best Regards,
Giovanni
 
R

Rastislav Komara

Hello,
There are several ways. One of them is use special Class for
Configuration. Its implementation will be responsible for reading and
possibly writing configuration values dependent on key. This
Configuration will use SPI approach to provide variable implementations
of ConfigurationDataSources. This Configuration can be singleton
initialy configured e.g. from xml file where is stored information
about list of providers, strategy for using these providers,
availability of cache etc... The configuration will use special Key
object to identify the value. This key can also identify a primary
resource or hold key tipe information to help make strategic decisions
about source of value.

If U want to use already created solution try
java.util.prefs.Preferences
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top