design patterns

67
Design Patterns Christophe Van Ginneken [email protected]

Upload: christophevg

Post on 22-Jun-2015

91 views

Category:

Software


0 download

DESCRIPTION

A rather old, but still relevant presentation I once did for CTG's analyst community.

TRANSCRIPT

Page 1: Design patterns

Design Patterns

Christophe Van [email protected]

Page 2: Design patterns

Design Patterns

Christophe Van [email protected]

For

Analysts

Page 3: Design patterns

Who Am I ?

• Christophe Van Ginneken

• Independent Software Architect

• Amateur Cook

• Catamaran Sailer

Page 4: Design patterns

Who Are You ?• Employees of CTG

• Analysts or interested in analysis

• With or without technical background

• Using UML or not

• Writing Word documents or not

• An old school mate (Hi Britt)

• An ex-colleague (Hi Ron)

Page 5: Design patterns

Ceci n’est pas ...• large list of design patterns

☞ http://themodelfactory.org

• focus on applying technical design patterns☞

• make you a CDPM (Certified Design Pattern Master)

☞ wake up !

Page 6: Design patterns

Today’s Specials

• What are Design Patterns ?

• Why are they Important ?

• Why are they Important for Analysts ?

Page 7: Design patterns

But first ...

Page 8: Design patterns
Page 9: Design patterns

What are Design Patterns ?

Page 10: Design patterns
Page 11: Design patterns

The Bible

Page 12: Design patterns

Definition“Each 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.”

Christopher Alexander

Page 13: Design patterns

Christopher Alexander

(born October 4, 1936 in Vienna, Austria) is an architect noted for his theories about design, and for more than 200 building projects in California, Japan, Mexico and around the world. Reasoning that users know more about the buildings they need than any architect could, he produced and validated (in collaboration with Sarah Ishikawa and Murray Silverstein) a "pattern language" designed to empower any human being to design and build at any scale. In 1958 he moved to the United States, and has lived in Berkeley, California from 1963 until the present. He is professor emeritus at the University of California, Berkeley. He is now retired and is based in Arundel, Sussex, UK.

http://en.wikipedia.org/wiki/Christopher_Alexander

Page 14: Design patterns

Keywords“Each 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.”

Christopher Alexander

Page 15: Design patterns

Keywords“Each 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.”

Christopher Alexander

Environment

Page 16: Design patterns

Keywords“Each 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.”

Christopher Alexander

ProblemEnvironme

nt

Page 17: Design patterns

Keywords“Each 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.”

Christopher Alexander

ProblemEnvironme

ntSolution

Page 18: Design patterns

Keywords“Each 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.”

Christopher Alexander

ProblemEnvironme

ntRepetitiv

eSolution

Page 19: Design patterns

Keywords“Each 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.”

Christopher Alexander

ProblemEnvironme

ntRepetitiv

eSolution Variation

s

Page 20: Design patterns

Keywords

• Environment

• Problem

• Solution

• Repetitive

• Variations

Page 21: Design patterns

There are more things in heaven and earth, Horatio,

than are dreamt of in your philosophy.

Hamlet Act 1, scene 5, 159–167

Page 22: Design patterns

In the Kitchen

Add a mixture of thyme, bay leaf and parsley, tied by the stems or placed in a cloth bag to the soup and remove it before

serving.

Page 23: Design patterns

In the Kitchen

Add a mixture of thyme, bay leaf and parsley, tied by the stems or placed in a cloth bag to the soup and remove it before

serving. Add a bouquet garni.

Page 24: Design patterns

At Sea

Tie the rope to hoist or lower the main sail securely to the two-

way turning winch on the left side of the boat when facing

forward.

Page 25: Design patterns

At Sea

Tie the rope to hoist or lower the main sail securely to the two-

way turning winch on the left side of the boat when facing

forward.Fast the main halyard on the

starboard coffee grinder.

Page 26: Design patterns

Near a PC

Create a data structure that can

store a list of textual data, allowing me to

iterate through the list from one item to the

next and back.

Page 27: Design patterns

Near a PC

Create a data structure that can

store a list of textual data, allowing me to

iterate through the list from one item to the

next and back.

Create a double linked list of

strings.

Page 28: Design patterns

What do Cooking, Sailing and Software Development have in

