[Yanel-dev] Resource configuration parameters: Differentiating between Development, Testing, Staging and Production

Michael Wechner michael.wechner at wyona.com
Tue Oct 11 21:47:19 CEST 2011


Hi

Based on some other work it occured to me that it would be nice if one 
could easily differentiate configuration parameters for various 
scenarios/environments, e.g. Development, Testing, Staging and Production.

The Yanel configuration itself already provides "local" configuration 
files, but in the case of resource configurations this is not the case, e.g.

src/realms/yanel-website/res-configs-repo/data/en/contact.html.yanel-rc

and in particular a parameter like

<yanel:property name="to" value="contact at wyona.com"/>

needs to be changed for development or testing. At the moment one has to 
keep editing these files
with the risk to use a value actually intended for another 
scenario/environment and hence creating errors.

I think we could solve this problem in a very elegant way by introducing 
an attribute, e.g.

<yanel:property name="to" value="contact at wyona.com" env="production"/>
<yanel:property name="to" value="michael.wechner at wyona.com" 
env="development"/>

whereas inside

WEB-INF/classes/yanel.xml

the scenario/environment could be set globally, e.g. production or 
development or whatever and based on
that the right value selected.

WDYT?

Thanks

Michael




More information about the Yanel-development mailing list