On 11-01-12 10:17, Tom Hobbs wrote:

but again I want to keep
the configuration side of things as plain and simple as possible.

I like those configuration classes, where one specifies the intent, and in the end serves as a factory. Partial or completely in fluent style. (in fowler terms: construction builder, method chaining).

You can configure programmatically, with data from the runtime environment, decide at runtime how to configure, and provide multiple configuration builders for different use cases. And you can change the implementation behind it while keeping the API stable.

I tried to make a start with the velocity template, but i think it is better to create a pluggable Configuration class, where you can plugin component.name mapped 'Function' objects. Normalize conventions for the '.name' part. Create Function<T> objects for factories and static config variables.

The ConfigurationBuilder (or configuration construction builder) above can create a Configuration instance in the end. It is possbible that we need to create a few other things as well, but thats easily added.

Gr. Sim

--
QCG, Software voor het MKB, 071-5890970, http://www.qcg.nl
Quality Consultancy Group b.v., Leiderdorp, Kvk Den Haag: 28088397

Reply via email to