A Framework Based on Design Patterns: Implementing UML Association, Aggregation and Composition Relationships in the Context of Model-Driven Code Generation
Manoli Albert (Universidad Politecnica de Valencia, Spain), Marta Ruiz (Universidad Politecnica de Valencia, Spain), Javier Munoz (Universidad Politecnica de Valencia, Spain) and Vincente Pelechano (Universidad Politecnica de Valencia, Spain)
Copyright: © 2007
This chapter proposes a framework based on design patterns to implement UML association, aggregation, and composition relationships. To build the framework, we propose a semantic interpretation of these concepts that avoids the ambiguities introduced by UML. This interpretation is achieved by using a set of properties that allows us to characterize these kinds of relationships. Once the semantics of the relationships have been defined, we propose a framework based on design patterns for the systematic generation of a software representation. The framework is based on the properties that characterize the relationships. It provides a high-quality solution and introduces important benefits with regard to other existing implementation approaches. This work proposes an implementation strategy that defines a set of mappings between the conceptual abstractions and the proposed framework. This strategy enables the automatic instantiation of the framework. Finally, to validate the proposal, we present a C# implementation of a collaboration pattern. Collaboration patterns are analysis patterns constituted by two classes that are related by an association, an aggregation or a composition relationship.