













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
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
1 / 21
This page cannot be seen from the preview
Don't miss anything!














Department of Computer Engineering
1
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
Layered Architectures -
Three-Tier Architecture
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
Layered Architectures -
Tiered Architectures
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
Layered Architectures -
Database Interaction
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
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
Type Model Design Templates -
Entry Point
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
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
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