A Controlled Experiment in Maintenance Comparing Design Patterns to Simpler Solutions

Software design patterns package proven solutions to recurring design problems in a form that simplifies reuse. We are seeking empirical evidence whether using design patterns is beneficial. In particular, one may prefer using a design pattern even if the actual design problem is simpler than that solved by the pattern, i.e., if not all of the functionality offered by the pattern is actually required. Our experiment investigates software maintenance scenarios that employ various design patterns and compares designs with patterns to simpler alternatives. The subjects were professional software engineers. In most of our nine maintenance tasks, we found positive effects from using a design pattern: either its inherent additional flexibility was achieved without requiring more maintenance time or maintenance time was reduced compared to the simpler alternative. In a few cases, we found negative effects: the alternative solution was less error-prone or required less maintenance time. Overall, we conclude that, unless there is a clear reason to prefer the simpler solution, it is probably wise to choose the flexibility provided by the design pattern because unexpected new requirements often appear. We identify several questions for future empirical research.

[1]  Lutz Prechelt,et al.  Replication of the first controlled experiment on the usefulness of design patterns: Detailed description and evaluation , 1997 .

[2]  Michael Philippsen,et al.  Two Controlled Experiments Assessing the Usefulness of Design Pattern Documentation in Program Maintenance , 2002, IEEE Trans. Software Eng..

[3]  Marco Meijers,et al.  Tool Support for Object-Oriented Patterns , 1997, ECOOP.

[4]  Peter Sommerlad,et al.  Pattern-Oriented Software Architecture: A System of Patterns: John Wiley & Sons , 1987 .

[5]  Ralph Johnson,et al.  Design patterns: elements of reuseable object-oriented software , 1994 .

[6]  Nancy G. Leveson,et al.  An experimental evaluation of the assumption of independence in multiversion programming , 1986, IEEE Transactions on Software Engineering.

[7]  B. F. Castro Buschmann, Frank; Meunier, Regine; Rohnert, Hans; Sommerlad, Peter; Stal, Michael. Pattern-oriented software architecture: a system of patterns, John Wiley & Sons Ltd, 1996 , 1997 .

[8]  Robert Tibshirani,et al.  An Introduction to the Bootstrap , 1994 .

[9]  John M. Vlissides,et al.  Automatic Code Generation from Design Patterns , 1996, IBM Syst. J..

[10]  James Coplien,et al.  Industrial experience with design patterns , 1996, Proceedings of IEEE 18th International Conference on Software Engineering.

[11]  Lutz Prechelt An experiment on the usefulness of design patterns: Detailed description and evaluation , 1997 .

[12]  Michael Philippsen,et al.  Two controlled experiments assessing the usefulness of design pattern information during program maintenance [online] , 1998 .