When to Use Patterns What Makes a Pattern a Pattern? Case Study ...

31 downloads 228 Views 87KB Size Report
OO Patterns. Douglas ... Patterns can be overkill if solution is simple linear set of instructions ... Object-Oriented Design & Patterns, Cay Horstmann. Slides and ...
OO Patterns

Douglas C. Schmidt

OO Patterns

Douglas C. Schmidt

When to Use Patterns

What Makes a Pattern a Pattern?

1. Solutions to problems that recur with variations

A pattern must: Solve a problem,

No need for reuse if the problem only arises in one context

– i.e., it must be useful!

2. Solutions that require several steps

– It must provide sufficient understanding to tailor the solution

Have a context,

Not all problems need all steps Patterns can be overkill if solution is simple linear set of instructions 3. Solutions where the solver is more interested in the existence of the solution than its complete derivation

– It must describe where the solution can be used

Have a name

Recur,

– It must be referred to consistently

– It must be relevant in other situations

Patterns leave out too much to be useful to someone who really wants to understand – They can be a temporary bridge, however 24

Vanderbilt University

25

www.cs.wustl.edu/ schmidt/PDF/DSEJ-94.pdf

www.cs.wustl.edu/ schmidt/PDF/ECOOP95.pdf

%(0!++1& )4556

%(0!++1&

+,-%(. /0+1(

Vanderbilt University

26

)4556

Vanderbilt University

OO Patterns

Elements of Reusable Object-Oriented Software Gang of Four

%/%&' +%(/%(

&%'21(3

– Algorithms – Detailed designs – Interfaces Design Patterns: – Implementations

+,-%(. /0+1(

concurrency and I/O models – e.g., different Michael Mamehoff's "GoF Design Patterns: Rapid Learning Tips" Thus, it may be impractical to directly reuse: http://mahemoff.com/paper/software/learningGoFPatterns/

OO framework for Call Center Management

+20'!7 7"&4#%(+

OS platforms are often fundamentally incompatible

+,-%(. /0+1(

System Overview

Object-Oriented Design & Patterns, Cay Horstmann Developing portable, reusable, and efficient communication software is hard Slides and examples: http://horstmann.com/design_and_patterns.html

'%#%!1) +20'!7%+

Case Study: A Reusable Object-Oriented Communication Software Framework

8$(9:;

+,-%(. /0+1(

+,-%(/0+1( 7"&4#%(+

Introduction to Patterns and Frameworks, Douglas C. Schmidt OO Patterns Douglas C. Schmidt http://www.cs.wustl.edu/~schmidt/PDF/patterns-intro4.pdf

!"##$ $ !%&'%( )"&"*%(

Do

Vanderbilt University

Teach

Suggest Documents