I'd like to convert the current implementation of factories and 
resolvers from having
void addXXX(..., List<XXX> xxx);
  to a more query based approach. As by now all of the List<XXX> xxx are 
just created just before the method invocation and then filled it is a 
much simpler approach and has the additonal beauty of idempotence.

So having instead a
List<XXX> createXXX(...);

and use it like List xxx = createXXX();
or in the case that there is already a partially filled list (which I 
didn't encounter by now)
xxx.addAll(createXXX());

the XXX are the models created in the factories, the resolutions in the 
resolvers etc.

When refactoring the code this way it became much clearer and easier to 
read. The createXXX methods are also more easily testable.

What do you think?

Michael

Rickard Öberg schrieb:
> Michael Hunger wrote:
>> A question:
>>
>> Where does the resolution belong to? Is it possible to move the code 
>> into the models or is it really an external resolution that should be 
>> not referred to in the models.
> 
> The general terminology is (as previously described on this list):
> Model - the concept on its own
> Resolution - the concept in the larger context
> Binding - concept with all dependencies between things bound to specific 
> things
> Context - something that can be used to instantiate the Binding
> Instance - live instances
> 
> In this context, how does your question fit in? I'm not entirely sure I 
> understand what you are asking for.
> 
> /Rickard
> 
> _______________________________________________
> qi4j-dev mailing list
> [email protected]
> http://lists.ops4j.org/mailman/listinfo/qi4j-dev


_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev

Reply via email to