Quoting Rickard Öberg <[email protected]>:
But for the DCI part I would say it's more lightweight to not do
anything at all...
I kinda realized that also, yesterday. :) Not sure how I will react onto this.
Integer is not a role. The roles need to be defined by the context!
So no, you will never have several objects playing the same role.
You can definitely create several roles in the context and have
those integers play them though.
If you want integers playing roles though, most likely they are
simply arguments to the interaction.
Yes, it was an artificial example, of course in real life integers are
not roles, but parameters to the interaction. I guess we have a little
different contexts (not the DCI ones) for this talk, especially since
you have done a lot of more work on DCI.
Let's try with practical example. Let's say we have a role X. Then, we
have object of type Y, which also extends role X. Then we have a
different object Z, which also extends role X. So which object of
those should be mapped for X? They are different instances of object
after all. Should the context know to map one of them to X, and not to
map another to X? Otherwise the latter mapping will overwrite the
former.
This is a question purely arising from reading DCI papers and watching
Streamflow code, it might turn out to be quite irrelevant. :)
Main point now is that SQL-generation uses only "Typeable" from LWDCI
API and its implementations (+ skeletons for mapping types to
interactions) from LWDCI SPI. So now I just wanna push these frameworks
to Maven repo, or OPS4J, so that I could finally push the changes I made
to Qi4j.
You want to bring in a framework just for Typeable? What's the point
of that, compared to duplicating Typeable in your project?
Because I have many other projects using same kind of pattern for
Typeable. Additionally to API interface of Typeable, there are three
very useful classes in SPI, one containing basis for Typeable
implementation, and two for reliable, customizable mapping for each
API type and interaction.
Now, whenever something changes in those three classes, I'd hate to
need to copy changes to all of my projects using this pattern.
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev