Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-9pm4c Total loading time: 0 Render date: 2024-04-26T03:07:06.070Z Has data issue: false hasContentIssue false

4 - Design Patterns Basics

from PART II - SOOP TO NUTS AND BOLTS

Published online by Cambridge University Press:  01 June 2011

Damian Rouson
Affiliation:
Sandia National Laboratories
Jim Xia
Affiliation:
IBM Canada Lab in Markham
Xiaofeng Xu
Affiliation:
General Motors Corp.
Get access

Summary

“There is one timeless way of building.”

Christopher Alexander

Essentials

Whereas code reuse played an important role in Part I of this text, design reuse plays an equally important role in Part II. The effort put into thinking abstractly about software structure and behavior pays off in high-level designs that prove useful independent of the application and implementation language. Patterns comprise reusable elements of successful designs.

The software community typically uses the terms “design patterns” and “object-oriented design patterns” interchangeably. This stems from the expressiveness of OOP languages in describing the relationships and interactions between ADTs. Patterns can improve a code's structure and readability and reduce its development costs by encouraging reuse.

Software design patterns comprise four elements (Gamma et al. 1995):

  1. The pattern name: a handle that describes a design problem, its solution, and consequences in a word or two.

  2. The problem: a description of when to apply the pattern and within what context.

  3. The solution: the elements that constitute the design, the relationships between these elements, their responsibilities, and their collaborations.

  4. The consequences: the results and trade-offs of applying the pattern.

Although there have been suggestions to include additional information in identifying a pattern, for example, sample code and known uses to validate the pattern as a proven solution, authors generally agree that elements 2-4 enumerate the three essential factors in each pattern.

Type
Chapter
Information
Scientific Software Design
The Object-Oriented Way
, pp. 85 - 106
Publisher: Cambridge University Press
Print publication year: 2011

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×