Designpatterns - Design patterns Glenn D Blank Definitions...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Design patterns Glenn D. Blank
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Definitions A pattern is a recurring solution to a standard problem , in a context . Christopher Alexander, a professor of architecture… Why would what a prof of architecture says be relevant to software? “A pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice.” Jim Coplein, a software engineer: “I like to relate this definition to dress patterns…” What are dress patterns? “... I could tell you how to make a dress by specifying the route of a scissors through a piece of cloth in terms of angles and lengths of cut. Or, I could give you a pattern. Reading the specification, you would have no idea what was being built or if you had built the right thing when you were finished. The pattern foreshadows the product: it is the rule for making the thing, but it is also, in many respects, the thing itself.”
Background image of page 2
Patterns in engineering How do other engineers find and use patterns? Mature engineering disciplines have handbooks describing successful solutions to known problems Automobile designers don't design cars from scratch using the laws of physics Instead, they reuse standard designs with successful track records, learning from experience Should software engineers make use of patterns? Why? “Be sure that you make everything according to the pattern I have shown you here on the mountain.” Exodus 25:40. Developing software from scratch is also expensive Patterns support reuse of software architecture and design
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
The “gang of four” (GoF) Erich Gamma, Richard Helm, Ralph Johnson Design Patterns book catalogs 23 different patterns as The problems and solutions are broadly applicable, used by many people over many years What design pattern did we discover with the Undo problem? Why is it useful to learn about this pattern? Patterns suggest opportunities for reuse in analysis, design and programming GOF presents each pattern in a structured format What do you think of this format? Pros and cons?
Background image of page 4
Elements of Design Patterns Design patterns have 4 essential elements: Pattern name: increases vocabulary of designers Problem: intent, context, when to apply Solution: UML-like structure, abstract code Consequences: results and tradeoffs
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 22

Designpatterns - Design patterns Glenn D Blank Definitions...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online