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

Khalid Aljasser*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

7 Scopus citations

Abstract

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.

Original languageEnglish
Pages (from-to)1-15
Number of pages15
JournalComputer Languages, Systems and Structures
Volume45
DOIs
StatePublished - 1 Apr 2016

Bibliographical note

Publisher Copyright:
© 2015 The Authors. Published by Elsevier Ltd.

Keywords

  • Design patterns
  • ParaAJ
  • Parametric aspects
  • Reusability

ASJC Scopus subject areas

  • Software
  • Computer Networks and Communications

Fingerprint

Dive into the research topics of 'Implementing design patterns as parametric aspects using ParaAJ: The case of the singleton, observer, and decorator design patterns'. Together they form a unique fingerprint.

Cite this