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 Thu, 08 Dec 2016 13:44:28 GMT
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.


Niclas

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

> Niclas Hedhman a écrit :
> > The org.apache.zest.spi.module.ModuleSpi contains access methods to a
> bunch
> > of useful SPI internals, such as EntityStore, TypeLookup and more.
> >
> > Should we not just kill this class and provide that via @Structure
> > injection, since that is what we do with factories (and ServiceFinder?)
> >
> > If not, shouldn't then everything be moved to the Module or ModuleSpi as
> > methods, instead of injectable types?
> >
> > WDYT?
>
> Everything in ModuleSpi but TypeLookup is a service and is already
> injectable using @Service. And in fact, TypeLookup is already accessible
> from Module.
>
> So, +1 from me to ditch ModuleSpi.
>
> I'm not sure about moving them all to Module or only providing them
> through @Service injection.I find it pretty convenient to be able to
> access these base services from a Module, without having a dozen of
> injections.
>
>
>


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

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