In this paper we study how roles can be added to patterns modelling relationships in Object Oriented programming. Relationships can be introduced in programming languages either by reducing them to attributes of the objects which participate in the relationship, or by modelling the relationship itself as a class whose instances have the participants of the relationships among their attributes. However, even if roles have been recognized as an essential component of relationships, also in modelling languages like UML, they have not been introduced in Object Oriented programming when it is necessary to model relationships. Introducing roles allows to add attributes and behaviors to the participants in the relationship, rather than to the relationship itself, and to distinguish the natural types of the participants in the relationships from the roles the participants acquire in the relationships. We show how the role model of the language powerJava can be used to endow the relationship as attribute pattern with roles.

Relationships Meet their Roles in Object Oriented Programming

BALDONI, Matteo;BOELLA, Guido;
2007-01-01

Abstract

In this paper we study how roles can be added to patterns modelling relationships in Object Oriented programming. Relationships can be introduced in programming languages either by reducing them to attributes of the objects which participate in the relationship, or by modelling the relationship itself as a class whose instances have the participants of the relationships among their attributes. However, even if roles have been recognized as an essential component of relationships, also in modelling languages like UML, they have not been introduced in Object Oriented programming when it is necessary to model relationships. Introducing roles allows to add attributes and behaviors to the participants in the relationship, rather than to the relationship itself, and to distinguish the natural types of the participants in the relationships from the roles the participants acquire in the relationships. We show how the role model of the language powerJava can be used to endow the relationship as attribute pattern with roles.
2007
Inglese
contributo
1 - Conferenza
International Symposium on Fundamentals of Software Engineering, FSEN 2007
Tehran, Iran
19-4-2007
Internazionale
Arbab, F. AND Movaghar, A. AND Rutten, J. AND Sirjani, M.
Proc. of the IPM International Symposium on Fundamentals of Software Engineering, FSEN 2007
Comitato scientifico
Springer
Heidelberg
GERMANIA
4767
440
448
9
978-3-540-75697-2
Roles; Relationships; powerJava
LUSSEMBURGO
3 – prodotto con deroga per i casi previsti dal Regolamento (allegherò il modulo al passo 5-Carica)
3
info:eu-repo/semantics/conferenceObject
04-CONTRIBUTO IN ATTI DI CONVEGNO::04A-Conference paper in volume
M. BALDONI; G. BOELLA; L. VAN DER TORRE
273
none
File in questo prodotto:
Non ci sono file associati a questo prodotto.

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2318/28952
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 6
  • ???jsp.display-item.citation.isi??? 5
social impact