0% found this document useful (0 votes)
29 views24 pages

Complete SE File Harjinder Singh

A Data Flow Diagram (DFD) is a visual representation of a system's data flows and interactions with external entities. A Zero Level DFD provides a high-level overview, while a One Level DFD breaks down processes into sub-processes for more detail. The document also discusses various UML diagrams, including activity, sequence, component, and deployment diagrams, which illustrate different aspects of an e-commerce system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views24 pages

Complete SE File Harjinder Singh

A Data Flow Diagram (DFD) is a visual representation of a system's data flows and interactions with external entities. A Zero Level DFD provides a high-level overview, while a One Level DFD breaks down processes into sub-processes for more detail. The document also discusses various UML diagrams, including activity, sequence, component, and deployment diagrams, which illustrate different aspects of an e-commerce system.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

Data Flow Diagram (DFD)

What is a zero level data flow diagram?


A Zero Level Data Flow Diagram (DFD), also known as a Context Diagram, is a high-level
representa on of a system that illustrates the system's boundaries, external en es that
interact with the system, and the major data flows between these en es and the system
itself. It provides a simplified view of the system, focusing on the overall func onality
without delving into the internal processes or data stores.
Key Features of a Zero Level DFD:
1. System Boundary: The diagram defines the scope of the system, showing what is
included and what is external to the system.
2. External En es: These are the actors (users, other systems, etc.) that interact with
the system. They are represented as rectangles.

3. Data Flows: Arrows indicate the flow of data between external en es and the
system. The direc on of the arrows shows the direc on of data movement.
4. Single Process: The en re system is represented as a single process, o en labeled
with the name of the system. This process encapsulates all the func onali es of the
system.
5. No Internal Processes or Data Stores: Unlike lower-level DFDs, a zero-level DFD does
not show internal processes or data stores. It focuses solely on the interac on
between the system and external en es.
Purpose of a Zero Level DFD:
 Communica on Tool: It serves as a communica on tool between stakeholders,
including developers, clients, and users, to ensure a shared understanding of the
system's scope and interac ons.
 Requirements Gathering: It helps in gathering and clarifying requirements by
iden fying what external en es need from the system.
 System Overview: It provides a high-level overview of the system, making it easier to
understand the context in which the system operates.
Example:
Imagine a simple online shopping system. A zero-level DFD for this system might
include:
 External En es: Customers, Payment Gateway, Inventory System.
 Single Process: "Online Shopping System."
 Data Flows:

Harjinder Singh 02890202024


 Customers send orders to the Online Shopping System.
 The Online Shopping System sends payment informa on to the Payment
Gateway.
 The Online Shopping System requests inventory status from the Inventory
System.
In summary, a Zero Level DFD is a founda onal tool in so ware engineering that
helps visualize the interac ons between a system and its external environment,
providing a clear and concise overview of the system's func onality.

Context level DFD – 0 level


The context level data flow diagram (dfd) is describe the whole system. The (o) level
dfd describe the all user module who operate the system. Below data flow diagram
of online shopping site shows the two user can operate the system Admin and
Member user.

Request for login 0.0 Request for registra on

ADMIN Online USER


Shops
Res ponse Response
Shopping

0 Level DFD Online Shopping Website Project

What is one level data flow diagram?


A One Level Data Flow Diagram (DFD), also known as a Level 1 DFD, provides a more detailed
view of a system compared to a Zero Level DFD (Context Diagram). While the Zero Level DFD
represents the en re system as a single process, the One Level DFD breaks down that single
process into its major sub-processes, showing how data flows between them and the
external en es.
Key Features of a One Level DFD:

Harjinder Singh 02890202024


1. Sub-Processes: The main process from the Zero Level DFD is decomposed into
several sub-processes. Each sub-process represents a specific func on or opera on
within the system.
2. External En es: These remain the same as in the Zero Level DFD, represen ng users
or systems that interact with the system.
3. Data Flows: Arrows indicate the flow of data between external en es and the sub-
processes, as well as between the sub-processes themselves.
4. Data Stores: One Level DFDs can also include data stores, which represent where
data is stored within the system. These are typically shown as open-ended
rectangles.
5. More Detail: The One Level DFD provides a clearer understanding of how the system
operates internally, showing the rela onships and interac ons between different
components.
Purpose of a One Level DFD:
 Detailed Understanding: It helps stakeholders understand the internal workings of
the system and how different processes interact with each other.
 Requirements Analysis: It aids in iden fying specific requirements for each sub-
