Implementing design patterns as parametric aspects using ParaAJ: The case of the singleton, observer, and decorator design patterns

Implementation of a design pattern can take many forms according to the programming language being used. Most of the literature presents design patterns in their conventional object-oriented implementations. Several other studies show the implementation in aspect-oriented languages such as AspectJ,...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:Computer languages, systems & structures Jg. 45; S. 1 - 15
1. Verfasser: Aljasser, Khalid
Format: Journal Article
Sprache:Englisch
Veröffentlicht: Elsevier Ltd 01.04.2016
Schlagworte:
ISSN:1477-8424, 1873-6866
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
Beschreibung
Zusammenfassung:Implementation of a design pattern can take many forms according to the programming language being used. Most of the literature presents design patterns in their conventional object-oriented implementations. Several other studies show the implementation in aspect-oriented languages such as AspectJ, EOS, and Caesar. In this work, we compare the implementation of three design patterns: singleton, observer, and decorator design patterns in these languages and also discuss the possibility of implementing them in ParaAJ: an extension to the AspectJ language that implements the idea of parametric aspects. We found that ParaAJ helps in making the implementation of the singleton and observer patterns reusable but it fails to help in the decorator case. The problem with the decorator pattern exists because of the current translation mechanism of ParaAJ׳s aspects to normal AspectJ׳s aspects. This opens the door for further work in ParaAJ to better support the idea of parametric aspects. •Implementation of design patterns depends on the language being used.•ParaAJ helps in creating reusable aspects.•Some design patterns can be implemented as reusable aspects in ParaAJ.•ParaAJ simplifies the reuse of design patterns to a single line of code.
Bibliographie:ObjectType-Article-1
SourceType-Scholarly Journals-1
ObjectType-Feature-2
content type line 23
ISSN:1477-8424
1873-6866
DOI:10.1016/j.cl.2015.11.002