common ?(besides me loving them)

Page 29: Design patterns

Communication

Page 30: Design patterns

Definition“Each 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 ...”

Christopher Alexander

Page 31: Design patterns

Addendum

“... and communicate about the problem and solution with others without loosing information and without requiring additional contextual information.”

Christophe Van Ginneken

Page 32: Design patterns
Page 33: Design patterns
Page 34: Design patterns

Keywords

• Environment

• Problem

• Solution

• Repetitive

• Variations

• Communication

Page 35: Design patterns
Page 36: Design patterns

T

A G

C A

G

C

T

Page 37: Design patterns

Why are Design Patterns Important ?

Page 38: Design patterns

Development Process

Business /Customer

Analysis

Coding

TestingReleaseMgmt

Page 39: Design patterns

Development Process

Business /Customer

BusinessAnalysis

FunctionalAnalysis

TechnicalAnalysis

Coding

TestingReleaseMgmt

Page 40: Design patterns

Analysis ProcessBusiness Analysis

Understand Business

Create Process Specifications

Functional Analysis

Design

Create Functional Specifications

Technical Analysis

Choose Technology

Create Technical Specifications

Page 41: Design patterns

Analysis ProcessBusiness Analysis

Understand Business

Create Process Specifications

Functional Analysis

Design

Create Functional Specifications

Technical Analysis

Choose Technology

Create Technical Specifications

Informal

Formal

Page 42: Design patterns

Development Process

Business /Customer

Analysis

Coding

TestingReleaseMgmt

Information

Specification

Page 43: Design patterns

Classic Bug Cost Story

Business /Customer

Analysis Coding Testing

Page 44: Design patterns

Classic Bug Cost Story

Business /Customer

Analysis Coding Testing

Informal Formal

Page 45: Design patterns

Classic Bug Cost Story

Business /Customer

Analysis Coding Testing

Unpredictable Predictable

Informal Formal

Page 46: Design patterns

Why are Design Patterns Important ?

Page 47: Design patterns

How can Design Patterns make a project more

Predictable ?

Page 48: Design patterns
Page 49: Design patterns

Business /Customer

Page 50: Design patterns

Business /Customer

Analysis

Page 51: Design patterns

Business /Customer

Analysis

Coding

Page 52: Design patterns

Business /Customer

Analysis

Coding

Testing

Page 53: Design patterns

Business /Customer

Analysis

Coding

Testing

Business Patterns

FunctionalPatterns

TechnicalPatterns

TestingPatterns

Page 54: Design patterns

Business /Customer

Analysis

Coding

Testing

Business Patterns

FunctionalPatterns

TechnicalPatterns

TestingPatterns

Page 55: Design patterns

Business /Customer

Analysis

Coding

Testing

Business Patterns

FunctionalPatterns

TechnicalPatterns

TestingPatterns

Page 56: Design patterns

Business /Customer

Analysis

Coding

Testing

Business Patterns

FunctionalPatterns

TechnicalPatterns

TestingPatterns

Design Pattern Tree

Page 57: Design patterns

Design Pattern Catalog

• List vs Tree

• Selection Criteria

• Grow As You Go

• No Exceptions

• Only Additions

• Quantify

Tree

Page 58: Design patterns
Page 59: Design patterns

T

A G

C A

G

C

T

AT TA GC CG

Page 60: Design patterns

Why are Design Patterns Important for Analysts ?

Page 61: Design patterns

You

• Give Less

• Get More

• First in Line

• Good Start is Half the Work

• Project Manager’s will love you ;-)

Page 62: Design patterns

Design Patterns

Page 63: Design patterns

Summary

• Not only Technical

• Communication

• Formalize Development Process

• Design Pattern Tree

• You can Lead the Way

• Stop Reinventing the Wheel

Page 64: Design patterns
Page 65: Design patterns

DNALife’s Design Pattern

Page 66: Design patterns

Thanks

Page 67: Design patterns

More...• [email protected]

• feel free to contact me regarding this presentation or modeling in general

• http://themodelfactory.org

• an effort to create a de facto repository of patterns and models, from a modeler’s point of view

• http://thesoftwarefactory.be

• a joint venture of like minded software architects, joining forces to bring UML to the web, enabling a more social modeling experience