System Design: What Is Design? Example Designs in Real Life
System Design: What Is Design? Example Designs in Real Life
System Design: What Is Design? Example Designs in Real Life
System Design
What is Design? It is representation of something that is to be built.
Example Designs in Real Life
Analysis vs Design
For all practical purposes, if we view analysis as "what" and design as "how" then they are
equivalent operations that cannot be separated from each other.
Term design is used in two ways a noun and a verb
Verb: represents the process of design
Noun: represents result of the design process
Design of an existing system
Design of a system to be constructed
Plan for a solution
Software Design
creates a representation or model of the software.
is done before system is implemented.
is the intermediate language between requirements and code.
activity begins with a analyzed set of requirements .
determines major characteristics of a system.
Software design deals with transforming the customer requirements, as described
in the SRS document, into a form (a set of documents) that is suitable for
implementation in a programming language.
Design Process
Design
Process
Architectural/
System Design
Architectural Design
2. Data-flow Architecture
- input data is to be transformed through a series of computational components
into output data
- has set of components called filters, connected by pipes to transmit data from one
component to next
Structured Charts
also called Module chart, Hierarchy chart
a tool to aid in software design
graphic depiction of the decomposition of a problem
Illustrates the partitioning of a problem into sub problems and shows hierarchical
relationships among the parts
Symbols
Example:
Design Principles
Two fundamental principles in the design process are:
1. Problem Partitioning:
Basic Principle Divide and conquer
Divide the problem into manageably small pieces
Each piece can be solved separately
Each piece can be modified separately
Pieces can be related to the application
Pieces cannot be independent; they must communicate
2. Abstraction:
An external view of given system
Allows designer to understand and use a component without looking at the
internal details of the component
Useful for understanding and determining design of existing systems
Functional Abstraction
A module is specified by the function it performs
Module treated as a input/output function
Example:
Module to compute sine of a value can be abstractly represented by
function sin()
Module to sort an input array can be represented by function sort()
Logic Design
B. BOTTOM-UP APPROACH
The bottom-up approach starts from the designing bottom modules and proceeds
through progressively higher levels.
C. MODULARITY
It consists of components that can be implemented separately. Change to one
component has minimal impact on other components. Modularity supports abstraction
in software and hierarchical structuring of programs. Modularity enhances
design clarity,
eases implementation
Reduces cost of testing
Debugging and maintenance
Each module needs to support a well-defined abstraction and have a clear interface
through which it can interact with other modules.
D. COUPLING
Coupling states the strength of relation between two modules. The more connections
between modules, the more dependent they are on each other. Coupling tries to capture
how strongly modules are interconnected.
Highly coupled: modules are joined by strong interconnections
Loosely coupled: modules have weak interconnections
Coupling captures the notion of dependence. Coupling tries to capture how strongly
modules are interconnected. Coupling depends on type of information flow. If two
modules interchange large amounts of data, then they are highly independent. The
degree of coupling depends on their interface complexity. The interface complexity is
determined by number of types of parameters that are interchanged while invoking the
functions of the module.
Classification of different types of coupling will help to estimate the degree between
modules. The classification starts from low to high:
a. Data Coupling
b. Stamp Coupling
c. Control Coupling
d. Common Coupling
e. Content Coupling
Data Coupling: Two modules are said to be data coupled, if communication of modules
is through a parameter. An example is an elementary data
item passed as a parameter between two modules, e.g. an
integer, a float, a character, etc. This data item should be
problem related and not used for the control purpose. An
example of data coupling is illustrated as a module which
retrieves customer address using customer id.
Stamp Coupling: Two modules are said to be stamp coupled provided, if communication
of modules is through composite parameters such as a record in PASCAL or a structure in
C.
Control Coupling: Two modules are said to be control coupled when one module
controls the execution behavior of another module. An example of control coupling is a
flag set in one module and tested in another module.
Common Coupling: Two modules are said to be common coupled, if they share data
through some global data items. For example, C allows the developer to declare a data
element as external, enabling it to be accessed by all modules.
Content Coupling: Two modules are said to be content coupled provided one module
refers to a piece of information defined in other module. For example, if one module
branches into another module, if one module refers to or changes data in another
For example, obtain author, title, or price of book from bibliographic record, based on a
passed flag.
Procedural Cohesion: In this, a module contains number of functions in which certain
sequences have to be carried out for achieving an objective. Example, the algorithm for
decoding a message. For example, a procedurally cohesive module may: write record
A, read record A, format A for printing.
Temporal Cohesion: In this, elements of the module are executed in the same time span.
One of the most common examples of a temporally cohesive module is an initialization
routine that initializes data used by many modules throughout a system. The set of
functions responsible for initialization, start-up, shutdown of some process, etc. exhibit
temporal cohesion.
Logical Cohesion: It occurs if all the elements of a module have some logical relationship
between them and perform similar operations. e.g. error handling, data input, data
output, etc. An example of logical cohesion is the case where a set of print functions
generating different output reports are arranged into a single module.
Coincidental Cohesion: It is the lowest. A module is said to be coincidental cohesive, if it
performs set of tasks that relate to each other very loosely and functions put in are out of
pure coincidence without any design. For example, in a transaction processing system
(TPS), the get-input, print-error, and summarize-members functions are grouped into one
module. The grouping does not have any relevance to the structure of the problem.
Correctness:
A good design should correctly implement all the functionalities identified
in the SRS document.
Understandability:
A good design is easily understandable.
Efficiency:
It should be efficient.
Maintainability:
It should be easily amenable to change.