MODELING CAUSAL CONNECTIONS BETWEEN OBJECTS

Citation
C. Lundberg et J. Bosch, MODELING CAUSAL CONNECTIONS BETWEEN OBJECTS, Journal of programming languages, 5(1), 1997, pp. 233-258
Citations number
21
ISSN journal
09639306
Volume
5
Issue
1
Year of publication
1997
Pages
233 - 258
Database
ISI
SICI code
0963-9306(1997)5:1<233:MCCBO>2.0.ZU;2-N
Abstract
The conventional object-oriented paradigm provides client-server messa ge passing as the primary means of interaction between objects. Althou gh this is appropriate in situations where one objects requests a serv ice from another object, there are other situations where one object, the observer, depends on state-changes or actions occurring at another object, the target. In those situations, the object-oriented paradigm requires the target object to notify the observer objects, despite th e fact that the target object does not benefit from the interaction. T his inverted interaction scheme leads to problems such as increased co upling and decreased understandability, maintainability and reusabilit y of the resulting classes. In the analysis of object interactions one can identify four roles: the benefitor, the establisher, the sender a nd the receiver. The aforementioned problems result from the fact that in client-server interaction, the benefitor and the sender are not al ways the same object. To address this, we propose the notion of causal connections, an alternative interaction mechanism complementing the t raditional client-server interaction. Two implementations of causal co nnections are described; one in the context of C++ and another using t he layered object model. It is shown that causal connections solve the problems mentioned above.