Generative software product line development using variability-aware design patterns. (June 2017) - Seidl, Christoph; Schuster, Sven; Schaefer, Ina
Abstract: Software Product Lines (SPLs) are an approach to reuse in-the-large that models a set of closely related software systems in terms of commonalities and variabilities. Design patterns are best practices for addressing recurring design problems in object-oriented source code. In the practice of implementing SPL, instances of certain design patterns are employed to handle variability, which makes these "variability-aware design patterns" a best practice for SPL design. However, currently there is no dedicated method for proactively developing SPLs using design patterns suitable for realizing variable functionality. In this paper, we present a method to perform generative SPL development with design patterns. We use role models to capture design patterns and their relation to a variability model. We further allow mapping of individual design pattern roles to (parts of) implementation elements to be generated (e.g., classes, methods) and check the conformance of the realization with the specification of the pattern. We provide definitions for the variability-aware versions of the design patterns Observer, Strategy, Template Method and Composite . Furthermore, we support generation of realizations in Java, C++ and UML class diagrams utilizing annotative, compositional and transformational variability realization mechanisms. Hence, we support proactive development of SPLs using design patterns to apply best practices for the realization of variability. We realize our concepts within the Eclipse IDE and demonstrate them within a case study. Abstract : Highlights: Use of design patterns in Software Product Lines to realize different features. Variability-aware design patterns Observer, Strategy, Template Method and Composite. Technology neutral specification and validity checks using role modeling. Generative model-based implementation for Java, C++ and UML class diagrams. Support for variability with Antenna, preprocessor, FOP, DeltaJ, DeltaEcore.