Niclas Hedhman a écrit :
> 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.

Ok! +1

> Cheers
> Niclas
>
>
> On Thu, Dec 8, 2016 at 10:35 PM, Paul Merlin <paulmer...@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.
>>
>>
>>
>
>

Reply via email to