A Comparison of Architectural Patterns for Testability and Performance Quality for iOS Mobile Applications Development

Hannelore Magics-Verkman, Doina Rodica Zmaranda, Cornelia Aurora Győrödi, Robert Ștefan Győrödi · 2023

The first step in the design of a mobile application consists in the selection of the architecture according to the field to which the application is addressed, its characteristics and functionalities, the need for scalability or for customization in the future. Many architectural patterns are available in present but there are few empirical data that support a specific choice; therefore, this paper makes a practical thorough analysis of three of the existing architectural patterns in order to prove which of them is better to be used in iOS mobile applications development. The three architectures compared in this study are Model-View-Controller (MVC), which is Apple's recommended architecture and is also the oldest and most widely used one; Model-View-ViewModel (MVVM), which comes as a solution to the limitations of MVC; Model-View-Intent (MVI) which is used together with SwiftUI and a state machine, to achieve a reactive application considering current trends to this style of programming. Analysis of the resulting performance and testability was done by developing a case-study application in each of these three architectures. For assuring an objective comparison, performance benchmarks have been executed to monitor the memory and CPU. Aside from the performance, testability represents another key point which is analysed in the paper, by using the metrics represented by the amount of code required to implement testing the core functionalities of the application and test coverage. Finally, some conclusions that show which architectural pattern is most suitable for the iOS development were drawn.

Read the paper · More papers on PaperTik