Академический Документы
Профессиональный Документы
Культура Документы
SW Design
interface
Data Dictionary
design
architectural
State-Transition
design
Diagram
data
Control Specification (CSPEC)
design
7
Abstraction
Data Abstraction
Procedural Abstraction
Architecture Design
“The overall structure of the software and the ways in which that
structure provides conceptual integrity for a system.”
Design can be represented as
Structural Models
Defines the components of a system (e.g., modules, objects, filters) and
How the components are packaged and interact with one another.
Framework Models
Increase level of abstraction
Dynamic Models and Process Models
Predicts behavioral and reliability aspects
Functional Models
Depicts functional Hierarchy.
Patterns
a pattern is “a common solution to a common
problem in a given context.” While architectural
styles can be viewed as patterns describing the
high-level organization of software (their
macroarchitecture), other design patterns can be
used to describe details at a lower, more local level
(their microarchitecture).
Creational patterns (example: builder, factory,
prototype, and singleton)
Structural patterns (example: adapter, bridge,
composite, decorator, façade, flyweight, and proxy)
Behavioral patterns (example: command,
interpreter, iterator, mediator, memento, observer,
state, strategy, template, visitor)
Design Pattern
Easier to change
Easier to build
Easier to maintain
Sizing Modules: Two Views
What's How big
inside?? is it??
MODULE
Information Hiding
module • algorithm
controlled
interface • data structure
• details of external interface
• resource allocation policy
clients "secret"
16
Functional Independence
17
Cohesion
High Cohesion
Functional
Sequential
Communicational
Procedural
Temporal
Logical
Coincidental Low
Examples of Cohesion-1
Function A
Function B
Function C
Procedural
Related by order of functions
Examples of Cohesion-2
Function A
Function A
Function B
Function B
Function C
Function C
Sequential
Communicational Output of one is input to another
Access same data
Function A part 1
Function A part 2
Function A part 3
Functional
Sequential with complete, related functions
Coupling
High Coupling
Content
Common
External
Control
Loose
Stamp
Data
Uncoupled Low
Content Coupling : (worst) When a module
uses/alters data in another module
Common Coupling : 2 modules communicating
via global data
External Coupling :Modules are tied to an
environment external to the software
Control Coupling : 2 modules communicating
with a control flag
Stamp Coupling : Communicating via a
data structure passed as a parameter. The
data structure holds more information than
the recipient needs.
Data Coupling : (best) Communicating
via parameter passing. The parameters
passed are only those that the recipient
needs.
No data coupling : independent modules.
Summary
COHESION COUPLING
Open Door
walk to door;
reach for knob;