Title
An Extensible Compiler For Implementing Software Design Patterns As Concise Language Constructs
Abstract
Design patterns are generic solutions to common programming problems. Design patterns represent a typical example of design reuse. However, implementing design patterns can lead to several problems, such as programming overhead and traceability. Existing research introduced several approaches to alleviate the implementation issues of design patterns. Nevertheless, existing approaches pose different implementation restrictions and require programmers to be aware of how design patterns should be implemented. Such approaches make the source code more prone to faults and defects. In addition, existing design pattern implementation approaches limit programmers to apply specific scenarios of design patterns (e.g. class-level), while other approaches require scattering implementation code snippets throughout the program. Such restrictions negatively impact understanding, tracing, or reusing design patterns. In this paper, we propose a novel approach to support the implementation of software design patterns as an extensible Java compiler. Our approach allows developers to use concise, easy-to-use language constructs to apply design patterns in their code. In addition, our approach allows the application of design patterns in different scenarios. We illustrate our approach using three commonly used design patterns, namely Singleton, Observer and Decorator. We show, through illustrative examples, how our design pattern constructs can significantly simplify implementing design patterns in a flexible, reusable and traceable manner. Moreover, our design pattern constructs allow class-level and instance-level implementations of design patterns.
Year
DOI
Venue
2021
10.1142/S0218194021500327
INTERNATIONAL JOURNAL OF SOFTWARE ENGINEERING AND KNOWLEDGE ENGINEERING
Keywords
DocType
Volume
Design patterns, singleton, observer, decorator, aspect-oriented programming, extensible compiler, Polyglot, abc
Journal
31
Issue
ISSN
Citations 
07
0218-1940
0
PageRank 
References 
Authors
0.34
0
3
Name
Order
Citations
PageRank
Taher Ahmed Ghaleb100.68
khalid aljasser201.01
Musab AlTurki31049.80