16
8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 1/16 Intell Agile www.craiglarman.com Copyright © 2002 Craig Larman. All rights reserved. Craig Larman¶s Craig Larman¶s Applying UML Applying UML and Patterns and Patterns: Hands Hands-on Mastery of on Mastery of OOA/D OOA/D Patterns Patterns Requirements Requirements

0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

Embed Size (px)

Citation preview

Page 1: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 1/16

IntellAgile

www.craiglarman.comCopyright © 2002 Craig Larman. All rights reserved.

Craig Larman¶sCraig Larman¶sApplying UMLApplying UML

and Patternsand Patterns::HandsHands--on Mastery of on Mastery of OOA/DOOA/D

PatternsPatterns

RequirementsRequirements

Page 2: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 2/16

IntellAgile

2

Coach BackgroundCoach Background

Coached thousands since 1986 in OOA/DCoached thousands since 1986 in OOA/D

www.craiglarman.comwww.craiglarman.com

introduction iterative UP iterative requirements use cases

Page 3: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 3/16

IntellAgile

3

ObjectivesObjectives

³Think in Objects´³Think in Objects´

Analyze requirements with useAnalyze requirements with usecasescases

Create domain modelsCreate domain models

Apply an iterative & agile UnifiedApply an iterative & agile UnifiedProcess (UP)Process (UP)

Relate analysis and designRelate analysis and design

artifactsartifacts

Read & write highRead & write high--frequencyfrequencyUMLUML

PracticePractice

Apply agile modelingApply agile modeling

Design object solutionsDesign object solutions

Assign responsibilities toAssign responsibilities to

objectsobjects

Design collaborationsDesign collaborations

Design with patternsDesign with patterns

Design with architecturalDesign with architecturallayerslayers

Understand OOP (e.g., Java)Understand OOP (e.g., Java)mapping issuesmapping issues

introduction iterative UP iterative requirements use cases

Page 4: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 4/16

IntellAgile

4

PriorityPriority

1. Assign responsibilities to objects1. Assign responsibilities to objects

The GRASP patterns are the key learning aidThe GRASP patterns are the key learning aid

After that. . . ?After that. . . ?

introduction iterative UP iterative requirements use cases

Page 5: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 5/16

IntellAgile

5

Learning AidsLearning Aids

This presentation is terse.This presentation is terse.

The details are in«The details are in«

Carefully studyCarefully study²²valuable.valuable.

introduction iterative UP iterative requirements use cases

Page 6: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 6/16

IntellAgile

6

Analysis and Design?Analysis and Design?

AnalysisAnalysis

investigationinvestigation whatwhat

best qualified«best qualified«

Requirements analysisRequirements analysis

Domain analysisDomain analysis

Architectural analysisArchitectural analysis

DesignDesign

solutionsolution howhow

best qualified«best qualified«

Object designObject design

Database designDatabase design

UI designUI design

introduction iterative UP iterative requirements use cases

Page 7: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 7/16

IntellAgile

7

ObjectObject--Oriented Analysis and Design?Oriented Analysis and Design?

ObjectObject--Oriented AnalysisOriented Analysis

Important domainImportant domain

concepts or objects?concepts or objects?

Vocabulary?Vocabulary?

Visualized in the UPVisualized in the UP

Domain M odel Domain M odel 

ObjectObject--OrientedOriented

DesignDesign

Design of softwareDesign of software

objectsobjects

ResponsibilitiesResponsibilities

CollaborationsCollaborations

Design patternsDesign patterns

Visualized in the UPVisualized in the UP

Design M odel Design M odel 

introduction iterative UP iterative requirements use cases

Page 8: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 8/16

IntellAgile

8

Development MethodDevelopment Method

OOA/D needs explanation in a method context.OOA/D needs explanation in a method context.

Thus, an agile UPThus, an agile UP

Common, popular Common, popular 

Just a sampleJust a sample

Our focus is methodOur focus is method--independent core skills, notindependent core skills, not

UPUP

±± Responsibility assignment, design patterns, «Responsibility assignment, design patterns, «

introduction iterative UP iterative requirements use cases

Page 9: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 9/16

IntellAgile

9

Unified Modeling Language (UML)Unified Modeling Language (UML)

introduction iterative UP iterative requirements use cases

Just a diagramming notation standard.

Trivial and relatively unimportant.

Not a method, process, or design guide.

I n ter faceX

A b s t r a c t

C l a s s X

...

« in ter face»

Inter faceX

o p e r a t i o n 1 ( )

C la s s A C la s s BAssoc iat ion-nam e

ro le -1 ro le -2

1 1

z e r o o r  

m ore;

"m any"

o n e o r  

m ore

one to

f or ty

exac t ly

f   

¡   

eC l a s s C l a s sC l a s s C l a s s* 1

¢ ¢  *1¢ ¢ 

40 5

W£   

ol e

P a r t

1

*

A s s o c i a t i o n C l a s s

Com pos i t ion

M u l t i p l i c i t y :

A s s o c i a t i o n s :

C l a s sX

c lassAt t r ibute

+ publ icAt t r ibute

- pr ivateAt t r ibute

at t r ibuteW i t hVis ib i l i t yUnspec i f ie d

at t r ibute1 : t ype

burgers : L is t o f V e g g i e B u r g e r  

at t r ibute2 : t ype = in i t ia l va lue

f ina lCons tan tAt t r ibute : in t = 5 { f ro z en }

/der ivedAt t r ibute

c lassM ethod ()

+ « cons t ruc tor  » C l a s sX ( in t)

« s i g n a l» C a u g h t E x c e p t i o n1( )

m ethod W i t hVis ib i l i t yUnspec i f ie d ()

m ethodRe turnsSom eth ing () : Foo

abs t rac tM ethod ()

abs t rac tM ethod 2( ) { abs t rac t } / / a l ternate+ publ icM ethod ()

- pr ivateM ethod ()

# protec tedM ethod ()

~ packageVis ib leM ethod ()

f ina lM ethod () { lea f  }

m ethod W i t houtSideE ff ec ts () { q u e r y }

s y n c h r o n iz edM ethod () { g u a r d e d }

e x c e p t i o n s

T h r o w n E x c e p t i o n1

AlternateUM LFor 

A b s t r a c t C l a s s

{abs t rac t }

...

C l a s s Y

o p e r a t i o n1( )

...

g e n e r a l iz at ioninter  f ac e

im plem entation

Al ternateUM LFor 

Im plO fInter  f ac e X

o p e r a t i o n1( )

F inalC lass

{ lea f }

...

Page 10: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 10/16

IntellAgile

10

UML: What¶s Important?UML: What¶s Important?

introduction iterative UP iterative requirements use cases

Page 11: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 11/16

IntellAgile

11

UML: What¶s Important?UML: What¶s Important?

introduction iterative UP iterative requirements use cases

Harm ul is knowing

how to read and draw

UML diagrams, ut

not eing an expert in

design and patterns.

mportant is o ject andarchitectural design skills, not

UML diagrams, drawing, or SE

tools.

Page 12: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 12/16

IntellAgile

12

Skills self assessment. Examples:Skills self assessment. Examples:

Swallow a sword?Swallow a sword?

introduction iterative UP iterative requirements use cases

deadRelatively skilled master 

deadRelatively skilled master 

deadRelatively skilled master 

Page 13: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 13/16

IntellAgile

13

ObjectivesObjectives

Skills self assessment:Skills self assessment:

³Think in objects´³Think in objects´

Analyze requirements with use casesAnalyze requirements with use cases

Create domain modelsCreate domain models

introduction iterative UP iterative requirements use cases

new ishRelatively skilled master 

new ishRelatively skilled master 

new ishRelatively skilled master 

Page 14: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 14/16

IntellAgile

14

ObjectivesObjectives

Skills self assessment:Skills self assessment:

Apply an iterative & agile processApply an iterative & agile process

Relate analysis and design artifactsRelate analysis and design artifacts

Read and write UMLRead and write UML

introduction iterative UP iterative requirements use cases

new ishRelatively skilled master 

new ishRelatively skilled master 

new ishRelatively skilled master 

Page 15: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 15/16

IntellAgile

15

ObjectivesObjectives

Skills self assessment:Skills self assessment:

Assign responsibilities to objectsAssign responsibilities to objects

Design collaborationsDesign collaborations

Design with patternsDesign with patterns

introduction iterative UP iterative requirements use cases

new ishRelatively skilled master 

new ishRelatively skilled master 

new ishRelatively skilled master 

Page 16: 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

8/7/2019 0003 Introduction-OBJECT ORIENTED ANALYSIS AND DESIGN

http://slidepdf.com/reader/full/0003-introduction-object-oriented-analysis-and-design 16/16

IntellAgile

16

ObjectivesObjectives

Skills self assessment:Skills self assessment:

Design with architectural layersDesign with architectural layers

introduction iterative UP iterative requirements use cases

new ishRelatively skilled master