[en] 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.
Disciplines :
Computer science
Identifiers :
UNILU:UL-CONFERENCE-2009-126
Author, co-author :
Baldoni, Matteo
Boella, Guido
VAN DER TORRE, Leon ; University of Luxembourg > Faculty of Science, Technology and Communication (FSTC) > Computer Science and Communications Research Unit (CSC)
External co-authors :
yes
Language :
English
Title :
Interaction among objects via roles: sessions and affordances in powerJava
Publication date :
2006
Event name :
Procs. of Principles and Practice of Programming in Java (PPPJ'06)
Event date :
2006
Audience :
International
Journal title :
Proceedings of Principles and Practice of Programming in Java (PPPJ'06)