Smart props - DONE » History » Version 3
Henning Blohm, 07.12.2013 18:12
1 | 1 | Henning Blohm | h1. Smart Props |
---|---|---|---|
2 | |||
3 | The goal of this concept is to provide facilities to simplify sharing of component configuration while still being able to query resolved component configuration efficiently and with minimal resource usage. |
||
4 | |||
5 | h2. Design Draft |
||
6 | |||
7 | What we aim for is an extended _properties_ format that allows declarative inclusion of other component's configuration and the use of some expression language style substitution of vaiables. In other words, we strive for the use of a template processing language. |
||
8 | |||
9 | To extend this further, component declarations may indicate their template style via some "Shebang":http://de.wikipedia.org/wiki/Shebang, the default being *java.util.Properties*. |
||
10 | |||
11 | For example: |
||
12 | |||
13 | <pre> |
||
14 | 2 | Henning Blohm | #!com.zfabrik.components/velocityConfig |
15 | # |
||
16 | 1 | Henning Blohm | com.zfabrik.component.type=com.zfabrik.java |
17 | |||
18 | #parse('mymodule/spring_template') |
||
19 | |||
20 | java.privateReferences=,\ |
||
21 | ${java_private_references},\ |
||
22 | 3 | Henning Blohm | someotherref |
23 | 1 | Henning Blohm | </pre> |
24 | |||
25 | h2. Configuration Resolution Constraints |
||
26 | |||
27 | Resolution of component configuration has certain practical bootstrapping limits due to when it is expected to happen (and what capabilities are available at that time). For example, the velocity engine may not depend on components that use velocity-based configuration formulation. |
||
28 | |||
29 | Even more so, a repository that uses velocity-formulated component configurations may not be added to the system before the capability is known. But a repository providing the capability may make use of it. |