An Empirical Study of the Effect of Design Patterns on Class Structural Quality

An Empirical Study of the Effect of Design Patterns on Class Structural Quality

Liguo Yu (Indiana University – South Bend, USA) and Srini Ramaswamy (BU Power Generation at ABB, India)
DOI: 10.4018/978-1-4666-6026-7.ch006


Design patterns are standardized solutions to commonly encountered problems using the object-oriented programming paradigm. Applying design patterns can speed up software development processes through the reuse of tested, proven templates, or development paradigms. Accordingly, design patterns have been widely used in software industry to build modern software programs. However, as different design patterns are introduced to solve different design problems, they are not necessarily superior to alternative solutions, with respect to all aspects of software design. One major concern is that the inappropriate use of design patterns may unnecessarily increase program complexity, such as class structural quality. Theoretical analysis of the effect of design patterns on software complexity has been widely performed. However, little work is reported to empirically study how design patterns might affect class structural quality. This chapter studies six components from five open-source Java projects and empirically investigates if design patterns can affect class structural quality. The chapter finds that pattern-involved classes are more complex than pattern-free classes and recommends the cautious use of design patterns to avoid unnecessary increases in class complexity and decrease in class structural quality.
Chapter Preview

2. Literature Review

Because of the widespread use of design patterns in object-oriented software development, a large body of intensive research in this area has been published. For example, design patterns have been used to study the maintenance and evolution of software systems. Fushida et al. (2007) used pattern detection tools to study the change history of JUnit from the viewpoint of design pattern evolutions. Hsueh et al. (2011) proposed a method to evaluate how design patterns can effectively affect software evolution.

The work that is directly related to our study is to analyze the relationship between design patterns and software quality (Ampatzoglou & Chatzigeorgiou, 2007; Di Penta et al., 2008; Prechelt et al., 2001). For example, Zheng and Harper (2010) surveyed some concurrency design patterns and illustrated the relationship between concurrency design patterns and software quality attributes. Their study presented a mapping between concurrency design patterns and software performance and modifiability. Sandhu et al. (2008) proposed a set of quality metrics for various design patterns. Their study aimed to build high quality product through using high quality reusable design patterns.

Key Terms in this Chapter

Design Pattern: A standard object-oriented solution to a common software design problem.

Class Complexity: The measurement of class structure and its inter-dependencies with other classes. Class complexity has been shown to have direct relations with software quality.

Open Source Project: A software project whose source code is freely available for use and study under certain license.

Software Quality: The measurement of readability, usability, maintainability, reusability, and error-proneness of a software product.

Empirical Study: A scientific method that uses experienced or experimental data to obtain knowledge and understanding of the target system.

Class Structural Quality: A measure of the design quality of object-oriented software system.

Complete Chapter List

Search this Book: