Niclas Hedhman wrote:
Also, since
usually the implementation will be to handle aggregated state the only thing
you'd want to do with it is to create Concerns that catch create() and
remove(), and then do the buildup/cleanup. By allowing mixins to implement
it directly I think both of these things become much cleaner to implement.
Not totally sure what you mean here...
If the main purpose of the create/remove hooks is to build up aggregated
state and then remove it, then currently the best way to do that is to
implement Concerns, as you may have several mixins in an Entity that
needs to do it (i.e. you can't implement it as a mixin because then that
mixin would override all others). So when implementing a mixin needing
buildup/cleanup you also have to implement a Concern.
If LifeCycle is like initializable, meaning, any mixin can implement it,
then all code goes into the mixin and there's no need to add a Concern
for it. Which seems like a good thing IMO.
/Rickard
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev