Analysis Patterns-Patterns in Software Engineering-Lecture 19 Slides-Computer Engineering, Slides of Software Engineering

Analysis Patterns, Supporting Patterns, Layered Architectures, Type Model Design Templates, Association Patterns, Associative Type, Keyed Mapping, Historic Mapping, Raman Ramsin, Lecture Slides, Patterns in Software Engineering, Department of Computer Engineering, Sharif University of Technology, Iran.

Typology: Slides

2011/2012

Uploaded on 02/19/2012

hester
hester ๐Ÿ‡ฎ๐Ÿ‡ท

4.5

(13)

84 documents

1 / 21

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Patterns in
Software Engineering
Lecturer: Raman Ramsin
Lecture 19
Analysis Patterns
Part 2
Department of Computer Engineering 1Sharif University of Technology
Part
2
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15

Partial preview of the text

Download Analysis Patterns-Patterns in Software Engineering-Lecture 19 Slides-Computer Engineering and more Slides Software Engineering in PDF only on Docsity!

Patterns in Software Engineering Lecturer: Raman Ramsin^ Lecture 19^ Analysis Patterns

Part 2

Department of Computer Engineering

1

Part^2 Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting PatternsSupporting

Patterns

Th^

ti^

tt^

d^ ib

h^

t^ t k

l^ i^

tt

ย„^ The supporting patterns describe how to take analysis patternsand apply them:^ ^

Layered Architecture for Information Systems:

These patterns

consider the architecture for a client/server information system and howsuch a system can be layered to improve its maintainability.

y^

y^

p^

y

^ Patterns for Type Model Design Templates:

These patterns focus on

how conceptual models can be implemented, suggesting common

p^

p^

,^ gg^

g

patterns to turn analysis patterns into software. Association Patterns:

These patterns focus on examining modeling

techniques themselves and how advanced modeling constructs can beviewed as patterns. Department of Computer Engineering

2

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Layered Architectures -

Three-Tier Architecture

pp^

g^

y

ย„^ Problem:

Th^ t^

ti^

hit^ t^

l^ th^

i t^ f^

t^ ti htl

t^ th

^ The two-tier architecture couples the user interface too tightly to thedatabase design. ^ The database interface cannot support a rich model of the domain ^ The database interface cannot support a rich model of the domain. ย„ Solution:

Have three logical tiers: application, domain, and database. Department of Computer Engineering

4

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Layered Architectures -

Tiered Architectures

pp^

g^

y

Two Tier

Three Tier

Department of Computer Engineering

5

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Layered Architectures -

Presentation & Application Logic

pp^

g^

y^

g

Department of Computer Engineering

7

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Layered Architectures -

Database Interaction

pp^

g^

y

ย„^ Problem:

Working with a database. ย„^ Solution: ย„^ Solution:^ ^

Let the domain classes be responsible for saving themselves in thedatabasedatabase. Create a separate layer to handle the interactions between database anddomain objectsdomain objects. Department of Computer Engineering

8

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Type Model Design Templates โ€“

Implementing Generalizations

pp^

g^

y^

g

ย„^ Problem:

Implementing generalization, especially if multiple ย„^ Problem:

Implementing

generalization, especially if multiple

and dynamic classification is involved. ย„ Solution:^ ^ Use inheritance.^ ^ Use classes for each combination of subtypes with multiple inheritance ^ Use classes for each combination of subtypes with multiple inheritance.^ ^ Use an internal flag.^ ^ Delegate to a hidden class (state pattern).^ ^ Copy and replace.Department of Computer Engineering

10

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Type Model Design Templates

-^ Object Creation

pp^

g^

yp^

g^

p^

j

P^ bl

C

i^

bj

ย„^ Problem:

Creating an object. ย„^ Solution:

Use a creation method with arguments for all mandatory and immutable mappingsmandatory and immutable mappings.Department of Computer Engineering

11

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Type Model Design Templates -

Entry Point

pp^
g^

yp^

g^

p^

y

ย„^ Problem:

Starting to look for objects ย„^ Problem:

Starting

to look for objects.

ย„^ Solution:^ ^

Let the class be responsible for storing and finding its instances Let^ the class be responsible for storing and finding its instances. Have a registrar find and store objects. Department of Computer Engineering

13

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Type Model Design Templates โ€“

Implementing Constraints

pp^

g^

yp^

g^

p

P^ bl

I

l^

ti^

t^ i t

ย„^ Problem:

Implementing constraints. ย„^ Solution:

Give each object an operation to check its constraint. Call it at the end of modifiers when debugging.Call it at the end of modifiers when debugging.Department of Computer Engineering

14

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Association Patterns -

Associative Type

pp^

g^

yp

Department of Computer Engineering

16

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Association Patterns -

Keyed Mapping

pp^

g^

y^

pp^ g

P^ bl

R

i^

l^ i^

i^ h

k^ d

ff

ย„^ Problem:

Representing values in a mapping that are keyed off another type. ย„ Solution:

Use a keyed mapping ย„^ Solution:

Use^ a keyed mapping. Department of Computer Engineering

17

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Association Patterns -

Historic Mapping

pp^

g^

pp^ g

ย„^ Problem:

Recording previous values of a mapping. ย„^ Solution:

Use a historic mapping. Department of Computer Engineering

19

Sharif University of Technology

Patterns in Software Engineering โ€“ Lecture 19 Supporting Patterns:

Association Patterns -

Historic Mapping

pp^

g^

pp^ g

Department of Computer Engineering

20

Sharif University of Technology