process, making it easier to gather and clarify func onal requirements.
 System Design: It serves as a founda on for further design and development
ac vi es, allowing developers to see how data flows through the system.
Example:
Con nuing with the online shopping system example, a One Level DFD might break down
the "Online Shopping System" process into several sub-processes, such as:
1. Order Processing: Handles customer orders.
2. Payment Processing: Manages payment transac ons.
3. Inventory Management: Checks and updates inventory levels.
4. Shipping: Manages the shipping of orders.
In this One Level DFD, you would see:
 External En es: Customers, Payment Gateway, Inventory System.
 Sub-Processes: Each of the four processes men oned above.
 Data Flows:
 Customers send order details to the Order Processing sub-process.
 The Order Processing sub-process sends payment informa on to the Payment
Processing sub-process.

Harjinder Singh 02890202024


 The Payment Processing sub-process communicates with the Payment
Gateway.
 The Inventory Management sub-process checks inventory levels and updates
them as necessary.
 The Shipping sub-process receives order details to manage shipping.

1st Level Admin Side DFD


The Admin side DFD describe the func onality of Admin, Admin is a owner of the website.
Admin can first add category of item and then add items by category wise. and admin can
manage order and payment detail.

Harjinder Singh 02890202024


Structural view Diagram
A structural view diagram in the context of an e-commerce system typically
refers to a class diagram, component diagram, or object diagram depending on
the level of detail and the focus area. In this case, we’ll assume you are asking
for a component diagram, which focuses on the high-level structure of the
system's components and their rela onships.
Component Diagram for E-commerce System
A component diagram depicts the so ware components of the system, their
dependencies, and how they interact. For an e-commerce system, it shows the
major so ware components involved and how they are structured.
Main Components in the E-commerce System:
1. User Interface (UI)
o The front-end applica on that users interact with (web or mobile).
o Components: Product Page, Shopping Cart, Checkout, Account
Management.
2. Authen ca on System
o Responsible for handling user registra on, login, and security.
o Components: Login Module, Registra on Module, Password Reset.
3. Product Catalog System
o Manages the product catalog (product details, categories, prices,
etc.).
o Components: Product Management, Search, Product Categories.
4. Order Management System
o Handles the crea on, modifica on, and tracking of orders.
o Components: Order Processing, Payment Processing, Order
History.
5. Inventory Management System
o Keeps track of product inventory levels.
o Components: Stock Management, Stock Updates.

Harjinder Singh 02890202024


6. Payment Gateway Integra on
o Handles payment processing and communica on with external
payment systems (e.g., Stripe, PayPal).
o Components: Payment Gateway, Transac on Processing.
7. Shipping & Logis cs
o Manages shipping details, tracking, and logis cs.
o Components: Shipping Calculator, Tracking System.
8. No fica on Service
o Sends no fica ons to users, like order confirma on, shipping
updates, etc.
o Components: Email Service, SMS Service.
9. Database System
o Central database for storing user data, orders, products, etc.
o Components: User Database, Product Database, Order Databa

Harjinder Singh 02890202024


Ac vity Diagram
An ac vity diagram is a type of UML (Unified Modeling Language) diagram
used to visually represent the workflow of a system, process, or business logic.
It shows the sequence of ac vi es, the flow of control, and possible decision
points in a process.

Key Features of an Ac vity Diagram:


 Start and End Points: Indicate where the process begins and ends.
 Ac vi es (Ac ons): Represent tasks or opera ons.
 Decisions: Show branches where different outcomes lead to different
paths.
 Parallel Ac vi es: Indicate tasks that can occur simultaneously.
 Transi ons: Arrows that connect ac ons and show the flow.

Why Use Ac vity Diagrams?


 To understand how a system works step-by-step.
 To model business processes or system func ons.
 To iden fy bo lenecks or unnecessary steps.
 To serve as documenta on for developers, testers, and stakeholders.

Example Use Cases:


 Online shopping process (like the one we just made!)
 ATM transac on flow
 User registra on and login
 Order processing in a supply chain

Harjinder Singh 02890202024


Ac vity Diagram on E-commerce System

Harjinder Singh 02890202024


Sequence Diagram
A sequence diagram in an e-commerce system is a type of UML (Unified
Modeling Language) diagram that shows how different parts of the system
interact with each other over me to complete a specific task—such as placing
an order or processing a payment.

What is a Sequence Diagram?


A sequence diagram visually represents the order of interac ons (messages)
between various actors (users or systems) and system components (like
databases, services, etc.). It's called a "sequence" diagram because it
emphasizes the me sequence in which these interac ons occur.

