Professional Documents
Culture Documents
Process of :
- Defining architecture of the system
- components used in the design
- Interfaces to be established
- incorporate the salient features of the
system.
It’s a process of producing model of the system
It’s a phase in software engineering life cycle
process.
Its platform independent or platform dependent
design
Design Types:
Structural Design model: Represent architecture as
an organized collection of program components.
Static components needs to be developed so that
it can be developed as independent unit.
Framework design model: Helps to increase the
level of design abstraction. It identifies repeatable
architecture design or framework or patterns that
are encountered in similar type of applications.
Dynamic design model: It address behavior aspects
of program architecture configuring the system
and respond to external events.
Process design model: Deals with the technical
aspects that the system must accommodate.
Functional design model: Represents functional
hierarchy of a system.
Design Process
System design process involves deciding
which system capabilities are to be
implemented in software and which in
hardware. .
The process of converting a system
specification in to an executable system is
called software design.
Designers do not arrive at a finished design
immediately but develop the design iteratively
through a number of different versions.
Levels of design process:
Design process has two levels.
System design or Top-level design
Detailed design or Logic design
System design
makes use of modules needed for the
system, specifications of the modules and
module interconnections are decided.
Detailed design concentrates on:
the internal design of the modules,
processing logic and data structures.
Detailed design may be function-oriented or
object-oriented.
Design process activities
Architectural design
Abstract specification
Interface design
Component design
Data structure design
Algorithm design
Architectural design
The design process for identifying the sub-
systems making up a system and the framework
for sub-system control and communication is
architectural design.
The output of this design process is a description
of the software architecture.
An early stage of the system design process.
Represents the link between design and
requirements engineering process
Software architecture document serves as design plan. It acts
as a starting point for design. It hides details and allows
designers to focus on key system abstractions.
Weather map
system
Controller Controller
Accounting info. system consoles
system
Activitylogging
system
©Ian Sommerville 1995 Software Engineering, 5th edition. Chapter 31. Slide ##
System structuring:
First activity in architectural design
Concerned with decomposing the system into
interacting sub-systems.
The architectural design is normally expressed as a
block diagram presenting an overview of the system
structure.
More specific models showing how sub-systems share
data, are distributed and interface with each
other may also be developed.
Following models are used for structuring the system:
Repository model
Client-server model
Layered model
Architectural models
Design Program
translator Project repository editor
Code Report
generator generator
Advantages
Efficient way to share large amounts of data.
Subsystems that produce data need not be concerned with how data is
used by other sub systems
Activities such as backup, security, access control and recovery are
centralized so that sub systems can concentrate on their principle
functionality rather than be concerned with these issues.
Its easy to integrate new tools given that they are compatible with the
agreed data model.
Disadvantages:
Subsystems must agree on repository model where performance may
be compromised
Some times may be difficult to integrate new sub-systems if their
data models do not fit agreed schema
Different subsystems may have different requirements for security,
recovery etc and repository model forces for same policy in all subsystems.
Although it is possible to distribute the logically centralized repository
there may be problems with data redundancy and inconsistency
Client server model:
In this model system is organized as set of services
and associated servers and clients that access and
use services.
Major components of the model:
- Set of servers that offer services to other
subsystems.
Examples of servers are print servers, file
servers etc - Set of clients that call on the services
offered by servers. These are considered
subsystems.
- Network that allows clients to access these
services. Necessary if client and server are in
distributed systems
Architecture of a firm and picture library
system
Internet
Disadvantage :
Structuring system in this way is difficult.
Services required by a user of bottom level may
therefore have to punch through adjacent layers to get
access to services that are provided several levels
beneath
Performance can be problem if there are many layers
before it is processed.
Control models:
System System 2
System 4 controller
System 3
Event driven Models:
Subsystem Subsystem
1 2
Subsystem Subsystem
3 4
Advantages:
1.New subsystems can be easily added to
handle particular class of events
2.Any sub system can activate any other sub
system without knowing its name and
location.
Disadvantages:
1.Different subsystems may register their
interest for the same event, causing conflict
2.Difficult to determine when the result of the
event will be available.
Interrupt driven model:
Exclusively used in real time systems with
stringent timing requirement.
Real time systems are provided with interrupt –
driven control
In this model:
Events are linked to Interrupts
Each interrupt is associated with memory location
where handler’s address is stored.
The table containing the addresses of Interrupt
handler’s is called Interrupt vector table.
At occurrence of an interrupt, the control is
transferred to its handler.
Now handler takes control of the process.
Interrupts
Interrupt
vector
Disadvantages:
It involves complex programming and
validation to generate same interrupt timing
during testing
Number of interrupts to be handled is limited
by hardware.
Modular decomposition:
Issue()
Send
remainder()
Payment Acceptpayment(
Invoice# )
Date
Amount
Customer#
Advantages:
The implementation of objects can be modified without
affecting other objects because objects are loosely coupled.
It makes the system structure easily understandable
Object oriented programming facilitates implementation of
objects in parallel.
Objects can be reused
Disadvantages:
The objects must explicitly refer names and interface of
other objects offering the services.
Complex activities are difficult to represent as object
If an interface change, the effect of that change on all users
of the changed object must be evaluated.
Function oriented pipelining:
This model shows how inputs are processed by
functional transformation and how outputs are
produced.
Each processing step is a functional
transformation
These transformations may execute
sequentially or in parallel.
Pipeline model of an invoice processing
system:
Issue Receipts
receipts
Read Identify
issued payment
invoices s
Issue
Find payment
payment remaind
s due er
Invoices Payments
Remainder
s
Advantages of function oriented pipelining:
Reuse of transformations is possible
New transformations are easy to add
It is simple to implement and transformations
may execute sequentially or in parallel
It is easy to understand the system in terms of
input and output processing
Disadvantages:
It requires a common format for data transfer
that can be recognized by all transformations
Interactive systems are difficult to write using
data flow model because of the need for a
stream of data to be processed
Domain specific
architectures
Some architectural models are specific to
particular application domain, called Domain
specific architecture.
2 types of domain specific architectural
models are:
- Generic models
- Reference models
Generic model:
Symbol table
Syntax tree
Presentation
Session
Transport
Network
Datalink
Physical
OSI MODEL:
It is a way of sub-dividing a communications system into
smaller parts called layers. A layer is a collection of
conceptually similar functions that provide services to the
layer above it and receives services from the layer below
it.
Physical Layer: defines the electrical and physical
specifications for devices. It defines the relationship
between a device and a transmission medium, such as a
copper or optical cable.
Establishment and termination of a connection to a
communications medium
Data Link Layer provides the functional and procedural
means to transfer data between network entities and to
detect and possibly correct errors that may occur in the
Physical Layer
The Network Layer provides the functional and procedural
means of transferring variable length data sequences from
a source to a destination via one or more networks, while
maintaining the quality of service requested by the
Transport Layer
The Transport Layer provides transfer of data
between end users, providing reliable data
transfer services to the upper layers
The Session Layer controls the connections
between computers. It establishes, manages and
terminates the connections between the local
and remote application.
The Presentation Layer establishes context
between Application Layer entities, in which the
higher-layer entities may use different syntax
and semantics if the presentation service
provides a mapping between them.
The Application Layer is the OSI layer closest to
the end user, which means that both the OSI
application layer and the user interact directly
with the software application.
Design quality
Design quality is an elusive concept.
A good design may be a design that allows efficient code to be produced
A 'good' design may have characteristics like:
- Capturing all the functionalities of the system correctly
- Easily understandable
- Efficient
- Easily amenable to change
Adaptability, robustness, clarity, compactness , flexibility etc
Understandability is major factor because it influences maintainability.
However, goodness of design involves many factors, which depend on
particular application. A design solution which is good for one application
may not be good for another application
Ex: For embedded applications, comprehensibility takes back seat .since
it must be implemented in a limited size of memory. So to achieve
compactness, comprehensibility is sacrificed.
Quality characteristics are equally applicable to function-oriented and
object-oriented designs
Cohesion
Cohesion is measure of relative functional strength of
elements of a module
Cohesion implies that a component or class
encapsulates only attributes and operations that are
closely related to one another .
Modules with good cohesion require less coupling
Strong cohesion is desirable
A cohesive module performs a single task within a
software procedure with little interaction with
procedures that are performed in other parts of a
program.
Various types in cohesion:
Coincidental cohesion
Logical cohesion
Communication cohesion
Sequential cohesion
Functional cohesion
Procedural cohesion
Coincidental cohesion
This cohesion occurs when parts of a module
are grouped arbitrarily (randomly)
Only relationship between parts is that they
have been grouped together.
Ex: Utility class consisting of utility functions
like cleaning disk, antivirus, copying from
external disk etc.
Logical cohesion
Data Set
Output
Sequential cohesion
Module 1
Module 1 Module 1
Functional Cohesion:
Module 1 Module 2
Common coupling:
This coupling occurs when a number of components
all make use of global variable.
Although this is sometimes necessary, common
coupling can lead to uncontrolled error propagation
and unforeseen side effects when changes are made.
Data
Module 1 sharing Module 2
Control coupling:
This coupling occurs when one module controls the
logic flow of another module.
Passing Yes or No flag from one module to another
Module A sends control flag to Module B.
Depending on the type of flag the sequence of
processing in module B is controlled
Module 1 Module 2
Stamp coupling:
This coupling occurs when Class B is declared as
a type for an argument of an operation of Class
A, Because Class B is now a part of the
definition of Class A, modifying the system
becomes more complex
Data
Module 1 Module 2
Data coupling:
This coupling occurs when operations pass
long strings of data arguments
Since communication between classes grows
and complexity increases
Testing and maintenance are more difficult.
Module 1 Module 2
External coupling:
This coupling occurs when one component communicates and
collaborates with infrastructure components (eg., Operating system
functions) . Modules share external data format. Mostly used in
communication protocols and device interfaces. Ex: CAN
(Controlled Area Network) protocol used in Automotive
applications
Although this type of coupling is necessary, it should be limited to a
small number of components or classes within the system.
Module A
Protocol Device
Interface
Design Principles
Design principles enable software designers to come up
with a good design to the system
Problem partitioning
Abstraction
Modularity
Problem Partitioning:
Dividing complex problems into small sub programs.
Each sub program can be handled independently.
Then integrate to form whole executable program.
It’s a method of DIVIDE AND CONQUER
Abstraction:
Method of describing the program functionality
Levels of Abstraction:
Data abstraction:
Collection of data describing the data object
Ex: Door – Type of door, door weight etc
Procedural abstraction: Reflects functional
abstraction.
Sequence of instructions that has specific
functionality
Ex: Open door.:
Control Abstraction: States desired state with out
specifying exact control mechanism.
Ex: Applying the break
Modularity: Module contains :
Set of instructions,
Some processing logic
Some Data structures
Module can be compiled and stored in library and
included in program.
Modularity is Logical partitioning of software design
Modularity does imply interface overheads related to
info exchange
Modularity has 5 important critiria.
Modular decomposition
Modular composability
Modular understandability
Modular continuity
Modular Protection
Modular Decomposition:
Systematic method of decomposing a problem into
sub problems, to reduce complexity of overall
problems
Modular composability:
It’s a method that enables the existing design
components to be assembled into a new system
Modular understandability:
Making a module understand as a single unit without
referring to other modules.
Modular continuity:
Any small change in the system requirements ,
changes individual modules, but try to make the
impact less
Modular Protection:
Any problem in the module and its effects are
constrained within the module, so that impact of that
error will be minimum.
Design Notation:
Design notation along with structural programming
concepts help designer to represent Procedural details
Structured Programming is Procedural design
technique.
Some constructs are
Sequential Construct
Conditional construct
Repetitive construct
The notations are :
Graphical Notation
Flow charts
Box diagrams
Tabular Design Notation
Decision table
State diagrams
PDL
Flow charts: Popular way of representing
programming logic.
Conditional
Sequence
Repetition
Box diagrams:
F T
cLoop
Else
Loop
Then
Part condition
part
Conditional box notation Looping box notation
Tabular design notation:
Decision tables:
It translates actions and conditions into
tabular form. It is divided into action stub and
condition stub
State machine model
A state machine is a different way of thinking
about computation
A state machine has some number of states,
and transitions between those states
Transitions occur because of inputs
A “pure” state machine only knows which
state it is in—it has no other memory or
knowledge
Switch on Input to the Set the
the system system timer
E1 E2 E3
Washing machine
W T
R1 R4
TIMER
LINKED TO R2
WHISTLE
WHISTLE
BLOWS R3
WHISTLE
FIRST TIME BLOWS
SECOND
TIME
PDL:
Programming design language
Also called psuedocode
It uses vocabulary of English and overall syntax
of structured programming language
It’s a generic reference
PDL may look like programming language.
PDL cannot be compiled
PDL uses English words embedded directly
within statements
While using PDL no need to worry about syntax
Design Strategies:
Functional Design
Object oriented design