Lessons Learned from Using Design Patterns in Industry Projects

Abstract: Design patterns help in the creative act of designing, implementing, and documenting software systems. They have become an important part of the vocabulary of experienced software developers. This article reports about the author’s experiences and lessons learned with using and applying design patterns in industry projects. The article not only discusses how using patterns benefits the design of software systems, but also how firms can benefit further from developing a firm-specific design language and how firms can motivate and educate developers to learn and develop this shared language.

Keywords: Design pattern, pattern language, design language, design communication, design collaboration, design implementation, design documentation.

Reference: Dirk Riehle. “Lessons Learned from Using Design Patterns in Industry Projects.” In Transactions on Pattern Languages of Programming II, LNCS 6510. Springer-Verlag, 2011. Page 1-15.

The paper is available as a PDF file.

Talk Slides: Design Pattern Density Defined

Here the slides for my OOPSLA Onward! 2009 talk on “Design Pattern Density Defined.” First the abstract:

Design pattern density is a metric that measures how much of an object-oriented design can be understood and represented as instances of design patterns. Expert developers have long believed that a high design pattern density implies a high maturity of the design under inspection. This paper presents a quantifiable and observable definition of this metric. The metric is illustrated and qualitatively validated using four real-world case studies. We present several hypotheses of the metric’s meaning and their implications, including the one about design maturity. We propose that the design pattern density of a maturing framework has a fixed point and we show that if software design patterns make learning frameworks easier, a framework’s design pattern density is a measure of how much easier it will become.

The talk slides are available as a PDF file and are licensed under the Creative Commons BY-SA 3.0 license.

For a discussion of the talk’s contents I recommend reading the original article.

Design Pattern Density Defined

Abstract: Design pattern density is a metric that measures how much of an object-oriented design can be understood and represented as instances of design patterns. Expert developers have long believed that a high design pattern density implies a high maturity of the design under inspection. This paper presents a quantifiable and observable definition of this metric. The metric is illustrated and qualitatively validated using four real-world case studies. We present several hypotheses of the metric’s meaning and their implications, including the one about design maturity. We propose that the design pattern density of a maturing framework has a fixed point and we show that if software design patterns make learning frameworks easier, a framework’s design pattern density is a measure of how much easier it will become.

Reference: Dirk Riehle. “Design Pattern Density Defined.” In Proceedings of the 2009 Conference on Object-Oriented Programming Systems, Languages, and Applications (OOPSLA Onward! ’09). ACM Press, 2009. Page 469-480.

Available as a PDF file.

Design Pattern Density and Design Maturity

JUnit is a widely-adopted unit testing framework for Java, developed by Kent Beck and Erich Gamma. In their discussion of JUnit 3.8’s design, the authors state:

Notice how TestCase, the central abstraction in the framework, is involved in four patterns. Pictures of mature object designs show this same ‘pattern density’. The star of the design has a rich set of relationships with the supporting players.

The notion of design pattern density has been around forever, but with little serious work being done to refine the idea. I’m calling on all experts (reading this blog…) to tell me whether they agree or disagree with the following statement:

Continue reading “Design Pattern Density and Design Maturity”

Object-Oriented Software Design Documentation

Software researchers need case studies to validate new tools and methods of object-oriented software design. A good thing to do is to standardize on a set of open source frameworks and libraries that are known and available to everyone. Basically, a benchmark set for new tools and methods in object-oriented software design. JUnit and JHotDraw come to mind.

Most open source frameworks and libraries that are being used in research studies have little original documentation associated with them. However, I as well as others have written up such documentation. Here are those frameworks that I see increasingly being used in scientific studies, as well as any design documentation documentation that I may have provided.

Continue reading “Object-Oriented Software Design Documentation”

JUnit 3.8 Documented Using Collaborations

Author: Dirk Riehle

Abstract: This paper describes the design of the unit testing framework JUnit v3.8. The documentation technique employed is an enhanced version of collaboration-based design, also known as role modeling. In collaboration-based design, objects are viewed as playing multiple roles in different contexts, and different contexts are viewed as task specific collaborations. The documentation accounts for every method in the JUnit 3.8 framework by assigning it to a role. It thereby investigates whether roles and collaborations can serve as basic units of functionality provided by a design like a framework. Such a measure of functionality can serve multiple purposes, for example estimating implementation efforts or measuring complexity.

Keywords: JUnit 3.8 Documentation

Reference: In Software Engineering Notes Volume 33, Issue 2 (March 2008), Article No 5. ACM Press, 2008.

Available as a PDF file.