Detecting Model View Controller Architectural Layers using Clustering in Mobile Codebases

DragoÅŸ Dobrean, Laura DioÅŸan


Mobile applications are one of the most common software projects written nowadays. The software architectures used for building those type of products heavily impacts their lifecycle as the architectural issues affect the internal quality of a software system hindering its maintainability and extensibility. We are presenting a novel approach, Clustering ARchitecture Layers (CARL), for detecting architectural layers using an automatic method that could represent the first step in the identification and elimination of various architectural smells. Unlike supervised Machine Learning approaches, the involved clustering method does not require any initial training data or modelling phase to set up the detecting system. As a further key of novelty, the method works by considering as codebase’s hybrid features the information inferred from both module dependency graph and the mobile SDKs. Our approach considers and fuses various types of structural as well as lexical dependencies extracted from the codebase, it analyses the types of the components, their methods signatures as well as their properties. Our method is a generic one and can be applied to any presentational applications that use SDKs for building their user interfaces. We assess the effectiveness of our proposed layer detection approach over three public and private codebases of various dimensions and complexities. External and internal clustering metrics were used to evaluate the detection quality, obtaining an Average Accuracy of 77,95%. Moreover, the Precision measure was computed for each layer of the investigated codebase architectures and the average of this metric (over all layers and codebases) is 79,32% while the average Recall on all layers obtained is 75,93%.


Paper Citation