Because that's a dependency that I'd rather avoid. The VerityController is an independent object I wrote months ago and it has no external dependencies at all. I know that ColdSpring makes managing dependencies easier, but where I can allow the argument value to BE the dependency and not require an internal dependency between objects I think, at least under some circumstances, I can build a more robust system out of non-coupled objects. In a simple system like this it's no big deal, really... but in a large system with many separate libraries, it seems to me that being able to allow the framework to handle dependency down to the argument level could be a huge boon.

That's my rationale, anyway. How much merit it has remains to be seen...

Laterz,
J


------------------------------------------------

Jared C. Rypka-Hauer

Continuum Media Group LLC

http://www.web-relevant.com

Member, Team Macromedia - ColdFusion


"That which does not kill me makes me stranger." - Yonah Schmeidler


On Apr 21, 2006, at 1:03 PM, Sean Corfield wrote:

On 4/20/06, Jared Rypka-Hauer <[EMAIL PROTECTED]> wrote:
<bean id="Verity" class="model.util.VerityController" singleton="true">
        <constructor-arg name="collection">
                <value>${Constants.get("verityCollection")}</value>
        </constructor-arg>
</bean>
<bean id="Constants" class="model.util.Collection" singleton="true">
        <constructor-arg name="values">
                <map>
                        <entry key="verityCollection">
                                <value>ci</value>
                        </entry>
                </map>
        </constructor-arg>
</bean>

Why not just inject the Constants bean into the Verity controller bean
and let it call get("verityCollection") ?
--
Sean A Corfield -- http://corfield.org/
Got frameworks?

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood


Reply via email to