In the Context of E-commerce:


A sequence diagram for an e-commerce system usually models common user
scenarios, such as:

 Browsing and selec ng products

 Adding items to a cart

 Checking out and making a payment

 Tracking or cancelling an order

 Reques ng returns or refunds

Purpose of a Sequence Diagram in E-commerce:


 Show how different components (User, Cart, Order Service, Payment
Gateway, etc.) interact in real- me
 Understand the flow of logic for a feature
 Iden fy poten al issues like delays or missing steps
 Serve as documenta on for developers and designers

Harjinder Singh 02890202024


Basic Elements:
 Actors: User, Admin, etc.
 Lifelines: Each par cipant's ver cal line showing their existence during
the process
 Messages: Arrows showing communica on (requests, responses)
 Ac va on Bars: Highlight periods when a par cipant is performing an
ac on

Sequence Diagram On E-Commerce

Harjinder Singh 02890202024


Component Diagram
What is a Component Diagram?
A Component Diagram is a type of UML (Unified Modeling Language) diagram used
in so ware design to visualize the organiza on and dependencies between so ware
components.

It answers ques ons like:


 How is the system modularized?
 What components (services, modules, packages) make up the system?
 How do these components communicate?
 What external components (APIs, databases, services) are involved?

Key Elements of a Component Diagram:

Element Descrip on

A modular part of a system that encapsulates its content and


Component
exposes interfaces.

Defines the interac on between components (e.g., login,


Interface
fetchProduct).

Arrows showing which component depends on which.


Dependency

Executable so ware pieces (like .jar, .dll) that a component can


Ar facts
represent.

Component Diagram for E-Commerce System


Let’s model a realis c E-Commerce Website using components:

High-Level Components

Component Descrip on

User Interface (UI) Web or mobile front-end used by customers.

Harjinder Singh 02890202024


Component Descrip on

Authen ca on Service Handles registra on, login, password reset.

Product Catalog Service Manages product lis ngs, categories, and search.

Shopping Cart Service Tracks items added by users.

Order Management
Handles order processing and order history.
Service

Integrates with external payment gateways (e.g., PayPal,


Payment Service
Stripe).

Inventory Service Keeps track of product availability.

Shipping/Delivery Service Manages shipment tracking and updates.

No fica on Service Sends emails/SMS to customers.

Database Stores user data, product data, orders, etc.

Admin Portal Interface for sellers or admin to manage the pla orm.

More Detailed E-Commerce Components


If you want a deeper breakdown, you could divide into sub-components:

Authen ca on
 Login Manager
 Token Service (JWT)
 Role-Based Access Control

Product Catalog
 Product Search
 Category Management
 Product Reviews

Order Management
 Invoice Generator
 Refund Handler

Harjinder Singh 02890202024


 Order Tracker

Inventory
 Stock Level Manager
 Supplier Interface

Component Diagram For E-Commerce

Harjinder Singh 02890202024


Deployment Diagram
A deployment diagram is a type of UML diagram that shows the physical
deployment of so ware ar facts on nodes. For an e-commerce system, it
illustrates how the applica on is deployed across different servers, hardware,
and network components.
Here’s a simplified version of what a deployment diagram for an e-commerce
system might look like:
Here's a descrip on of the deployment diagram elements:
1. User (Client)
o Represents the user’s device (browser or mobile app) accessing
the e-commerce site.
2. Web Server (HTTP/S)
o Hosts the user interface. The client interacts with this server to
browse products, add items to the cart, check out, and manage
user accounts.
3. Applica on Server (Backend Logic)
o Runs the business logic such as handling user authen ca on,
processing shopping cart ac ons, order processing, and
inventory management.
o It exposes REST APIs that the client (web or mobile) consumes.
4. Database Server
o The backend database (such as MySQL, MongoDB, PostgreSQL)
stores cri cal informa on like user details, product catalog,
inventory, and order history.
5. Payment Gateway
o External system responsible for securely processing payments.
6. Cache Server (e.g., Redis)
o Stores frequently accessed data like product info, user sessions,
and common search results, improving system performance.

Harjinder Singh 02890202024


7. Email Server
o Sends emails for user registra on, order confirma on, shipping
updates, etc.
8. Content Delivery Network (CDN)
o Delivers sta c assets (images, styles, scripts) from the closest
edge server to improve loading mes.

Internet
Connec on Web Work Sta on
Server <<Host Device>>

ISP <<Online Private


