Back to Search Start Over

Detection of Violation of MVVM Design Pattern in Objective-C Programs

Authors :
Wat Wongtanuwat
Twittie Senivongse
Source :
Proceedings of the 8th International Conference on Computer and Communications Management.
Publication Year :
2020
Publisher :
ACM, 2020.

Abstract

In object-oriented software development, several design patterns are used to design software to solve different problems. The Model-View-ViewModel or MVVM pattern is a design pattern that can be used to design structure of software which comprises three components. The Model component holds application data. The View component displays visual elements and controls on the screen. The ViewModel component is the intermediary between the Model and View and transforms model information for display on a view. The advantages of this pattern are that there is a clear separation between domain logic in the Model and the display on the View, and tests and maintenance of different components are facilitated. However, there are several developers in a software development team, and not all developers use the MVVM pattern. This makes the code not compliant with the pattern and affects code maintenance. To help developers to revise the code to comply with the MVVM pattern, this paper has studied the MVVM design pattern, summarized principles of the pattern, and proposed the criteria to detect pattern violation in Objective-C code. An automated tool has been developed to detect MVVM violation and report violation locations in the code so that developers can revise the code to follow the pattern. An experiment shows that the tool performs satisfactorily in pattern violation detection, compared with manual detection, with the precision of 0.81, recall of 0.77, and F1 of 0.79.

Details

Database :
OpenAIRE
Journal :
Proceedings of the 8th International Conference on Computer and Communications Management
Accession number :
edsair.doi...........57fa4e79309d2379fb03ec3c0267fcbd
Full Text :
https://doi.org/10.1145/3411174.3411193