Unit 3 Software Design Notes
Unit 3 Software Design Notes
Assistant Professor
Subject :- SEPM
Class :- CS 3 Year
Department of Computer Science
and Engineering SYLLABUS
Unit III: Software Design
The Software Design Process, Design Concepts
and Principles, Software Modeling and UML,
Architectural Design, Architectural Views and
Styles, User Interface Design, Function oriented
4
Department of Computer Science
Software Design
and Engineering
6
Department of Computer Science
Objectives of Software Design
and Engineering
6. Accommodate change –
The software should be designed in such a way that it
12
accommodates the change implying that the software should
adjust to the change that is required to be done as per the
user’s need.
Department of Computer Science
and Engineering 7. Degrade gently –[Robust]
The software should be designed in such a way that it degrades
gracefully which means it should work properly even if an error
occurs during the execution.
8. Assessed or quality –
The design should be assessed or evaluated for the quality
meaning that during the evaluation, the quality of the design
13
needs to be checked and focused on.
Department of Computer Science
and Engineering
9. Review to discover errors –
The design should be reviewed which means that the
overall evaluation should be done to check if there is any
error present or if it can be minimized.
16
3. Modularity - Software architecture is divided into components
called modules
Design concepts..............
Department of Computer Science
and Engineering
4. Software Architecture - It refers to the overall structure of the
software and the ways in which that structure provides conceptual
integrity for a system. Good software architecture will yield a good
return on investment with respect to the desired outcome of the
project, e.g. in terms of performance, quality, schedule and cost.
19
The Software Design Process
Department of Computer Science
and Engineering
21
The Software Design Process
Department of Computer Science
and Engineering
1. Data Design
2. Architectural Design
24
3. Interface Design
4. Component Level/Procedural Design
Elements of software Analysis model and Design Model
Department of Computer Science
and Engineering
25
Department of Computer Science
and Engineering
26
Department of Computer Science
and Engineering Issues in architectural design includes:
29
Department of Computer Science
and Engineering The detailed design may include:
32
Department of Computer Science
Architectural Style
and Engineering
34
Architectural styles Objectives
Department of Computer Science
and Engineering
Each style will desecribe a system category that consists of :
1. A set of components(eg: a database, computational modules)
that will perform a function required by the system.
2. The set of connectors will help in coordination, communication,
and cooperation between the components.
3. Conditions that how components can be integrated to form
the system.
35 4. Semantic models that help the designer to understand the
overall properties of the system.
5. The use of architectural styles is to establish a structure for all
the components of the system.
Types of Architectural styles:
1. Data centred architectures:
Department of Computer Science
and Engineering
1. A data store will reside at the center of this architecture and is accessed
frequently by the other components that update, add, delete or modify the
data present within the store.
2. The figure illustrates a typical data centered style. The client software access
a central repository. Variation of this approach are used to transform the
repository into a blackboard when data related to client or data of interest
for the client change the notifications to client software.
3. This data-centered architecture will promote integrability. This means that
36 the existing components can be changed and new client components can
be added to the architecture without the permission or concern of other
clients.
4. Data can be passed among clients using blackboard mechanism.
Department of Computer Science
and Engineering
37
39
1. It is used to create a program that is easy to scale and modify. Many sub-
styles exist within this category. Two of them are explained below.
2. Remote procedure call architecture: This components is used to present in
a main program or sub program architecture distributed among multiple
computers on a network.
3. Main program or Subprogram architectures: The main program structure
decomposes into number of subprograms or function into a control
hierarchy. Main program contains number of subprograms that can
40 invoke other components
Department of Computer Science
and Engineering
41
42
5. Layered architecture:
Department of Computer Science
and Engineering
43
Department of Computer Science
and Engineering
44
Layered architecture:
Architectural Views
Department of Computer Science
and Engineering 1. The latest thinking in architecture descriptions recommends the concept
of architectural views.
1. Logical view: the services that the system provides to end-users depicted
with UML model types: Class diagram, Communication diagram, Sequence
diagram .
3. Process view : The process view deals with the dynamic aspects of the
system, explains the system processes and how they communicate, and
focuses on the runtime behavior of the system. The process view addresses
concurrency, distribution, integrators, performance, and scalability, etc. UML
Diagrams to represent process view include the Activity diagram.
4. Physical view: The physical view depicts the system from a system engineer's
point-of-view. It is concerned with the topology of software components on
47
the physical layer, as well as the physical connections between these
components. This view is also known as the deployment view. UML Diagrams
used to represent physical view include the Deployment diagram.
Architectural Views........
Department of Computer Science
and Engineering
48
Department of Computer Science
Architectural Views Models
and Engineering
49
User interface design
Department of Computer Science
• User interface design is an iterative process, where each iteration elaborate and
and Engineering
50 refines the information developed in the preceding step
• General steps for user interface design
1) Using information developed during user interface analysis, define user interface
objects and actions (operations)
2) Define events (user actions) that will cause the state of the user interface to
change; model this behavior
3) Depict each interface state as it will actually look to the end user
4) Indicate how the user interprets the state of the system from information
provided through the interface
Objectives
To suggest some general design principles for user
interface design
To explain different interaction styles
To introduce styles of information presentation
To describe the user support which should be built-in to
user interfaces
To introduce usability attributes and system approaches
to system evaluation
Department of Computer Science
and Engineering
53
(!) Problems
Command
GUI
language
manager
interpreter
Operating system
Department of Computer Science
and Engineering
57
GUI characteristics
Characteris tic Des cription
Windows Multiple windows allow different information to be
displayed s imultaneous ly on the user’s s creen.
Icons Icons different types of information. On s ome sys tems ,
icons repres ent files; on others, icons repres ent
process es .
Menus Commands are selected from a menu rather than typed
in a command language.
Pointing A pointing device s uch as a mouse is us ed for s electing
choices from a menu or indicating items of interes t in a
window.
Graphics Graphical elements can be mixed with text on the same
display.
Department of Computer Science
GUI advantages
and Engineering
59 They are easy to learn and use.
Users without experience can learn to use the system
quickly.
The user may switch quickly from one task to
another and can interact with several different
applications.
Information remains visible in its own window when
attention is switched.
Fast, full-screen interaction is possible with immediate
access to anywhere on the screen
Department of Computer Science
and Engineering
60
User-centred design
The aim of this chapter is to sensitise software engineers
to key issues underlying the design rather than the
implementation of user interfaces
User-centred design is an approach to UI design where
the needs of the user are paramount and where the
user is involved in the design process
UI design always involves the development of prototype
interfaces
Department of Computer Science
and Engineering
User interface design process
61
Produce
Design Evaluate design
dynamic design
prototype with end-users
prototype
Executable Implement
prototype final user
interface
Department of Computer Science
and Engineering
UI design principles
62
UI design must take account of the needs,
experience and capabilities of the system users
Direct manipulation
Menu selection
Form fill-in
Command language
Natural language
Advantages and disadvantages
Department of Computer Science
and Engineering
70 Interaction Main advantages Main disadvantages Application
style examples
Direct Fast and intuitive May be hard to Video games
manipulation interaction implement CAD systems
Easy to learn Only suitable where
there is a visual
metaphor for tasks
and objects
Menu Avoids user error Slow for experienced Most general-
selection Little typing users purpose systems
required Can become complex
if many menu options
Form fill-in Simple data entry Takes up a lot of Stock control,
Easy to learn screen space Personal loan
processing
Command Powerful and Hard to learn Operating systems,
language flexible Poor error Library information
management retrieval systems
Natural Accessible to Requires more typing Timetable systems
language casual users Natural language WWW information
Easily extended understanding retrieval systems
systems are unreliable
Department of Computer Science
and Engineering
User interface (UI) analysis and design
71
User interface (UI) design analysis is the study of how users use a
particular product or system to achieve goals by performing
tasks. User analysis studies users, who they are and what tasks they
might need to perform. Task analysis studies how the users actually
use the product to perform their tasks.
Department of Computer Science
and Engineering
72
1. Modeless:
2. Flexible:
3. Interruptible:
4. Helpful
preferences
5. Accessible and
navigable
6. Interactive &
facilitative
Interface Design golden Rules
Department of Computer Science
and Engineering
80
1. Remember
2. Forgiving
3. Inform
4. Frequency
5. Context
Organize
1. Continuity
2. Consistency
3. Predictable
expectative
attitude
FUNCTION-ORIENTED DESIGN:
In function-oriented design, the system is comprised of many
Department of Computer Science
and Engineering
83
Department of Computer Science
and Engineering
Functional design process:
Data-flow design: Model the data processing in the system using
data-flow diagrams.
Structural decomposition: Model how functions are
decomposed to sub-functions using graphical structure charts.
Detailed design: The entities in the design and their interfaces
are described in detail. These may be recorded in a data
84 dictionary and the design expressed using a PDL.
Department of Computer Science
SA/SD COMPONENT BASED DESIGN
and Engineering
Structured Analysis and Structured Design (SA/SD) is a diagrammatic
notation that is designed to help people understand the system. The basic
goal of SA/SD is to improve quality and reduce the risk of system failure. It
establishes concrete management specifications and documentation.
It focuses on the solidity, pliability, and maintainability of the
system. Basically, the approach of SA/SD is based on the Data Flow
Diagram. It is easy to understand SA/SD but it focuses on well-defined
system boundary.
SA/SD is combined known as SAD and it mainly focuses on the following
3
85 points:
1.System
2.Process
3.Technology
Department of Computer Science
and Engineering
SA/SD COMPONENT BASED DESIGN…………
Structured analysis is a set of techniques and graphical tools that allow the
analyst to develop a new kind of system specification that are easily
understandable to the user.
Goals of SASD
Improve Quality and reduce the risk of system failure
Establish concrete requirements specifications and complete requirements
86 documentation
Focus on Reliability, Flexibility, and Maintainability of system
Department of Computer Science
SA/SD involves 2 phases:
and Engineering
The content that is not described in the DFD is described in the data
dictionary. It defines the data store and relevant meaning. A physical data
dictionary for data elements that flow between processes, between
entities, and between processes and entities may be included. This would
also include descriptions of data elements that flow external to the data
stores. A logical data dictionary may also be included for each such data
element. All system names, whether they are names of entities, types,
relations, attributes, or services, should be entered in the dictionary.
88
Department of Computer Science
SA/SD involves 2 phases:
and Engineering
3. State Transition Diagram:
4. ER Diagram:
89
ER diagram specifies the relationship between data store. It is basically
used in database design. It basically describes the relationship between
different entities.
Department of Computer Science
SA/SD involves 2 phases:…………….
and Engineering
2. Design Phase:
Design Phase involves structure chart and pseudocode.
1.Structure Chart:
It is created by the data flow diagram. Structure Chart specifies how DFS’s
processes are grouped into tasks and allocate to the CPU. The structured
chart does not show the working and internal structure of the processes or
modules and does not show the relationship between data or data-flows.
Similar to other SASD tools, it is time and cost-independent and there is
no error-checking technique associated with this tool. The modules of a
90 structured chart are arranged arbitrarily and any process from a DFD can
be chosen as the central transform depending on the analysts’ own
perception.
2.Pseudo Code:
92
components.
Component Based Design:
Department of Computer Science
and Engineering
93
components.
Principle Component Based Design:
component-level design can be represented by using some
Department of Computer Science
and Engineering
These metrics are black box in the sense that they do not
require any knowledge of the inner workings of a particular
software component.
100
2. Object Oriented Design Metrics:
Department of Computer Science
and Engineering
There are nine measurable characteristics of object-oriented
design and those are:
1. Size: It can be measured using following factors:
Population: means total number of classes and operations.
Volume: means total number of classes or operation that is
collected dynamically.
Length: means total number of interconnected design
101 elements.
Functionality: is a measure of output delivered to the
customer.
Department of Computer Science
and Engineering 2. Object Oriented Design Metrics:…………
2. Complexity: It is measured representing the characteristics
that how the classes are interrelated with each other.
3. Coupling: It is a measure stating the collaboration between
classes or number of messages that can be passed
between the objects.
4. Completeness: It is a measure representing all the
requirements of the design component.
102
5. Cohesion: It is a degree by which we can identified the set
of properties that are working together to solve particular
problem.
Department of Computer Science
and Engineering 2. Object Oriented Design Metrics:……………………..
6. Sufficiency: It is a measure representing the necessary
requirements of the design component.
7. Primitiveness: The degree by which the operations are
simple, i.e. number of operations independent from other.
8. Similarity:The degree by which we measure that two or
more classes are similar with respect to their functionality
103
and behavior.
9. Volatility:Is the measure that represents the probability of
changes that will occur.
Department of Computer Science
and Engineering
3. User Interface Design Metrics:
•classes,
•their attributes,
•operations (or methods),
107 •and the relationships among objects.
Department of Computer Science
Class Diagram…..
and Engineering
Class Visibility
The +, - and # symbols before an attribute and operation name in a
class denote the visibility of the attribute and
operation
109
Department of Computer Science
Class Diagram…..
and Engineering
110
Department of Computer Science
Class Diagram…..
and Engineering
112
State chart Diagrams
Department of Computer Science
and Engineering
114
State chart Diagrams
Department of Computer Science
and Engineering
115
Department of Computer Science
and Engineering
State chart Diagram for Online ordering System
116
Department of Computer Science
and Engineering
117