Howard,

On Sun, 6 Feb 2005 09:39:06 -0500, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> This has been something people would like ... leverage most of the
> logic of BuilderFactory, but allow it to build simply POJOs. �In fact,
> I think people want a <bean> element at the same level of
> <service-point>.
>

Something like a <bean> would be great! I think the dependency
injection logic should even be leveraged to the level where it can be
used programatically to autowire "anonymous" beans. �This programatic
interface (maybe as simple as one or two methods) could be exposed by
the Module where it can be conveniently used by service and
interceptor factories.

> To my mind, a <bean> is like a <service-point> except:
> - No choice on the "factory"
> - No interceptors
> - Equivalent to the "primitive" service-model (create on first
> reference, cache forever)
>

Could a <bean> possibly serve as the implementation of a
<service-point> (provided it implements the service interface). Maybe
even as the implementation of multiple service points?

> Given the split between BuilderFactory and BuilderFactoryLogic, it
> should be simple to re-use the BuilderFactory code for creating POJOs.
>

Indeed. I think there are still a few pieces in the
BuilderFactoryLogic which are specific to the BuilderFactory, so maybe
we should split out a DependencyInjectionLogic class with methods for
constructor based and setter based injection.

> Q: Do we want beans to be able to register for events? Can't see why not.
>

Why not?

> Part of this would be to provide an ObjectProvider.
>
> I would say the correct prefix would be "bean:". �There's already a
> "bean:" prrovided by the hivemind library (and based on the
> BeanFactory service). �Although it would break backwards
> compatibility, I would like to re-appropriate the "bean:" prefix to
> reference <bean> elements.
>
> BTW ... I wish I had called "BuilderFactory" something else, say
> "DependencyInjectionFactory" or some-such. �The terminology, DI, came
> a bit later.
>

We could make the BuilderFactory deprecated. HiveMind would then spit
out warnings at load time referring to the DependencyInjectionFactory.

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to