A Hybrid Approach to MVC Architectural Layers Analysis

: Mobile applications have become one of the most important means of interacting with businesses, getting information, or accessing entertainment and news for the vast majority of the people, especially for the young generations. How those applications are being built, heavily influences their lifecycle, costs, and product roadmap, that is why software architecture plays a very important role as it affects the maintainability and extensibility of those products. We are presenting a novel automatic approach for detecting MVC architectural layers from mobile codebases that combines an unsupervised Machine Learning algorithm and a classic static analysis. Our proposal does not require any prior training stage or datasets since it does not rely on apriori annotated codebases. As another key of novelty, it uses the information obtained from the mobile SDKs for enhancing the detection process. The validation of our proposal is done in eight different sized codebases that operate in various domains and come from either open-source projects as well as closed-source ones. The performance of the detection quality is measured by the accuracy of the system, as we compared to a manually constructed ground truth, achieving an average accuracy of 85% on all the analysed codebases. Our proposal provides a viable hybrid approach for detecting architectural layers from mobile codebases achieving good results by providing the accurate detection of the layers using a deterministic step and great flexibility for being used on other architectural patterns via the non-deterministic step. Furthermore, we con-sider our approach as being valuable to students or beginners because it could provide insightful information on how the code should be structured and help them to respect architectural guidelines in real-world projects.

[1]  Emden R. Gansner,et al.  Bunch: a clustering tool for the recovery and maintenance of software system structures , 1999, Proceedings IEEE International Conference on Software Maintenance - 1999 (ICSM'99). 'Software Maintenance for Business Change' (Cat. No.99CB36360).

[2]  Matthias Galster,et al.  What Makes Teaching Software Architecture Difficult? , 2016, 2016 IEEE/ACM 38th International Conference on Software Engineering Companion (ICSE-C).

[3]  Naouel Moha,et al.  An exploratory study of MVC-based architectural patterns in Android apps , 2019, SAC.

[4]  Zheng Li,et al.  Using Public and Free Platform-as-a-Service (PaaS) based Lightweight Projects for Software Architecture Education , 2020, 2020 IEEE/ACM 42nd International Conference on Software Engineering: Software Engineering Education and Training (ICSE-SEET).

[5]  Giuseppe Scanniello,et al.  Weighing lexical information for software clustering in the context of architecture recovery , 2015, Empirical Software Engineering.

[6]  Sloan Kelly,et al.  Model View Controller , 2016 .

[7]  Dragos Dobrean,et al.  Model View Controller in iOS mobile applications development , 2019, SEKE.

[8]  Jitender Kumar Chhabra,et al.  Software Remodularization by Estimating Structural and Conceptual Relations Among Classes and Using Hierarchical Clustering , 2017 .

[9]  Fionn Murtagh,et al.  A Survey of Recent Advances in Hierarchical Clustering Algorithms , 1983, Comput. J..

[10]  Dragoş Dobrean,et al.  Automatic Examining of Software Architectures on Mobile Applications Codebases , 2019, 2019 IEEE International Conference on Software Maintenance and Evolution (ICSME).

[11]  Nenad Medvidovic,et al.  Enhancing architectural recovery using concerns , 2011, 2011 26th IEEE/ACM International Conference on Automated Software Engineering (ASE 2011).

[12]  Spiros Mancoridis,et al.  On the evaluation of the Bunch search-based software modularization algorithm , 2007, Soft Comput..

[13]  Anna-Lan Huang,et al.  Similarity Measures for Text Document Clustering , 2008 .

[14]  Vladimir I. Levenshtein,et al.  Binary codes capable of correcting deletions, insertions, and reversals , 1965 .

[15]  Dragos Dobrean,et al.  Detecting Model View Controller Architectural Layers using Clustering in Mobile Codebases , 2020, ICSOFT.

[16]  Derek Rayside,et al.  Comparing Software Architecture Recovery Techniques Using Accurate Dependencies , 2015, 2015 IEEE/ACM 37th IEEE International Conference on Software Engineering.

[17]  Nicolas Anquetil,et al.  Recovering software architecture from the names of source files , 1999, J. Softw. Maintenance Res. Pract..

[18]  Dragos Dobrean,et al.  An Analysis System for Mobile Applications MVC Software Architectures , 2019, ICSOFT.

[19]  Donald W. Bouldin,et al.  A Cluster Separation Measure , 1979, IEEE Transactions on Pattern Analysis and Machine Intelligence.

[20]  P. Rousseeuw Silhouettes: a graphical aid to the interpretation and validation of cluster analysis , 1987 .