[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Mailprobe-devel] MailProbe to Spring's Inversion of Control (IoC) conve
From: |
Sami Dalouche |
Subject: |
[Mailprobe-devel] MailProbe to Spring's Inversion of Control (IoC) conversion |
Date: |
Sun, 06 Feb 2005 13:43:48 +0100 |
Hey,
here's a message I posted to Spring.Net's forum.
http://forum.springframework.net/viewtopic.php?p=208#208
Sami Dalouche
--
Hi springers !
I'm currently converting parts of MailProbe's code
(https://savannah.nongnu.org/projects/mailprobe/) that uses Factories to
Spring's Inversion of Control (IoC).
In order to achive full decoupling of software components, I'd like all
configuration settings to be described in Spring's XML file. However,
what's the best way to specify variables in the config file that will be
expanded ?
For example, my code currently contains :
String fileName= ConfigurationSingleton.Instance()["DB4oFileName"];
and the ConfigurationSingleton will check some XML file for the
<DB4oFileName>{env.home}/.MailProbe/DB4o.db</DB4oFileName>
parameter then expand {env.home} to either $HOME or $USERPROFILE
depending on the running Operating System.
To you, what would be the "good way" of converting this part to IoC ?
I was thinking about having Spring call the init() method, that will
then expand the variables. (well, actually using another component:
IEnvEvaluator to do the job, the exact IEnvEvaluator implementation
being setup by Spring)..
What do you think ?
Thanks for your help
Sami Dalouche
----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Mailprobe-devel] MailProbe to Spring's Inversion of Control (IoC) conversion,
Sami Dalouche <=