Java Properties Purgatory Part 1
Introduction
Application configuration deserves careful designperhaps even more than application code. Unfortunately, the lion's share of effort, planning, and tool development goes into making code clean and elegantwith configuration and deployment left as an afterthought.
In Java, configuration often takes the form of properties. Although properties are better than nothing, using them in an ad hoc way leads to components that are unnecessarily difficult to deploy, maintain, and reuse. Part 1 of this article will do the following:
Explain how properties and property files are used
Introduce the key issues to consider when designing a component configuration interface (CCI)
Point out the weaknesses of the property-based CCIs for JNDI, RMI, and security
In Part 2, I'll do the following:
Introduce XML as a configuration option
Examine the weaknesses of current XML CCIs: the preferences API and J2EE container configuration
Propose a fresh start with a common CCI architecture for all Java components