Module 4
Module 4
Engineering
Module – 4 – Software
Design
Winter 24-25 1
Module: 4
Software Design
• Design concepts and principles
• Abstraction
• Refinement
• Architectural design
• Refactoring of designs
• User-Interface Design
Winter 24-25 2
Software
Design
• Software Design encompasses the set of principles, concepts and practices
that lead to the development of a high-quality system or a product.
Winter 24-25 4
Design and Quality Goals
Software
The designdesign is an
must implement all ofiterative process through
the explicit requirements contained inwhich
the
analysis model,
requirements areand it must accommodate
translated all of the implicit
into a “blueprint” requirements the
for constructing
desired by the customer.
software.
The design must be a readable, understandable guide for those who
generate code and for those who test and subsequently support the
software.
The design should provide a complete picture of the software, addressing the
data, functional, and behavioral domains from an implementation
perspective.
Winter 24-25 5 5
Quality Guidelines
A design should exhibit an architecture that
• The design should be structured to degrade gently, even when aberrant data,
events, or operating conditions are encountered.
• The design should be assessed for quality as it is being created, not after the fact.
Winter 24-25 7
Quality Attributes [FURPS]
Winter 24-25 10
Data
Abstraction
door
manufacturer
model number
type
swing direction
inserts
lights
type
number
weight
opening mechanism
Winter 24-25 11
DataAbstraction
Winter 24-25 13
Procedural
Abstraction
open
details of enter
algorithm
Winter 24-25 14
Procedural Abstraction
• A procedural abstraction refers to a
sequence of instructions that have a
specific and limited function.
• The name of a procedural abstraction
implies these functions, but specific details
are suppressed.
• An example of a procedural abstraction
would be the word open for a door.
• Open implies a long sequence of
procedural steps (e.g., walk to the door,
reach out and grasp knob, turn knob and
pull door, step away from moving door,
Winter 24-25
etc.). 15
Architecture
• The overall structure of the software and the ways in which
that structure provides conceptual integrity for a system.”
• Process models focus on the design of the business or technical process that
the system must accommodate.
independently
cost of software
optimal number of
Winter 24-25 number of modules 21
modules
Information Hiding
• The principle of information hiding suggests that modules be
“characterized by design decisions that (each) hides from all others.
Winter 24-25 22
Information Hiding
module
controlled • algorithm
interface • data structure
• details of external interface
• resource allocation policy
clients "secret"
Winter 24-25 23
Why Information Hiding?
Reduces the likelihood of “side effects”
Limits the global impact of local design decisions
Emphasizes communication through controlled interfaces
Discourages the use of global data
Leads to encapsulation—an attribute of high quality design
Results in higher quality software
Winter 24-25 24
Functional Independence
Functional independence is achieved by developing modules with
"single-minded" function and an "aversion" to excessive interaction
with other modules.
Cohesion is an indication of the relative functional strength of a
module.
A cohesive module performs a single task, requiring little
interaction with other components in other parts of a program.
Coupling is an indication of the relative interdependence among
modules.
Coupling depends on the interface complexity between
Winter 24-25 25
modules, the point at which entry or reference is made to a
Refinement
• It begin with a statement of function (or description of information) that is defined
at a high level of abstraction.
• That is, the statement describes function or information conceptually but provides
no information about the internal workings of the function or the internal structure
of the information. You then elaborate on the original statement, providing more
and more detail as each successive refinement (elaboration) occurs.
open
Winter 24-25 27
Aspects
An Aspect is a representation of a cross-cutting concern.
Consider two requirements, A and B. Requirement A crosscuts
requirement B “if a software decomposition [refinement] has been
chosen in which B cannot be satisfied without taking A into account.
These concerns include requirements, use cases, features, data
structures, quality-of-service issues, variants, intellectual property
boundaries, collaborations, patterns and contracts
Winter 24-25 28
Refactoring
"Refactoring is the process of changing a software system in such a way that it does not
alter the external behavior of the code [design] yet improves its internal structure.”
or any other design failure that can be corrected to yield a better design.
Winter 24-25 29
OO Design Concepts
Inheritance—all responsibilities of a superclass is immediately inherited by
all subclasses
Messages—stimulate some behavior to occur in the receiving object
Polymorphism—a characteristic that greatly reduces the effort required to
extend the design
Winter 24-25 30
Design Classes
interaction
Business domain classes – refined from analysis classes; identify attributes and
methods that are required to implement some element of the business domain
Persistent classes – represent data stores (e.g., a database) that will persist beyond
Winter 24-25
the execution of the software
Design Model
• The design model can be viewed in two different
dimensions as illustrated in following figure.
• Process dimension
• Abstraction dimension
Winter 24-25 32
The Design Model
Winter 24-25 33 3
Design Model
Elements
Data elements
Architectural elements
Interface elements
Component elements
Deployment elements
Winter 24-25
Data/Class Design Elements
• Data design creates a model of data and objects that is represented at a high level of
abstraction
representations
• At the program component level, the design of data structures and the associated
• At the application level, the translation of a data model into a database is essential to
• At the business level, the collection of information stored in different databases and
(2) Specific requirements model elements such as data flow diagrams and their
relationships
• Interface design tells how information flows into and out of the system and
• user interface
• external interfaces
• internal interfaces
Winter 24-25 37
Component Design
Elements
• Component level design describes the internal detail of each software
component like data structure definitions, algorithms, and interface
specifications.
Winter 24-25 39
Software Architecture Design
Architectural Styles
Architectural Design
Architectural Mapping
Winter 24-25 40
Why Architecture?
Architecture of a system describes the components and how they fit
together.
requirements,
Winter 24-25 42
Architectural Styles
The architectural styles is used to describes a system which has :
among components,
(3)constraints that define how components can be integrated to form the system,
and
(4)semantic
Winter 24-25 models that enable a designer to understand the overall properties
Taxonomy of Styles in Software
Data-centered architectures
There is a central data server which is accessed by clients
Data flow architectures
Data travels through a series of components
Call and return architectures
Classical
Object-oriented architectures
Modern style. Components pass messages
Layered architectures
High-level to machine level
Winter 24-25
Data-Centered Architecture
Winter 24-25
Data-Centered Architecture
A data store (e.g., a file or database) resides at the center of this architecture
Passive repository means the client software accesses the data independent of
architecture
Winter 24-25 are distributed across multiple 48
Object-oriented architectures
message passing.
Winter 24-25 49
Layered Architecture
A number of different layers are
2) Define archetypes
Winter 24-25 51
1. Represent the System in Context
Winter 24-25 52
2. Define Archetypes
Winter 24-25 53
3. Refine the Architecture into Components
Winter 24-25 54
4. Describe Instantiations of the System
Winter 24-25 55
Architectural Mapping
Structured design provides a convenient transition from a data flow diagram to software Architecture
1. Transaction flow - a single data item triggers information flow along one of many paths
2. Transform flow
o overall data flow is sequential and flows along a small number of straight line paths
o Incoming Flow: The paths that transform the external data into an internal form
o Transform Center: The incoming data are passed through a transform center and begin to move along paths
that lead it out of the software
o Outgoing Flow: The paths that move the data out of the software
Winter 24-25 56
Steps Involved
Step 2. Review and refine data flow diagrams for the software.
Step 4. Isolate the transform center by specifying incoming and outgoing flow boundaries
Step 7. Refine the first iteration program structure using design heuristic
Winter 24-25 57
Step 1. Review the fundamental system model.
Winter 24-25 58
Step 2. Review and refine data flow diagrams for the software.
Winter 24-25 59
Step 3. Determine whether DFD has transform or transaction flow
characteristics.
in general---transform flow
Winter 24-25 60
Step 4. Isolate the transform center by specifying incoming and outgoing flow boundaries
Winter 24-25 61
Step 5. Perform “first-level factoring”
Winter 24-25 62
Step 6. Perform “second-level factoring”
Winter 24-25 63
Step 7: Refine the first iteration program structure using design heuristics
Winter 24-25 64