|
From: Martin K. <Mar...@St...> - 2005-02-22 17:24:18
|
Hi Andy,
> If Spring wanted to automate this "extension point" mechanism such as it
> exists in our project, it could provide something like this:
>
> <bean id="modelManager" class="...">
> <property name="modelSources"
> extension-point="com.mypackage.ModelSource"/>
> </bean>
>
> Which would automatically build a collection by gathering all beans that
> implement the specified interface and injecting the collection into the
> "modelSources" property.
Thats an nice idea. But you have to name the contribution. Also
refactoring the DefaultXmlBeanDefinitionParser I have learned,
that all which is needed is to add another parser to support
extensions.
Currently I am thinking of a more extense usage of the extension
point mechanism, quite like Eclipse offers.
<contribution extension-point="ep">
<any tag you want>
</contribution>
The idea is to flexiblize the contribution process. The question is what
the dtd says to it.
In Eclipse there is some kine of rule:
If you dont apply to the extension point policy, then we will ignore you.
That would make the whole thing more contributional like. So you can
describe contributions by not adding any class.
(which makes sometimes a lot of scence). Also it should be possible
to contribute in any description as you would like. There should be
support for the default way to inject bean dependencies. But maybe
I have to leave this task to extension-point stakeholder until I know
for sure.
But back on refactoring. It makes fun but I can not run test cases.
I am starting to get nervous. :-)
Cheers,
Martin (Kersten)
|