Cast of Behavior
----------------
Key: QI-152
URL: http://issues.ops4j.org/jira/browse/QI-152
Project: Qi4j
Issue Type: New Feature
Reporter: Niclas Hedhman
Assignee: Rickard Öberg
Fix For: 1.0
It has occurred to us during the development of Qi4j, that objects are not
simply state + behavior. The Behavior bit is very much related to the
surrounding context, and the context more or less mandates the behavioral
contract. For instance; In a CleanRoom there are behavioral constraints on all
persons and other things entering such environment. From the CleanRoom
context's point of view, it doesn't care WHAT is coming in, only HOW it must
behave. And from a Person object's perspective, it should always walk around
being a CleanRoomable instance, it should 'learn' that later. In Qi4j we would
like to be able to "cast" the Person into a CleanRoomable instance, and by
doing so creating a Composite that implements CleanRoomable and using the
Person as the state and internal behavior.
This topic has been discussed much in the past, and it is especially in
relation with Entity this becomes really complicated. If the CleanRoomable in
the above example needs extra state, then how is this going to be preserved
over the life-time of the object, without the object always carrying that data
with it.
Further discussion is needed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
qi4j-dev mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/qi4j-dev