polygene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Niclas Hedhman <nic...@hedhman.org>
Subject Re: SPI or @Structure
Date Fri, 09 Dec 2016 00:42:21 GMT
That is why I have replace "Module" with the injection of the factories,
which I think is the appropriate pattern.

Otherwise, we should then say, why doesn't Module implement the TypeLookup
and EntityStore methods and "delegate all the nifty details to the
corresponding services/factories". I prefer consistency.

Cheers
Niclas


On Thu, Dec 8, 2016 at 10:35 PM, Paul Merlin <paulmerlin@apache.org> wrote:

> Niclas Hedhman a écrit :
> > Ok,
> > should we then stop having Module extends XyzFactory, and they are
> obtained
> > likewise? Just in case we in future want some other mechanism for the
> > XyzFactory types, and not depend on the entire Module.
> >
> > I think so, as it then becomes more symmetrical and it is not relevant
> that
> > ModuleInstance implements ValueBuilderFactory at the moment.
>
> This would mean that we won't anymore be able to:
>
>   module.newTransient(..)
>
> and that we would have to:
>
>   module.transientBuilderFactory().newTransient(..)
>
> These shortcuts are pretty convenient IMO.
>
> But, yes, ModuleInstance should delegate all the nifty details to the
> corresponding services/factories. Right now it contains way too much
> implementation details of each of these factories.
>
>
>


-- 
Niclas Hedhman, Software Developer
http://zest.apache.org - New Energy for Java

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message