In this paper we present a new vision in object oriented programming languages where the objects' attributes and operations depend on who is interacting with them. This vision is based on a new definition of the notion of role, which is inspired to the concept of affordance as developed in cognitive science. The current vision of objects considers attributes and operations as being objective and independent from the interaction. In contrast, in our model interaction with an object always passes through a role played by another object manipulating it. The advantage is that roles allow to define operations whose behavior changes depending on the role and the requirements it imposes, and to define session aware interaction, where the role maintains the state of the interaction with an object. Finally, we discuss how roles as affordances can be introduced in Java, building on our language powerJava.
File in questo prodotto:
Non ci sono file associati a questo prodotto.