Service>>
New
Internet
Connec on
Private
NW

Mobiles/PC
Internet Website
<<Devices>>
Connec on<<So ware>>

HTTP(S)
Internet
Connec on

Harjinder Singh 02890202024


Measurement of Complexity with Halstead Metrices

HALSTEAD METRICES
Halstead’s So ware Metrics, developed by Maurice
Halstead in 1977, are a set of measures used to
quan fy various aspects of so ware programs.
According to Halstead’s, “A computer program is an
implementa on of an algorithm considered to be a
collec on of tokens which can be classified as either
operators or operand”. This means that the program
consists of various symbols and data elements that are
either performing ac ons (operators) or upon which
ac ons are performed (operands). This dis nc on
helps in understanding and analysing the structure and
behaviour of the program.

Harjinder Singh 02890202024


TOKEN COUNT
In Halstead’s So ware metrics, a computer program is
defined as a collec on of tokens that can be described
as operators or operands. These tokens are used to
analyse the complexity and volume of a program.
Operators are symbols that represent ac ons, while
operands are the en es on which the operators act.
All so ware science metrics can be specified using
these basic symbols. These symbols are referred to as
tokens. By coun ng and analysing these tokens,
Halstead’s metrics provide insights into the complexity,
effort, and quality of so ware code.
In Halstead’s So ware Metrics:
n1 = Number of dis nct operators.
n2 = Number of dis nct operands.
N1 = Total number of occurrences of operators.
N2 = Total number of occurrences of operands.

Harjinder Singh 02890202024


FIELD OF HALSTEAD METRICES
Program length (N):
This is the total number of operator and operand
occurrences in the program.
Vocabulary size (n):
This is the total number of dis nct operators and
operands in the program.

HALSTEAD’S SOFTWARE METRICES


Halstead’s So ware Metrics are:
Halstead Program Length
Halstead Program Length (N) in Halstead’s So ware
Metrics refers to the total number of tokens in a
program. Where tokens are the smallest individual
units of code such as operators, operands, keywords,
and iden fiers.
N = N1 + N2
The es mated program length is denoted by N^ and is
given by the formula:
N^ = n1log2n1 + n2log2n2

Harjinder Singh 02890202024


Halstead Vocabulary
The total number of unique operators and unique
operand occurrences.
n = n1 + n2
Program Volume
Propor onal to program size, represents the size, in
bits, of space necessary for storing the program. This
parameter is dependent on specific algorithm
implementa on. The proper es V, N, and the number
of lines in the code are shown to be linearly connected
and equally valid for measuring rela ve program size.
V = Size * (log2 vocabulary) = N * log2(n)
Program Difficulty
This parameter shows how difficult to handle the
program is.
D = (n1 / 2) * (N2 / n2)
D=1/L
As the volume of the implementa on of a program
increases, the program level decreases and the
difficulty increases. Thus, programming prac ces such
as redundant usage of operands, or the failure to use
higher-level control constructs will tend to increase the
volume as well as the difficulty.

Harjinder Singh 02890202024


Programming Effort
Measures the amount of mental ac vity needed to
translate the exis ng algorithm into implementa on in
the specified program language.
E = V / L = D * V = Difficulty * Volume

Harjinder Singh 02890202024


EXAMPLE
int sort (int x[ ], int n)

{
int i, j, save, im1;
/*This func on sorts array x in ascending order */
If (n< 2) return 1;
for (i=2; i< =n; i++)
{
im1=i-1;
for (j=1; j< =im1; j++)
if (x[i] < x[j])
{
Save = x[i];
x[i] = x[j];
x[j] = save;
}
}
return 0;
}

Harjinder Singh 02890202024


Operators Occurrences Operands Occurrences

int 4 sort 1

() 5 x 7

, 4 n 3

[] 7 i 8

if 2 j 7

< 2 save 3

; 11 im1 3

for 2 2 2

= 6 1 3

– 1 0 1

<= 2 – –

Harjinder Singh 02890202024


Operators Occurrences Operands Occurrences

++ 2 – –

return 2 – –

{} 3 – –

n1=14 N1=53 n2=10 N2=38

Harjinder Singh 02890202024


Program Length (N) = 91

Vocabulary (n) = 24

Volume (V) = 417.23 bits

Es mated Program Length (N^) = 86.51

Poten al Volume (V*) = 11.6

Difficulty (D) = 37.03

Es mated Program Level (L^) = 0.038

Effort (T) = 610 seconds

Harjinder Singh 02890202024

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy