Professional Documents
Culture Documents
Ilovepdf Merged Compressed
Ilovepdf Merged Compressed
L T P J C
2 0 2 4 4
Dr. S M SATAPATHY
Associate Professor,
School of Computer Science and Engineering,
VIT Vellore, TN, India – 632 014.
SOFTWARE
DESIGN
Module – 4
Software Design
1. Cohesion, Coupling
2. Architectural Design
3. Detailed Design
3
INTRODUCTION
• Items designed:
– module structure,
– control relationship among the modules
• call relationship or invocation relationship
– interface among different modules,
• data items to be exchanged among different modules,
– data structures of individual modules,
– algorithms for individual modules.
INTRODUCTION
• Good software designs:
– seldom arrived through a single step procedure:
– but through a series of steps and iterations.
Degree of
cohesion
COINCIDENTAL COHESION
• The module performs a set of tasks:
– which relate to each other very loosely, if at all.
• the module contains a random collection of functions.
• functions have been put in the module out of pure coincidence
without any thought or design.
• Coincidental cohesion exists in modules that contain instructions that
have little or no relationship to one another.
LOGICAL COHESION
• All elements of the module perform similar operations:
– e.g. error handling, data input, data output, etc.
• An example of logical cohesion:
– a set of print functions to generate an output report arranged into a
single module.
• Logical cohesion occurs in modules that contain instructions that appear
to be related because they fall into the same logical class of functions.
TEMPORAL COHESION
• The module contains tasks that are related by the fact:
– all the tasks must be executed in the same time span.
• Example:
– The set of functions responsible for
• initialization,
• start-up, shut-down of some process, etc.
• Module exhibits temporal cohesion when it contains tasks that
are related by the fact that all tasks must be executed in the
same time-span.
PROCEDURAL COHESION
• The set of functions of the module:
– all part of a procedure (algorithm)
– certain sequence of steps have to be carried out in a certain order for
achieving an objective,
• e.g. the algorithm for decoding a message.
• Procedural Cohesion occurs in modules whose instructions although
accomplish different tasks yet have been combined because there is a
specific order in which the tasks are to be completed.
COMMUNICATIONAL COHESION
• All functions of the module:
– reference or update the same data structure,
• Example:
– the set of functions defined on an array or a stack.
• X and Y both operate on the same input data or contribute towards the
same output data. But we might consider making them separate
procedures.
SEQUENTIAL COHESION
• Elements of a module form different parts of a sequence,
– output from one element of the sequence is input to the next.
– Example:
•
sort
search
display
FUNCTIONAL COHESION
• Different elements of a module cooperate:
– to achieve a single function,
– e.g. managing an employee's pay-roll.
• When a module displays functional cohesion,
– we can describe the function using a single sentence.
Degree of
coupling
DATA COUPLING
• Two modules are data coupled,
– if they communicate via a parameter:
• an elementary data item,
• e.g an integer, a float, a character, etc.
– The data item should be problem related:
• not used for control purpose.
• The dependency between module A and B is said to be data coupled if
their dependency is based on the fact they communicate by only passing of
data. Other than communicating through data, the two modules are
independent.
STAMP COUPLING
• Two modules are stamp coupled,
– if they communicate via a composite data item
• such as a record in PASCAL
• or a structure in C.
• Stamp coupling occurs between module A and B when complete data
structure is passed from one module to another.
CONTROL COUPLING
• Data from one module is used to direct
– order of instruction execution in another.
• With common coupling, module A and module B have shared data. Global
data areas are commonly found in programming languages. Making a
change to the common data means tracing back to all the modules which
access that data to evaluate the effect of changes.
COMMON COUPLING
CONTENT COUPLING
• Content coupling exists between two modules:
– if they share code,
– e.g, branching from one module into another module.
• The degree of coupling increases
– from data coupling to content coupling.
• In OOD:
– state information is not shared in a centralized data.
– but is distributed among the objects of the system.
OOD VS. FOD
• In an employee pay-roll system, the following can be global data:
– names of the employees,
– their code numbers,
– basic salaries, etc.
• Whereas, in object oriented systems:
– data is distributed among different employee objects of the system.
• Objects communicate by message passing.
– one object may discover the state information of another object by
interrogating it.
• Of course, somewhere or other the functions must be implemented:
– the functions are usually associated with specific real-world entities
(objects)
– directly access only part of the system state information.
OOD VS. FOD
• Function-oriented techniques group functions together if:
– as a group, they constitute a higher level function.
• On the other hand, object-oriented techniques group functions together:
– on the basis of the data they operate on.
1
Why Architecture?
The architecture is not the operational software. Rather,
it is a representation that enables a software engineer
to:
(1) analyze the effectiveness of the design in meeting its
stated requirements,
(2) consider architectural alternatives at a stage when
making design changes is still relatively easy, and
(3) reduce the risks associated with the construction of
the software.
2
Why is Architecture Important?
Representations of software architecture are an enabler
for communication between all parties (stakeholders)
interested in the development of a computer-based
system.
The architecture highlights early design decisions that
will have a profound impact on all software engineering
work that follows and, as important, on the ultimate
success of the system as an operational entity.
Architecture “constitutes a relatively small, intellectually
graspable mode of how the system is structured and
how its components work together” [BAS03].
3
Architectural Descriptions
The IEEE Computer Society has proposed IEEE-Std-
1471-2000, Recommended Practice for Architectural
Description of Software-Intensive System, [IEE00]
to establish a conceptual framework and vocabulary for use
during the design of software architecture,
to provide detailed guidelines for representing an architectural
description, and
to encourage sound architectural design practices.
The IEEE Standard defines an architectural description (AD)
as a “a collection of products to document an architecture.”
The description itself is represented using multiple views, where
each view is “a representation of a whole system from the
perspective of a related set of [stakeholder] concerns.”
4
Architectural Decision Template
Used to document each major architectural decision for later review by
stakeholders who want to understand the proposed architectural
description
Design issue
Resolution
Category
Assumptions
Constraints
Alternatives
Argument
Implications
Related decisions
Related concerns
Work products
Notes 5
Architectural Genres
Genre implies a specific category within the
overall software domain.
Within each category, you encounter a number
of subcategories.
For example, within the genre of buildings, you would
encounter the following general styles: houses,
condos, apartment buildings, office buildings,
industrial building, warehouses, and so on.
Within each general style, more specific styles might
apply. Each style would have a structure that can be
described using a set of predictable patterns.
6
Architectural Styles
Each style describes a system category that encompasses:
(1) a set of components (e.g., a database, computational
modules) that perform a function required by a system, (2) a
set of connectors that enable “communication, coordination
and cooperation” among components, (3) constraints that
define how components can be integrated to form the system,
and (4) semantic models that enable a designer to
understand the overall properties of a system by analyzing the
known properties of its constituent parts.
Data-centered architectures
Data flow architectures
Call and return architectures
Object-oriented architectures
Layered architectures
7
Data-Centered Architecture
8
Data Flow Architecture
9
Call and Return Architecture
10
Layered Architecture
11
Architectural Patterns
Concurrency—applications must handle multiple tasks in a
manner that simulates parallelism
operating system process management pattern
task scheduler pattern
Persistence—Data persists if it survives past the execution of
the process that created it. Two patterns are common:
a database management system pattern that applies the storage
and retrieval capability of a DBMS to the application architecture
an application level persistence pattern that builds persistence
features into the application architecture
Distribution— the manner in which systems or components
within systems communicate with one another in a distributed
environment
A broker acts as a ‘middle-man’ between the client component and a
server component.
12
Architectural Design
The software must be placed into context
the design should define the external entities (other
systems, devices, people) that the software interacts
with and the nature of the interaction
A set of architectural archetypes should be
identified
An archetype is an abstraction (similar to a class)
that represents one element of system behavior
The designer specifies the structure of the
system by defining and refining software
components that implement each archetype
13
Architectural Context
Safehome Internet-based
Product system
control
panel target system: surveillance
Security Function function
uses
homeowner peers
uses
uses
sensors sensors
14
Archetypes
Cont roller
communicat es wit h
Node
Figure 10.7 UML relat ionships f or Saf eHome securit y f unct ion archet ypes
(adapt ed f rom [ BOS00] ) 15
Component Structure
SafeHome
Execut ive
Funct ion
select ion
Ext ernal
Communicat ion
Management
16
Refined Component Structure
SafeHome
Executive
Ext ernal
Communicat ion
Management
Security
GUI Internet
Interface
Key pad
processing scheduler phone
com m unicat ion
CP display
funct ions
alarm
sensor
sensor
sensor
sensor
sensor
sensor
sensor
sensor
sensor
17
Analyzing Architectural Design
1. Collect scenarios.
2. Elicit requirements, constraints, and environment description.
3. Describe the architectural styles/patterns that have been
chosen to address the scenarios and requirements:
• module view
• process view
• data flow view
4. Evaluate quality attributes by considered each attribute in
isolation.
5. Identify the sensitivity of quality attributes to various
architectural attributes for a specific architectural style.
6. Critique candidate architectures (developed in step 3) using the
sensitivity analysis conducted in step 5.
18
Architectural Complexity
the overall complexity of a proposed
architecture is assessed by considering the
dependencies between components within the
architecture [Zha98]
Sharing dependencies represent dependence
relationships among consumers who use the same
resource or producers who produce for the same
consumers.
Flow dependencies represent dependence
relationships between producers and consumers of
resources.
Constrained dependencies represent constraints on
the relative flow of control among a set of activities.
19
ADL
Architectural description language (ADL) provides
a semantics and syntax for describing a software
architecture
Provide the designer with the ability to:
decompose architectural components
compose individual components into larger architectural
blocks and
represent interfaces (connection mechanisms) between
components.
20
An Architectural Design Method
customer requirements
"four bedrooms, three baths,
lots of glass ..."
architectural design
21
Deriving Program Architecture
Program
Architecture
22
Partitioning the Architecture
“horizontal” and “vertical” partitioning are
required
23
Horizontal Partitioning
define separate branches of the module
hierarchy for each major function
use control modules to coordinate
communication between functions
function 1 function 3
function 2
24
Vertical Partitioning: Factoring
design so that decision making and work
are stratified
decision making modules should reside at
the top of the architecture
decision-makers
workers
25
Why Partitioned Architecture?
26
Structured Design
objective: to derive a program
architecture that is partitioned
approach:
a DFD is mapped into a program
architecture
the PSPEC and STD are used to
indicate the content of each module
notation: structure chart
27
Flow Characteristics
Transform flow
This edition of
SEPA does not
cover transaction
mapping. For a
detailed
discussion see the
SEPA website
Transaction
flow
28
General Mapping Approach
isolate incoming and outgoing flow
boundaries; for transaction flows, isolate
the transaction center
29
General Mapping Approach
Isolate the transform center by specifying incoming
and outgoing flow boundaries
Perform "first-level factoring.”
The program architecture derived using this mapping
results in a top-down distribution of control.
Factoring leads to a program structure in which top-level
components perform decision-making and low-level
components perform most input, computation, and output
work.
Middle-level components perform some control and do
moderate amounts of work.
Perform "second-level factoring."
30
Transform Mapping
b g h
a e f
d
c i
j
data flow model
x1 "Transform" mapping
x2 x3 x4
b c d e f g i
a h j
31
Factoring
direction of increasing
decision making typical "decision
making" modules
32
First Level Factoring
main
program
controller
33
Second Level Mapping
main
D
C
control
B A
A
B
C
34
User Interface Design
1
Interface Design
Easy to learn?
Easy to use?
Easy to understand?
2
Interface Design
Typical Design Errors
lack of consistency
too much memorization
no guidance / help
no context sensitivity
poor response
Arcane/unfriendly
3
Golden Rules
4
Place the User in Control
Define interaction modes in a way that does not
force a user into unnecessary or undesired actions.
Provide for flexible interaction.
Allow user interaction to be interruptible and
undoable.
Streamline interaction as skill levels advance and
allow the interaction to be customized.
Hide technical internals from the casual user.
Design for direct interaction with objects that appear
on the screen.
5
Reduce the User’s Memory Load
Reduce demand on short-term memory.
Establish meaningful defaults.
Define shortcuts that are intuitive.
The visual layout of the interface should be based on a
real world metaphor.
Disclose information in a progressive fashion.
6
Make the Interface Consistent
Allow the user to put the current task into a
meaningful context.
Maintain consistency across a family of
applications.
If past interactive models have created user
expectations, do not make changes unless there is
a compelling reason to do so.
7
User Interface Design Models
User model — a profile of all end users of
the system
Design model — a design realization of the
user model
Mental model (system perception) — the
user’s mental image of what the interface is
Implementation model — the interface “look
and feel” coupled with supporting information
that describe interface syntax and semantics
8
User Interface Design Process
9
Interface Analysis
Interface analysis means understanding
(1) the people (end-users) who will interact with the
system through the interface;
(2) the tasks that end-users must perform to do their
work,
(3) the content that is presented as part of the
interface
(4) the environment in which these tasks will be
conducted.
10
User Analysis
Are users trained professionals, technician, clerical, or manufacturing workers?
What level of formal education does the average user have?
Are the users capable of learning from written materials or have they expressed
a desire for classroom training?
Are users expert typists or keyboard phobic?
What is the age range of the user community?
Will the users be represented predominately by one gender?
How are users compensated for the work they perform?
Do users work normal office hours or do they work until the job is done?
Is the software to be an integral part of the work users do or will it be used only
occasionally?
What is the primary spoken language among users?
What are the consequences if a user makes a mistake using the system?
Are users experts in the subject matter that is addressed by the system?
Do users want to know about the technology the sits behind the interface?
11
Task Analysis and Modeling
Answers the following questions …
What work will the user perform in specific circumstances?
What tasks and subtasks will be performed as the user does
the work?
What specific problem domain objects will the user manipulate
as work is performed?
What is the sequence of work tasks—the workflow?
What is the hierarchy of tasks?
Use-cases define basic interaction
Task elaboration refines interactive tasks
Object elaboration identifies interface objects (classes)
Workflow analysis defines how a work process is
completed when several people (and roles) are involved
12
Swimlane Diagram
pat ient pharmacist physician
r e q u e st s t h at a
d e t e r m in e s st at u s o f
p r e scr ip t io n b e r e f ille d p r e scr ip t io n
ref ills
remaining approves ref ill
e v alu at e s alt e r n at iv e
m e d icat io n
r e ce iv e s o u t o f st o ck out of st ock
n o t if icat io n
alt ernat ive
available
in st ock
r e ce iv e s t im e / d at e
none
t o p ick u p
p icks u p f ills
p r e scr ip t io n p r e scr ip t io n
r e ce iv e s r e q u e st t o
co n t act p h y sician
Figure 12.2 Swimlane diagram for prescript ion refill funct ion
13
Analysis of Display Content
Are different types of data assigned to consistent geographic
locations on the screen (e.g., photos always appear in the
upper right hand corner)?
Can the user customize the screen location for content?
Is proper on-screen identification assigned to all content?
If a large report is to be presented, how should it be partitioned
for ease of understanding?
Will mechanisms be available for moving directly to summary
information for large collections of data.
Will graphical output be scaled to fit within the bounds of the
display device that is used?
How will color to be used to enhance understanding?
How will error messages and warning be presented to the
user?
14
Interface Design Steps
Using information developed during interface
analysis, define interface objects and actions
(operations).
Define events (user actions) that will cause the
state of the user interface to change. Model
this behavior.
Depict each interface state as it will actually
look to the end-user.
Indicate how the user interprets the state of the
system from information provided through the
interface.
15
Design Issues
Response time
Help facilities
Error handling
Menu and command
labeling
Application accessibility
Internationalization
16
WebApp Interface Design
Where am I? The interface should
provide an indication of the WebApp that has been accessed
inform the user of her location in the content hierarchy.
What can I do now? The interface should always help the user
understand his current options
what functions are available?
what links are live?
what content is relevant?
Where have I been, where am I going? The interface must
facilitate navigation.
Provide a “map” (implemented in a way that is easy to understand)
of where the user has been and what paths may be taken to move
elsewhere within the WebApp.
17
Effective WebApp Interfaces
Bruce Tognozzi [TOG01] suggests…
Effective interfaces are visually apparent and
forgiving, instilling in their users a sense of control.
Users quickly see the breadth of their options, grasp
how to achieve their goals, and do their work.
Effective interfaces do not concern the user with the
inner workings of the system. Work is carefully and
continuously saved, with full option for the user to
undo any activity at any time.
Effective applications and services perform a
maximum of work, while requiring a minimum of
information from users.
18
Interface Design Principles-I
Anticipation—A WebApp should be designed so that it
anticipates the use’s next move.
Communication—The interface should communicate the status
of any activity initiated by the user
Consistency—The use of navigation controls, menus, icons,
and aesthetics (e.g., color, shape, layout)
Controlled autonomy—The interface should facilitate user
movement throughout the WebApp, but it should do so in a
manner that enforces navigation conventions that have been
established for the application.
Efficiency—The design of the WebApp and its interface should
optimize the user’s work efficiency, not the efficiency of the
Web engineer who designs and builds it or the client-server
environment that executes it.
19
Interface Design Principles-II
Focus—The WebApp interface (and the content it presents) should
stay focused on the user task(s) at hand.
Fitt’s Law—“The time to acquire a target is a function of the distance to
and size of the target.”
Human interface objects—A vast library of reusable human interface
objects has been developed for WebApps.
Latency reduction—The WebApp should use multi-tasking in a way
that lets the user proceed with work as if the operation has been
completed.
Learnability— A WebApp interface should be designed to minimize
learning time, and once learned, to minimize relearning required when
the WebApp is revisited.
20
Interface Design Principles-III
Maintain work product integrity—A work product (e.g., a form
completed by the user, a user specified list) must be automatically
saved so that it will not be lost if an error occurs.
Readability—All information presented through the interface should be
readable by young and old.
Track state—When appropriate, the state of the user interaction should
be tracked and stored so that a user can logoff and return later to pick
up where she left off.
Visible navigation—A well-designed WebApp interface provides “the
illusion that users are in the same place, with the work brought to
them.”
21
Interface Design Workflow-I
Review information contained in the analysis model
and refine as required.
Develop a rough sketch of the WebApp interface
layout.
Map user objectives into specific interface actions.
Define a set of user tasks that are associated with
each action.
Storyboard screen images for each interface action.
Refine interface layout and storyboards using input
from aesthetic design.
22
Mapping User Objectives
Menu bar
major functions
object ive #n
Navigation
menu
23
Interface Design Workflow-II
Identify user interface objects that are
required to implement the interface.
Develop a procedural representation of the
user’s interaction with the interface.
Develop a behavioral representation of the
interface.
Describe the interface layout for each state.
Refine and review the interface design
model.
24
Aesthetic Design
Don’t be afraid of white space.
Emphasize content.
Organize layout elements from top-left to
bottom right.
Group navigation, content, and function
geographically within the page.
Don’t extend your real estate with the scrolling
bar.
Consider resolution and browser window size
when designing layout.
25
Design Evaluation Cycle
26
Definition of System and Software
Architecture
Eberhardt Rechtin’s definition of system architecture states “A system is defined ...
as a set of different elements so connected or related as to perform a unique
function not performable by the elements alone.”
To understand it, take the example of a Car, it consists of tyre, engine and body as
elements, each element alone cannot perform the functionality of car unless they
are all assembled.
An abstract specification of services and constraints of each sub systems are
defined.
A. In software architecture, several models are used to produce different views, static
models are used to produce structure of a Logical View, dynamic models are used
to depict Process View and Interface models are used to depict communication
between sub systems.
Process view: It deals with the dynamic behaviour of the system, i.e., the system
processes, their communication, data flow and focuses on the runtime behaviour of the
system. Process and data flow diagrams are used to represent it.
Physical view: It depicts the servers and storage system. It is concerned with the
topology of software components on the physical layer, as well as communication
between these components. Deployment diagrams are used to represent it.
Architecture Styles
Client/Server Architectural Style
It is a distributed design system involving clients and servers, which reside on
separate machines and they are connected through network. It is called as 2 Tier
architectural system.
The example of client server architecture is Web Browser over which clients send request to
database servers and obtain response over from them. User interface is always on client and data
management is on server.
Under this style application functionality is broken down into various layers by grouping relevant
functions into one layer and placing the layers one after another in vertical fashion. Each layer is
assigned a particular role, the interaction between layers is through interfaces.
For example, the interaction of users over internet with first layer, say, presentation is through
http, interaction between middle layer (business logic) and back layer (database) is through JDBC
By dividing responsibility among different layers, separates out concerns, which makes it easy for
architects to bring flexibility and maintainability.
There are two styles of layered architecture: strict layering and relax layering architecture
styles....Cntd
Architecture Styles
Layered Architectural Style
In a strict layering style, components of one layer can only talk to components
present either in same layer or with components which are directly below it.
The layers can come all on a single hardware machine or each layer on one
separate hardware computer. If layers are mapped to individual hardware
machines, it is known as n-tier.
Generally, web applications are spread over minimum 3 layers, first layer is
presentation layer, second layer consists of business logic processing and third
layer is data access.
Cont...d
Architecture Styles
Separated Presentation Pattern
Model View Controller or MVC, it is a software design pattern for developing web applications.
It receives the input, validates it and then performs the business operation that modifies the state of the data
model. Typically, it reads data from a view (form), control user input, and send input data to the model
(database).
MVC isolates the application logic from the user interface layer and supports separation of concerns.
It is an improved way of designing layered architecture style, here instead of assigning all layers to one
physical server, each layer is assigned and hosted to a separate physical computer.
The tiers interact with each other using platform specific protocol of communication- HTTP, JDBC, etc.
Object-Oriented
Architecture
In an object oriented architecture, the functionality is broken down into sub
systems using the constructs of object oriented data models such as object
classes, attributes and operations.
Data and methods, i.e., structure and behaviour both are kept in the object.
This kind of style views the system as a collection of cooperating objects
instead of set of sub programs or procedures.
Objects are solid, independent and loosely coupled. Interfaces or messages are
used by the objects to communicate with each other.
Principles of Object-Oriented
Abstraction:- Conceive the complex operations at a higher level by generalizing it and
retaining fundamental characteristics of operations and leaving irrelevant details.
Decomposition:- The larger problem can be broken down into smaller components which
can be easily solved.
Composition:-A large object can be carved out by combining other objects. The non
required objects can be masked.
Polymorphism: As the name indicates, the functionality of base class can be used by its
sub classes in poly (many) ways.
In such cases, either message or web services based architecture can be adopted.
On the basis of format of information agreed, an XML packet is generated. It is sent over transport
protocol, http. The envelope so created is called as SOAP. The way to achieve the above integration is
either use Message Oriented architecture (MOA) or SOA (Web Services).
In SOA, the integration takes place between components (web services) which are identical so
integration is seamless. The SOA integration is Action Oriented, i.e., message is sent, operation is
performed over it and results are delivered back by the invoked web service. Integration is on point
to point basis.
In Message Oriented Architecture, the integration components are not necessarily identical but
message format is identical.
Complex processing logic: Complex operations is broken down into simple operations and results are computed
in multiple stages. The final results are joined up.
Enterprise Service Bus (ESB)
ESB uses message router which locates the desired web services in UDDI based
directory before sending the request.
It then interacts with its port on the web site called as endpoint on behalf of Service
consumer application acting as proxy for Service Provider.
So all service consumers only talk to single point of contact, i.e., enterprise service
bus.
Loose coupling of services: Services interact with each other through well defined
interfaces so their maintenance is easy as it does not impact application.
Services share schema and binding agreement, not class: Schema and binding
agreement are used to share information with service consumers allowing them to use services
it is a better way of sharing compared to sharing internal details of classes.
Policy based Compatibility: Policy is defined in terms of data format (XML), transport
protocol (http) and security. It is called as SOAP, it brings interoperability since services can
run on any platform.
Component-Based Architectural Style
The architecture of component based style assumes that components will be developed
independently as standalone entities by different people
A component is a non-trivial, nearly independent, and replaceable part of a system that fulfils a clear
function in the context of a well-defined architecture.
A run-time software component is a dynamically linkable package of one or more programs managed as a
unit and accessed through documented interfaces that can be discovered at run-time.
The widely accepted definition of component is “a component is a constituent of software is in binary form
so that the need tore compile it is alleviated, it has specified interface or Application Programming
Interface and it can be deployed or dynamically loaded or replaced.”
It is integrals in the system without the need for modifying and rebuilding it.
The components express their functionality through interfaces, so it is from where the user
connects to the component. It gives designer the opportunity to abstract the design at a higher
level than what is abstracted by the principles of object-oriented design. It does not pay
attention on issues like communication protocols and shared state.
Domain Driven Design Style
Easy of Testing: Loose coupling and cohesion are the cornerstone of domain
modelling, which make this style easy to test the application.
Extensible: As this style is based upon object oriented design, which in turn
supports the principles of inheritance so it implies that this style is extensible.
Cloud Computing Architecture Style
Cloud computing is defined as delivering compute power as service instead of a product to the
customers. Thus shared resources such as storage box, software and information are provided to
customers as utility like water or phone connection over an internet. The customers pay for
resources as per usage.
It supports multi tenancy architecture whereby it enables sharing of resources and costs across a large
number of users by centralizing infrastructure at those locations which has lower costs of land, electricity,
labour. It also enables better utilization and efficiency of system resources which are not utilized fully.
Cloud Computing comes in three flavours: Infrastructure as a Service ( IaaS ), Platform as a Service ( PaaS )
and Software as a Service (SaaS ).
Infrastructure as a Service: The cloud providers are expected to create fabric of all the hardware servers,
storage boxes and system software as a common pool in the data Canters so that as per the requirements
of each application, the resources can be assigned to it instantaneously
Platform as a Service: Besides, building the pool of Infrastructure, the cloud providers are expected to
install both open source and proprietary Web Servers, Application Servers, Databases and tools so that a
technology agnostic development platform becomes available for application development. The
development platform should be available in an on-demand provision mode to the customer
organizations.
Software as a Service: The cloud Providers, install on the Infrastructure pool, some commonly used
finished products both COTS and be spoke applications such e-mail, Customer Relationship Module
(CRM)MS office, Star Office. It also includes other customized applications which the organization is
developing for sharing with others such as HR, Payroll, Accounting, etc. on pay as per usage pattern.
GRID Computing and Cloud Computing
Grid Computing is an aggregation, selection and sharing of geographically distributed resources
such as computers, storage, data sources and specialized devices owned by different
organizations for solving resource intensive specific engineering and science problems.
Creating Cloud Computing Platform:- Hypervisor software (e.g. Xen, ESX, Hyper V, KVM)
(refer layer 4 in Figure 4.9) is used to partition a single physical machine into several virtual
machines.
The operating system which runs inside the virtual machine is called as Guest Operating
System.
Hypervisor is positioned between the guest operating system running in the virtual machine and
hardware resources.
This positioning enables the hypervisor to control how guest operating system running inside a
virtual machine uses hardware resources.
This enables administrator to control all hardware resources using the hypervisor as single point
of control, which allows him to view hardware as a pool of resources which can run arbitrary
services on demand.
Multi Tenancy Architecture
Multi tenancy means a type of architecture in which single instance of software hosted on a server
serves several customers organizations (tenants). Multi tenancy is different from multi instance
architecture. In the latter case separate software instances or hardware systems are enabled for
different organizations.
But in case of multitenant architecture, the application is designed in such a way so that it can be
configured for different customer organizations and dataset of each organization is stored separately.
Separate virtual instance of application is created for each organization. There are three ways to
implement it.
Common application source code and common system resources are used by all the tenants.
The data base and schema are different for different tenants. The data and schema of each tenant
is stored separately.
It results in sound and robust security and privacy for the data of each tenant.
Another approach involves housing several tenants in one database, each tenant has separate
set of tables, indexes, triggers and a schema.
The data is stored at one place for all the tenants so security and privacy of data are concern.
But each tenant has separate schema, it allows each tenant to exercise its own strategic control
over the database design.
Multi Tenancy Architecture
Shared Database, Separate Schemas
This approach is good for applications which use small number of tables, say of the order
of 100 or less.
The cost of hosting a tenant is lower since database of all the tenants is common so costs of
data storage and maintenance gets shared among the tenants.
This approach uses one database and same set of tables for all the tenants hosted on the
server.
The tables store records of all tenants in same table; tenant ID is assigned to each row (refer
Figure 4.8).
This approach is good if large number of tenants with small number of hardware servers
are to be served.
Naturally, both the cost of tenancy and degree of data isolation are lowest in this kind of
data architecture.
Core Configurable and Customizable
Architecture
Core:- Applications which have the potential for replication should be designed
following paradigm of core, configurable and customizable one.
Some of the key benefits of configurable solutions are that only one ? version of
application is maintained so a better support can be provided. Quality control
remains focused which results in stable and reliable system.
Thank you
Example 3: Trading-House
Automation System (TAS)
z A large trading house wants us
to develop a software:
y to automate book keeping
activities associated with its
business.
z It has many regular customers:
y who place orders for various
kinds of commodities.
Example 3: Trading-House
Automation System (TAS)
z The trading house maintains names and
addresses of its regular customers.
z Each customer is assigned a unique
customer identification number (CIN).
z As per current practice when a customer
places order:
y the accounts department first checks the
credit-worthiness of the customer.
Example: Trading-House
Automation System (TAS)
z The credit worthiness of a customer is
determined:
y by analyzing the history of his payments to
the bills sent to him in the past.
z If a customer is not credit-worthy:
y his orders are not processed any further
y an appropriate order rejection message is
generated for the customer.
Example: Trading-House
Automation System (TAS)
z If a customer is credit-worthy:
y items he/she has ordered are checked
against the list of items the trading
house deals with.
z The items that the trading house
does not deal with:
y are not processed any further
y an appropriate message for the
customer for these items is generated.
Example: Trading-House
Automation System (TAS)
z The items in a customer's order that
the trading house deals with:
y are checked for availability in the
inventory.
z If the items are available in the
inventory in desired quantities:
y a bill with the forwarding address of
the customer is printed.
y a material issue slip is printed.
Example: Trading-House
Automation System (TAS)
z The customer can produce
the material issue slip at the
store house:
y take delivery of the items.
y inventory data adjusted to
reflect the sale to the
customer.
Example: Trading-House
Automation System (TAS)
z If an ordered item is not
available in the inventory in
sufficient quantity:
y to be able to fulfill pending orders
store details in a "pending-order"
file :
x out-of-stock items along with
quantity ordered.
x customer identification number
Example: Trading-House
Automation System (TAS)
z The purchase department:
y would periodically issue
commands to generate indents.
z When generate indents command
is issued:
y the system should examine the
"pending-order" file
y determine the orders that are pending
y total quantity required for each of the
items.
Example: Trading-House
Automation System (TAS)
z TAS should find out the
addresses of the vendors
who supply the required
items:
y examine the file containing
vendor details (their address, items
they supply etc.)
order Generate-
response indent
Customer Purchase-
Department
Level 1 DFD
Customer-history Item-file
query
Handle-
indent- Sales-statistics
Indent-request request
0.4
Indents pending-order Material-issue-slip +
bill
Example: Data Dictionary
z response: [bill + material-issue-slip, reject-message]
z query: period /* query from manager regarding sales
statistics*/
z period: [date+date,month,year,day]
z date: year + month + day
z year: integer
z month: integer
z day: integer
z order: customer-id + {items + quantity}*
z accepted-order: order /* ordered items available in inventory
*/
z reject-message: order + message /* rejection message */
z pending-orders: customer-id + {items+quantity}*
z customer-address: name+house#+street#+city+pin
Example: Data Dictionary
z item-name: string
z house#: string
z street#: string
z city: string
z pin: integer
z customer-id: integer
z bill: {item + quantity + price}* + total-amount + customer-
address
z material-issue-slip: message + item + quantity + customer-
address
z message: string
z statistics: {item + quantity + price }*
z sales-statistics: {statistics}*
z quantity: integer
Observation
zFrom the examples,
yobserve that DFDs help
create:
xdata model
xfunction model
Observation
z As a DFD is refined into
greater levels of detail:
y the analyst performs an
implicit functional
decomposition.
y At the same time, refinements
of data takes place.
Guidelines For
Constructing DFDs
z Context diagram should
represent the system as a
single bubble:
y Many beginners commit the
mistake of drawing more than
one bubble in the context
diagram.
Guidelines For
Constructing DFDs
z All external entities should be
represented in the context
diagram:
y external entities should not appear at
any other level of DFD.
z Only 3 to 7 bubbles per diagram
should be allowed:
y each bubble should be decomposed to
between 3 and 7 bubbles.
Guidelines For
Constructing DFDs
z A common mistake
committed by many
beginners:
y attempting to represent
control information in a DFD.
y e.g. trying to represent the
order in which different
functions are executed.
Guidelines For
Constructing DFDs
z A DFD does not represent control
information:
y when or in what order different functions
(processes) are invoked
y the conditions under which different
functions are invoked are not represented.
y For example, a function might invoke one
function or another depending on some
condition.
y Many beginners try to represent this aspect
by drawing an arrow between the
corresponding bubbles.
Example-1
z Check the input value:
y If the input value is less than -1000 or
greater than +1000 generate an error
message
y otherwise search for the number
Gener
Chec ate message
k Error
number numb
er number
Searc [found,not-found]
h
Guidelines For
Constructing DFDs
z If a bubble A invokes either
bubble B or bubble C depending
on some conditions:
y represent the data that flows
from bubble A to bubble B and
bubbles A to C
y not the conditions depending on
which a process is invoked.
Example-2
z A function accepts the book name to be searched from
the user
z If the entered book name is not a valid book name
y generates an error message,
z If the book name is valid,
y searches the book name in the database.
Search-
Good-book- book
Get-book- name
name Book-details
Print-err- Error-
message message
Book-name
Guidelines For
Constructing DFDs
z All functions of the system must be
captured in the DFD model:
y no function specified in the SRS
document should be overlooked.
z Only those functions specified in
the SRS document should be
represented:
y do not assume extra functionality of
the system not specified by the SRS
document.
Commonly made errors
z Unbalanced DFDs
z Forgetting to mention the names of the data flows
z Unrepresented functions or data
z External entities appearing at higher level DFDs
z Trying to represent control aspects
z Context diagram having more than one bubble
z A bubble decomposed into too many bubbles in the next
level
z Terminating decomposition too early
z Nouns used in naming bubbles
Shortcomings of the DFD
Model
z DFD models suffer from several
shortcomings:
z DFDs leave ample scope to be
imprecise.
y In a DFD model, we infer about the
function performed by a bubble from
its label.
y A label may not capture all the
functionality of a bubble.
Shortcomings of the DFD
Model
z For example, a bubble named find-
book-position has only intuitive
meaning:
y does not specify several things:
x what happens when some input
information is missing or is incorrect.
x Does not convey anything regarding what
happens when book is not found
x or what happens if there are books by
different authors with the same book title.
Shortcomings of the DFD
Model
z Control information is not represented:
y For instance, order in which inputs are
consumed and outputs are produced is not
specified.
Customer-history Item-file
Accept- inventory
Customer-file order
order Process-
Accepted-orders
order
Shortcomings of the DFD
Model
z A DFD does not specify
synchronization aspects:
y For instance, the DFD in TAS example
does not specify:
x whether process-order may wait until the
accept-order produces data
x whether accept-order and handle-order
may proceed simultaneously with some
buffering mechanism between them.
TAS: Level 1 DFD
Customer-history Item-file
query
Handle-
indent- Sales-statistics
Indent-request request
Indents
pending-order
Shortcomings of the DFD
Model
z The way decomposition is carried out to
arrive at the successive levels of a DFD
is subjective.
z The ultimate level to which
decomposition is carried out is
subjective:
y depends on the choice and judgement of the
analyst.
z Even for the same problem,
y several alternative DFD representations are
possible:
y many times it is not possible to say which
DFD representation is superior or preferable.
Shortcomings of the DFD
Model
z DFD technique does not provide:
y any clear guidance as to how exactly one
should go about decomposing a function:
y one has to use subjective judgement to carry
out decomposition.
z Structured analysis techniques do not
specify when to stop a decomposition
process:
y to what length decomposition needs to be
carried out.
Extending DFD Technique to Real-
Time Systems
z For real-time systems (systems
having time bounds on their
actions),
y essential to model control flow and
events.
y Widely accepted technique: Ward and
Mellor technique.
x a type of process (bubbles) that handles
only control flows is introduced.
x These processes are represented using
dashed circles.
Structured Design
z The aim of structured design
y transform the results of structured analysis
(i.e., a DFD representation) into a structure
chart.
z A structure chart represents the
software architecture:
y various modules making up the system,
y module dependency (i.e. which module calls
which other modules),
y parameters passed among different
modules.
Structure Chart
z Structure chart representation
y easily implementable using programming
languages.
z Main focus of a structure chart:
y define the module structure of a
software,
y interaction among different modules,
y procedural aspects (e.g, how a
particular functionality is achieved)
are not represented.
Basic building blocks of
structure chart
z Rectangular box:
y A rectangular box represents a
module.
y annotated with the name of the
module it represents.
Process-order
Arrows
z An arrow between two modules implies:
y during execution control is passed from one
module to the other in the direction of the
arrow.
root
order
Process-order
Library modules
z Library modules represent
frequently called modules:
y a rectangle with double side edges.
y Simplifies drawing when a module is
called by several modules.
Quick-sort
Selection
z The diamond symbol represents:
y one module of several modules connected to
the diamond symbol is invoked depending on
some condition.
root
Validate-data
Get-data
Bad Design
Shortcomings of Structure
Chart
z By looking at a structure chart:
y we can not say whether a module
calls another module just once or
many times.
z Also, by looking at a structure
chart:
y we can not tell the order in which
the different modules are
invoked.
Flow Chart (Aside)
z We are all familiar with the flow chart
representations:
y Flow chart is a convenient technique to represent the
flow of control in a system. A=B
z A=B
z if(c == 100) yes no
z P=20
P=20 P=80
z else p= 80
z while(p>20) dummy
z print(student mark) yes no
Print
Flow Chart versus
Structure Chart
z A structure chart differs from a flow
chart in three principal ways:
y It is difficult to identify modules of a
software from its flow chart
representation.
y Data interchange among the modules
is not represented in a flow chart.
y Sequential ordering of tasks inherent
in a flow chart is suppressed in a
structure chart.
Transformation of a DFD Model
into Structure Chart
User result
Context Diagram
Example 1: RMS
Calculating Software
z From a cursory analysis of the
problem description,
y easy to see that the system needs to
perform:
x accept the input numbers from the user,
x validate the numbers,
x calculate the root mean square of the
input numbers,
x display the result.
Example 1: RMS
Calculating Software
numbers
Read- Validate-
numbers numbers
0.1 0.2
Valid -
Data- numbers
items error
Compute-
Display rms
0.4 0.3
result RMS
Example 1: RMS
Calculating Software
z By observing the level 1
DFD:
y identify read-number and
validate-number bubbles as
the afferent branch
y display as the efferent branch.
Example 1: RMS
Calculating Software
Example 2: Tic-Tac-Toe
Computer Game
z As soon as either of the human player or
the computer wins,
y a message congratulating the winner should
be displayed.
z If neither player manages to get three
consecutive marks along a straight line,
y and all the squares on the board are filled up,
y then the game is drawn.
z The computer always tries to win a
game.
Context Diagram for
Example 2
Tic-tac-toe
display software
0
move
Human Player
Level 1 DFD
game
Display-
move board result
Validate- Check-
move board winner
Play-
move
Structure Chart
root
Handle-
indent- Sales-statistics
Indent-request request
Indents
pending-order
Structure Chart
Unified Modeling Language (UML)
February 1, 2021
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 1
Introduction
Importance of Modeling
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 2
Introduction UML
UML
The UML provides a set of standard graphical symbols and the rules
for combining them.
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 3
Introduction OMG
OMG
The OMG is perhaps best known for the CORBA (Common Object
Request Broker Architecture) standards.
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 4
Introduction Definition
Definition
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 5
Introduction Definition
Definition(Contd..)
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 6
Introduction Definition
Definition(Contd..)
Architecture
Design
Source code
Project Plans
Test
Prototype
Releases
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 7
Introduction Application Areas
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 8
Conceptual Model
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 9
Conceptual Model UML Building Blocks
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 10
Conceptual Model UML Building Blocks
Things
Things are the most important building blocks of UML. Things can be:
Structural
Behavioral
Grouping
Annotational
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 11
Conceptual Model Things
Structural Things
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 12
Conceptual Model Things
Structural Things(Contd..)
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 13
Conceptual Model Things
Structural Things(Contd..)
Active Class : Like a class but its represents behavior that runs
concurrent with other behaviors, i.e. threading.
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 14
Conceptual Model Things
Behavioural Things
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 15
Conceptual Model Things
Grouping Things
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 16
Conceptual Model Things
Annotational Things
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 17
Conceptual Model Relationship
Relationship
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 18
Conceptual Model Relationship
Relationship(Contd..)
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 19
Conceptual Model Relationship
Relationship(Contd..)
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 20
Conceptual Model Diagrams
Diagrams
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 21
Conceptual Model Diagrams
UML Diagrams(Contd..)
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 22
Conceptual Model Diagrams
UML 2.x
UML has matured significantly since UML 1.1. Several minor revi-
sions (UML 1.3, 1.4, and 1.5) fixed shortcomings and bugs with the
first version of UML, followed by the UML 2.0 major revision that
was adopted by the OMG in 2005.
UML versions 2.1.1 and 2.1.2 appeared in 2007, followed by UML
2.2 in February 2009. UML 2.3 was formally released in May 2010.
UML 2.4.1 was formally released in August 2011. UML 2.5 was
released in October 2012 as an ”In process” version and has yet to
become formally released.
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 23
Conceptual Model Diagrams
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 24
Conceptual Model Diagrams
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 25
4+1 Architectural View Model
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 26
4+1 Architectural View Model
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 27
4+1 Architectural View Model
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 28
4+1 Architectural View Model
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 29
Tool Support
UML Tools
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 30
Tool Support
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 31
Useful Resources
Useful Resources
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 32
Standards
Standards
Two types of standards:
De-Jure
De-facto
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 33
SRS
SOFTWARE REQUIREMENT
SPECIFICATION
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 34
SRS Sample SRS
Sample SRS
R 1: Withdraw cash
Description: The withdraw cash function first determines the type of
account that the user has and the account number from which the user
wishes to withdraw cash. It checks the balance to determine whether
the requested amount is available in the account. If enough balance is
available, it outputs the required cash, otherwise it generates an error
message.
R 1.1: Select withdraw amount option
Input: “Withdraw amount” option
output: User prompted to enter the account type
R 1.2: Select account type
Input: User option from any one of the following: savings / current.
Output: Prompt to enter amount
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 35
SRS Sample SRS
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 36
UML Diagrams
UML DIAGRAMS
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 37
UML Diagrams Use Case Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 38
UML Diagrams Use Case Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 39
UML Diagrams Use Case Diagram
Actor :
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 40
UML Diagrams Use Case Diagram
Use Case :
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 41
UML Diagrams Use Case Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 42
UML Diagrams Use Case Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 43
UML Diagrams Activity Diagram
Activity Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 44
UML Diagrams Activity Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 45
UML Diagrams Activity Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 46
UML Diagrams Activity Diagram
Swimlanes :
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 47
UML Diagrams Activity Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 48
UML Diagrams Activity Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 49
UML Diagrams Class Diagram
Class Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 50
UML Diagrams Class Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 51
UML Diagrams Class Diagram
Statechart Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 52
UML Diagrams Class Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 53
UML Diagrams Class Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 54
UML Diagrams Sequence Diagram
Sequence Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 55
UML Diagrams Sequence Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 56
UML Diagrams Collaboration Diagram
Collaboration Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 58
UML Diagrams Component Diagram
Component Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 60
UML Diagrams Deployment Diagram
Deployment Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 61
UML Diagrams Deployment Diagram
Dr. Shashank Mouli Satapathy Unified Modeling Language (UML) February 1, 2021 62