Configuration or DSL
I have already mentioned that, in my opinion, configuration is often the result of a lack of design. In other words we introduce configuration as a substitute for a design decision. There are some cases however when it is desirable to make things configurable. For example, when a software vendor needs to enable clients to plug in custom behaviour without a restart of their system.
I would contend this is a rare scenario and that in most cases injection of dependency addresses the actual need (think assembly with Spring for instance).
I imagine cases when that is not enough and I was wondering at what point does the configuration parameters start to form a DSL. I was also wondering when it becomes more efficient to create a DSL to program the adaptation to local conditions. An initial guideline could be that it is as soon as you thing of storing the configuration in an XML document.
What is your take ? Does it help to rethink configuration as a DSL ? What is your experience ?
