Architectural Design (SD&A)
Architectural Design (SD&A)
Architectural Design
Slide Set to accompany
Software Engineering: A Practitioner’s
Approach, 7/e
by Roger S. Pressman
All copyright information MUST appear if these slides are posted on a website for student
use.
1
Why
Architecture?
The architecture is not the operational software. Rather,
it is a representation that enables a software engineer
to:
(1) analyze the effectiveness of the design in meeting its
stated requirements,
(2) consider architectural alternatives at a stage when
making design changes is still relatively easy, and
(3) reduce the risks associated with the construction of
the software.
2
Why is Architecture
Important?
Representations of software architecture are
an enabler for communication between all
parties (stakeholders) interested in the
development of a computer-based system.
The architecture highlights early design
decisions that will have a profound impact on
all software engineering work that follows
and, as important, on the ultimate success of
the system as an operational entity.
Architecture “constitutes a relatively small,
intellectually graspable mode of how the
system is structured and how its components
work together” [BAS03].
3
Architectural
Descriptions
The IEEE Computer Society has proposed IEEE-Std-
1471-2000, Recommended Practice for Architectural
Description of Software-Intensive System, [IEE00]
to establish a conceptual framework and vocabulary for use
during the design of software architecture,
to provide detailed guidelines for representing an architectural
description, and
to encourage sound architectural design practices.
The IEEE Standard defines an architectural description (AD)
as a “a collection of products to document an architecture.”
The description itself is represented using multiple views, where
each view is “a representation of a whole system from the
perspective of a related set of [stakeholder] concerns.”
4
Architectural Genres
Genre implies a specific category within the
overall software domain.
Within each category, you encounter a number
of subcategories.
For example, within the genre of buildings, you
would encounter the following general styles:
houses, condos, apartment buildings, office
buildings, industrial building, warehouses, and so
on.
Within each general style, more specific styles might
apply. Each style would have a structure that can be
described using a set of predictable patterns.
5
Architectural
Styles
Each style describes a system category that encompasses: (1) a
set of components (e.g., a database, computational modules)
that perform a function required by a system, (2) a set of
connectors that enable “communication, coordination and
cooperation” among components, (3) constraints that define
how components can be integrated to form the system, and
(4) semantic models that enable a designer to understand the
overall properties of a system by analyzing the known
properties of its constituent parts.
Data-centered architectures
Data flow architectures
Call and return architectures
Object-oriented architectures
Layered architectures
6
Data-Centered
Architecture
7
Data Flow
Architecture
8
Call and Return
Architecture
9
Layered
Architecture
10
Architectural
Patterns
Concurrency—applications must handle multiple
tasks in a manner that simulates parallelism
operating system process management pattern
task scheduler pattern
Persistence—Data persists if it survives past the
execution of the process that created it. Two
patterns are common:
a database management system pattern that applies
the storage and retrieval capability of a DBMS to the
application architecture
an application level persistence pattern that builds
persistence features into the application architecture
Distribution— the manner in which systems or
components within systems communicate with one
another in a distributed environment
A broker acts as a ‘middle-man’ between the client
component and a server component.
11
Architectural
Design
The software must be placed into context
the design should define the external entities
(other systems, devices, people) that the
software interacts with and the nature of the
interaction
A set of architectural archetypes should be
identified
An archetype is an abstraction (similar to a class)
that represents one element of system behavior
The designer specifies the structure of the
system by defining and refining software
components that implement each
archetype
12
Architectural
Context
Safehome Internet-based
Product system
control
panel target system: surveillance
Security Function function
uses
homeowner peers
uses
uses
sensors sensors
13
Archetypes
Cont rolle r
Node
De t e ct or Indicat or
Figure 10.7 UML re lat ionships for Safe Hom e se curit y funct ion arche t ype s
(adapt e d from [BOS00]) 14
Component
Structure
Sa fe Hom e
Exe c ut ive
Func t ion
se le c t ion
Ext e rn al
Co mmu n icat io n
Man ag e me n t
Cont rol de t e c t or a la rm
pa ne l ma na ge me nt proc e s s ing
proc e s s ing
15
Refined Component
Structure
SafeHo me
Executive
Ext e rna l
Communic a t ion
Ma na ge me nt
Security
GUI Internet
Interface
Co n t ro l d e t e ct o r alarm
p an e l m an ag e m e n t p ro ce ssin g
p ro ce ss in g
Ke y p ad
p ro ce ss in g phone
sch e d u le r
co m m u n icat io n
CP d isp lay
fu n ct io n s
alarm
se sennnso
se sorrr
so
se nsso r
sseennnso
se s oorrr
s se
e nns so
orr
16
Analyzing Architectural
Design
1. Collect scenarios.
2. Elicit requirements, constraints, and environment description.
3. Describe the architectural styles/patterns that have been chosen
to address the scenarios and requirements:
• module view
• process view
• data flow view
4. Evaluate quality attributes by considered each attribute in
isolation.
5. Identify the sensitivity of quality attributes to various
architectural attributes for a specific architectural style.
6. Critique candidate architectures (developed in step 3) using the
sensitivity analysis conducted in step 5.
17
Architectural
Complexity
the overall complexity of a proposed
architecture is assessed by considering the
dependencies between components within the
architecture [Zha98]
Sharing dependencies represent dependence
relationships among consumers who use the same
resource or producers who produce for the same
consumers.
Flow dependencies represent dependence relationships
between producers and consumers of resources.
Constrained dependencies represent constraints on the
relative flow of control among a set of activities.
18
ADL
Architectural description language (ADL) provides
a semantics and syntax for describing a software
architecture
Provide the designer with the ability to:
decompose architectural components
compose individual components into larger architectural
blocks and
represent interfaces (connection mechanisms) between
components.
19
An Architectural Design
Method
customer requirements
"four bedrooms, three baths,
lots of glass ..."
architectural design
20
Deriving Program
Architecture
Program
Architecture
21
Partitioning the
Architecture
“horizontal” and “vertical”
partitioning are required
22
Horizontal
Partitioning
define separate branches of the
module hierarchy for each major
function
use control modules to coordinate
communication between functions
function 3
function 1 function 3
function 2
23
Vertical Partitioning:
Factoring
design so that decision making and
work are stratified
decision making modules should
reside at the top of the architecture
decision-makers
workers
24
Why Partitioned
Architecture?
results in software that is easier to
test
leads to software that is easier to
maintain
results in propagation of fewer side
effects
results in software that is easier to
extend
25
Structured Design
objective: to derive a program
architecture that is partitioned
approach:
a DFD is mapped into a program
architecture
the PSPEC (Process Specification)
and STD (Software Test
Description) are used to indicate
the content of each module
notation: structure chart
26
Flow
Characteristics
Transform flow
This edition of
SEPA does not
cover transaction
mapping. For a
detailed
discussion see the
SEPA website
Transaction
flow
27
General Mapping
Approach
isolate incoming and outgoing flow
boundaries; for transaction flows, isolate
the transaction center
28
General Mapping
Approach
Isolate the transform center by specifying incoming
and outgoing flow boundaries
Perform "first-level factoring.”
The program architecture derived using this mapping
results in a top-down distribution of control.
Factoring leads to a program structure in which top-level
components perform decision-making and low-level
components perform most input, computation, and output
work.
Middle-level components perform some control and do
moderate amounts of work.
Perform "second-level factoring."
29
Transform
Mapping
b g h
a e f
d
c i
j
data flow model
x1 "Transform" mapping
x2 x3 x4
b c d e f g i
a h j
30
Factori
ngdirection of increasing
decision making typical "decision
making" modules
31
First Level
Factoring main
program
controller
32
Second Level
Mapping
main
D
C
control
B A
A
B
C
33