Refactoring Swift: A Catalog of 10 Essential Practices for Code Improvement
Journal of Software: Evolution and Process · 2026-11 · 38 (11)
DOI: 10.1002/smr.70180 ↗Kurz gefasst
Fachartikel in der Zeitschrift Journal of Software: Evolution and Process, online erschienen am 11.11.2026. Verfasst von Mohamed Rafat und 2 weiteren Autor:innen. Die Arbeit nennt 31 Literaturangaben.
Abstract (Originalsprache)
Code refactoring is crucial for maintaining a clean and efficient codebase, thereby enhancing readability, reducing complexity, and improving maintainability. Refactoring catalogs provide a grouping of frequent and crucial refactorings, making available reusable solutions to recurring problems. Despite its popularity, Swift lacks such a standardized resource. Furthermore, Swift code undergoes frequent updates due to the rapid pace associated with mobile application development. This practice necessitates refactoring to maintain code quality. However, the lack of a standardized resource for refactoring leads to inconsistent, ad hoc practices among developers, potentially resulting in more harm than good. This paper addresses this gap by introducing a Swift‐specific refactoring catalog derived from an empirical analysis of 10 popular open‐source Swift repositories. Through this analysis, we identified and documented the most essential recurrent refactoring types that leverage Swift‐specific features, such as protocols and extensions. Each entry in the catalog is presented in a structured format: a clear problem context, a step‐by‐step solution, and a “before‐and‐after” code example, supplemented by design diagrams. We validated the proposed catalog through an exploratory expert survey with 16 Swift developers. The results strongly confirm the catalog's value. The expert panel validated the importance, clarity, and significance of the presented refactorings and confirmed a broad consensus on their effectiveness and value in enhancing overall code quality. This work provides a practical, validated resource to help Swift developers improve code quality and maintainability.
Zitieren
APA
Rafat, M., El‐Ramly, M., & Zaid, L. A. (2026). Refactoring Swift: A Catalog of 10 Essential Practices for Code Improvement. Journal of Software: Evolution and Process, 38(11). https://doi.org/10.1002/smr.70180
Vancouver
Rafat M, El‐Ramly M, Zaid LA. Refactoring Swift: A Catalog of 10 Essential Practices for Code Improvement. Journal of Software: Evolution and Process. 2026;38(11). doi:10.1002/smr.70180
BibTeX
@article{Rafat2026,
author = {Rafat, Mohamed and El‐Ramly, Mohammed and Zaid, Lamia Abo},
title = {Refactoring Swift: A Catalog of 10 Essential Practices for Code Improvement},
journal = {Journal of Software: Evolution and Process},
year = {2026},
volume = {38},
number = {11},
doi = {10.1002/smr.70180}
}
EUVIMED