software engineering

Capturing and Exploiting Design Pattern Variability in Mobile Application Generation

arXiv:2607.15099

Abstract

The increasing reliance on automatic code generation in mobile application development often leads to code that neglects fundamental design principles and architectural quality. In this work, we address this challenge by capturing and exploiting the inherent variability of software design patterns to systematically generate customizable and well-structured mobile applications. We propose the use of the Universal Variability Language (UVL) to explicitly model the structural and behavioral variation points of common design patterns, such as Singleton, Strategy, Observer, Adapter, and Factory Method. These models are integrated with reusable Jinja templates, enabling code generation in Swift. Our approach leverages Software Product Line (SPL) engineering principles, treating design patterns as configurable assets within a product line and supporting automated generation of custom design patterns. We also analyze the configuration space of the modeled patterns, offering insights into their variability complexity. By formalizing design pattern variability and embedding it into the generation process, our work bridges model-driven engineering with practical mobile development, promoting the production of maintainable, reusable, and architecturally sound applications.

Research paper presented as a Master's Thesis for the MSc in Advanced Software Technologies for Mobile Devices, Universidad San Jorge (Spain), September 2025

Topics & keywords

#design patterns#variability modeling#model-driven engineering#code generation#mobile applications#software product linesUniversal Variability LanguageJinja templatesSwiftsoftware product linedesign pattern variabilitymodel-driven code generation