It is indeed a very interesting question, one that needs thinking and makes me wonder :-) I don't have a strong opinion on this, only some questions. I did not dig deep into the code before writing this so some of my questions may be just wrong, however I hope they can help us going forward.
Will your "hybrid model" refactoring do that @Mixins declarations on auto-added ValueComposite to values not declaring it as a superclass are not ignored anymore ? Still, the mainType has a special meaning. Is the question about the difference between "serialize(mainType)" and "serialize(otherType)" With actual implementation, what is the serialization behavior regarding otherType when doing "serialize(mainType)"? Are Properties of otherType mixed in mainType Properties? Is this what we're talking about if we get mainType and otherType to be treated equal? With actual implementation, what is the serialization behavior of "serialize(otherType)"? How do you see it with mainType and otherType treated equal? What functional changes other than serialization would be brought up by making mainType and otherType treated equal? /Paul Le 19 févr. 2012 à 08:13, Niclas Hedhman a écrit : > Gang, > > I have dug deep into the Qi4j Runtime to "fix" the withTypes() on > assembly declarations to work consistently with the compile time > types. The initial driver for making this work was that @Mixins > declarations on auto-added ValueComposite to values not declaring it > as a superclass are ignored, because the withTypes() are not treated > equal to the main type. The impact is massive, but I take out the > compositeType concept completely and run with a "Iterable<Class<?>> > types" (I should wrap that to CompositeType). > > BUT doing this, something very profound emerges; > > * What is the difference between the "MainType" and "OtherType" > module.values( MainType.class).withTypes( OtherType.class ) > ?? > > In the refactoring I am almost done with, the establishment of the > model is identical. HOWEVER, a lot of assumptions are made everywhere > that "MainType" is of some bigger significance than "OtherType", > especially when it comes to serialization of composites, both for > entity stores as well as indexing. > > > I think this is a massive realization that affects a lot, and the path > forward should be considered. Not only will the amount of API and > documentation changes be massive, but I think it tilts our whole > perception of composite oriented programming. > > > Feedback is greatly appreciated. Meanwhile, I will finish off the > hybrid model where the mainType still has special meaning. > > > Cheers > -- > Niclas Hedhman, Software Developer > http://www.qi4j.org - New Energy for Java > > I live here; http://tinyurl.com/3xugrbk > I work here; http://tinyurl.com/6a2pl4j > I relax here; http://tinyurl.com/2cgsug > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev -- Paul Merlin - eskatos.github.com _______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

