Capturing and Exploiting Design Pattern Variability in Mobile Application Generation

Software Engineering

Summary

The authors focus on improving automatically generated mobile app code by making sure it follows good design rules. They use a special language called UVL to map different ways common design patterns (like Singleton or Observer) can vary. Then, they connect these models to code templates to automatically generate Swift code that fits those patterns well. Their method treats design patterns like customizable building blocks, making it easier to create maintainable and reusable apps. They also study how complex the choices are when configuring these patterns.

Authors

Ramón Peralta, Jose-Miguel Horcas

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.