Interfaces are recognized as an important mechanism to define contracts governing interactions between semi-independent software modules. Well-designed interfaces significantly reduce software complexity and ease maintainability by fostering modularization, hiding implementation details and minimizing the impact caused by changes in the software implementation. However, designing good interfaces is not a trivial task. The presence of interface design defects often yield increased development cost, lower code quality and reduced development productivity. Despite their importance, currently there are only a few research efforts that investigate the quality of interface design. In this paper, we identify and characterize common interface design anomalies and illustrate them via examples taken from well-known open source applications. In order to quantify the presence of interface design anomalies and estimate their impact on the interface design quality, as well on the software quality attributes, such as maintainability, we conduct an empirical study covering 9 open source projects. Building on our empirical results, we develop a set of recommendations to improve interface design.
Boxall and Araban define a set of primitive counter metrics to measure the complexity and usage of interfaces @cite_9 . Their metrics return the number of interface methods, all arguments of the interface methods, the interface client classes, The authors in @cite_16 define more complex metrics that assess the interface design quality with regard to existing similarities among software interfaces, and with regard to the redundancy in interfaces hierarchies.
@cite_9 @cite_16
2101519029 182787266
Component-based software development relies on reusable components in order to improve quality and flexibility of products as well as increasing development productivity. This paradigm promotes deployment of reusable components as black-box units that can only work and communicate with one another through their well defined interfaces. Here, understandability of component interfaces is considered as a major quality affecting reusability of software components. A set of metrics for measuring properties believed to be relevant to understandability and reusability of software components are presented. Then, their usefulness and relevance are analyzed based upon empirical data gathered from the measurement of a variety of component interfaces. We conclude with some ideas for further research in this area. Recent studies have largely investigated the detection of class design anomalies. They proposed a large set of metrics that help in detecting those anomalies and in predicting the quality of class design. While those studies and the proposed metrics are valuable, they do not address the particularities of software interfaces. Interfaces define the contracts that spell out how software modules and logic units interact with each other. This paper proposes a list of design defects related to interfaces: shared similarity between interfaces, interface clones and redundancy in interface hierarchy. We identify and describe those design defects through real examples, taken from well-known Java applications. Then we define three metrics that help in automatically estimating the interface design quality, regarding the proposed design anomalies, and identify refactoring candidates. We investigate our metrics and show their usefulness through an empirical study conducted on three large Java applications.