0% found this document useful (0 votes)
14 views

SCCC

The document provides an overview of Data Flow Diagrams (DFDs), specifically Zero Level and One Level DFDs, which illustrate system boundaries, external entities, and data flows. It also discusses various UML diagrams such as activity, sequence, component, and deployment diagrams, detailing their roles in visualizing system interactions and architecture in an e-commerce context. Additionally, it introduces Halstead Metrics for measuring software complexity through operators and operands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

SCCC

The document provides an overview of Data Flow Diagrams (DFDs), specifically Zero Level and One Level DFDs, which illustrate system boundaries, external entities, and data flows. It also discusses various UML diagrams such as activity, sequence, component, and deployment diagrams, detailing their roles in visualizing system interactions and architecture in an e-commerce context. Additionally, it introduces Halstead Metrics for measuring software complexity through operators and operands.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, 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
representation of a system that illustrates the system's boundaries, external entities that
interact with the system, and the major data flows between these entities and the system
itself. It provides a simplified view of the system, focusing on the overall functionality
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 Entities: 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 entities and the
system. The direction of the arrows shows the direction of data movement.

4. Single Process: The entire system is represented as a single process, often labeled
with the name of the system. This process encapsulates all the functionalities 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 interaction
between the system and external entities.

Purpose of a Zero Level DFD:

 Communication Tool: It serves as a communication tool between stakeholders,


including developers, clients, and users, to ensure a shared understanding of the
system's scope and interactions.

 Requirements Gathering: It helps in gathering and clarifying requirements by


identifying what external entities 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 Entities: 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 information to the Payment


Gateway.

 The Online Shopping System requests inventory status from the Inventory
System.

In summary, a Zero Level DFD is a foundational tool in software engineering that helps
visualize the interactions between a system and its external environment, providing
a clear and concise overview of the system's functionality.

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 registration

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 entire 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 entities.

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 function or operation
within the system.

2. External Entities: These remain the same as in the Zero Level DFD, representing users
or systems that interact with the system.

3. Data Flows: Arrows indicate the flow of data between external entities 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 relationships and interactions 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 identifying specific requirements for each sub-


process, making it easier to gather and clarify functional requirements.

 System Design: It serves as a foundation for further design and development


activities, allowing developers to see how data flows through the system.

Example:

Continuing 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 transactions.

3. Inventory Management: Checks and updates inventory levels.

4. Shipping: Manages the shipping of orders.

In this One Level DFD, you would see:

 External Entities: Customers, Payment Gateway, Inventory System.

 Sub-Processes: Each of the four processes mentioned above.

 Data Flows:

 Customers send order details to the Order Processing sub-process.

 The Order Processing sub-process sends payment information 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 functionality 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 relationships.
Component Diagram for E-commerce System
A component diagram depicts the software components of the system, their
dependencies, and how they interact. For an e-commerce system, it shows the
major software components involved and how they are structured.
Main Components in the E-commerce System:
1. User Interface (UI)
o The front-end application that users interact with (web or mobile).
o Components: Product Page, Shopping Cart, Checkout, Account
Management.
2. Authentication System
o Responsible for handling user registration, login, and security.
o Components: Login Module, Registration 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 creation, modification, 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 Integration
o Handles payment processing and communication with external
payment systems (e.g., Stripe, PayPal).
o Components: Payment Gateway, Transaction Processing.
7. Shipping & Logistics
o Manages shipping details, tracking, and logistics.
o Components: Shipping Calculator, Tracking System.
8. Notification Service
o Sends notifications to users, like order confirmation, 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


Activity Diagram
An activity 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 activities, the flow of control, and possible decision
points in a process.

•˙Q Key Features of an Activity Diagram:


 Start and End Points: Indicate where the process begins and ends.
 Activities (Actions): Represent tasks or operations.
 Decisions: Show branches where different outcomes lead to different
paths.
 Parallel Activities: Indicate tasks that can occur simultaneously.
 Transitions: Arrows that connect actions and show the flow.

⬛ Why Use Activity Diagrams?


 To understand how a system works step-by-step.
 To model business processes or system functions.
 To identify bottlenecks or unnecessary steps.
 To serve as documentation for developers, testers, and stakeholders.

v‘’z Example Use Cases:


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

Harjinder Singh 02890202024


묙.¯/ Activity 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 time to complete a specific task—such as placing
an order or processing a payment.

‘v’z What is a Sequence Diagram?


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

⬛,묉 u In the Context of E-commerce:


A sequence diagram for an e-commerce system usually models common user
scenarios, such as:
 묙.¯/ Browsing and selecting products
 ) Adding items to a cart
 -—.,— Checking out and making a payment
 ´u,¶◆J Tracking or cancelling an order
 ⬛’깣 Requesting 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-time
 Understand the flow of logic for a feature
 Identify potential issues like delays or missing steps
 Serve as documentation for developers and designers

Harjinder Singh 02890202024


–'‘c.••⬛ Basic Elements:
 Actors: User, Admin, etc.
 Lifelines: Each participant's vertical line showing their existence during
the process
 Messages: Arrows showing communication (requests, responses)
 Activation Bars: Highlight periods when a participant is performing an
action

Sequence Diagram On E-Commerce

Harjinder Singh 02890202024


Component Diagram
‘z’v What is a Component Diagram?
A Component Diagram is a type of UML (Unified Modeling Language) diagram used
in software design to visualize the organization and dependencies between software
components.

껩 It answers questions 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 Description
A modular part of a system that encapsulates its content and
¶u´◆J, Component
exposes interfaces.

꺪³ Defines the interaction between components (e.g., login,


Interface fetchProduct).

➜⬛ Arrows showing which component depends on which.


Dependency

–'‘c•. Executable software pieces (like .jar, .dll) that a component can
•⬛ represent.
Artifacts

/¯.묙 Component Diagram for E-Commerce System


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

.•9„˙ High-Level Components

Component Description

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

Harjinder Singh 02890202024


Component Description

Authentication Service Handles registration, login, password reset.

Product Catalog Service Manages product listings, 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.

Notification Service Sends emails/SMS to customers.

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

Admin Portal Interface for sellers or admin to manage the platform.

˛C* More Detailed E-Commerce Components


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

,ºt Authentication
 Login Manager
 Token Service (JWT)
 Role-Based Access Control

⬛묉 u, Product Catalog
 Product Search
 Category Management
 Product Reviews

) Order Management
 Invoice Generator
 Refund Handler

Harjinder Singh 02890202024


 Order Tracker

,J¶◆´u 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 software artifacts on nodes. For an e-commerce system, it
illustrates how the application 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 description 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. Application Server (Backend Logic)
o Runs the business logic such as handling user authentication,
processing shopping cart actions, 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 critical information 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 registration, order confirmation, shipping
updates, etc.
8. Content Delivery Network (CDN)
o Delivers static assets (images, styles, scripts) from the closest
edge server to improve loading times.

Internet
Connection Web Work Station
Server <<Host Device>>

<<Online
ISP Private
Service>>
New
Internet
Connection
Private
NW

Mobiles/PC
Internet Website
<<Devices>>
Connecti on<<Software>>

HTTP(S)
Internet
Connection

Harjinder Singh 02890202024


Measurement of Complexity with Halstead Metrices

HALSTEAD METRICES
Halstead’s Software Metrics, developed by Maurice
Halstead in 1977, are a set of measures used to
quantify various aspects of software programs.
According to Halstead’s, “A computer program is an
implementation of an algorithm considered to be a
collection 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 actions (operators) or upon which
actions are performed (operands). This distinction
helps in understanding and analysing the structure and
behaviour of the program.

Harjinder Singh 02890202024


TOKEN COUNT
In Halstead’s Software metrics, a computer program is
defined as a collection 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 actions, while
operands are the entities on which the operators act.
All software science metrics can be specified using
these basic symbols. These symbols are referred to as
tokens. By counting and analysing these tokens,
Halstead’s metrics provide insights into the complexity,
effort, and quality of software code.
In Halstead’s Software Metrics:
n1 = Number of distinct operators.
n2 = Number of distinct 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 distinct operators and
operands in the program.

HALSTEAD’S SOFTWARE METRICES


Halstead’s Software Metrics are:
Halstead Program Length
Halstead Program Length (N) in Halstead’s Software
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 identifiers.
N = N1 + N2
The estimated 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
Proportional to program size, represents the size, in
bits, of space necessary for storing the program. This
parameter is dependent on specific algorithm
implementation. The properties V, N, and the number
of lines in the code are shown to be linearly connected
and equally valid for measuring relative 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 implementation of a program
increases, the program level decreases and the
difficulty increases. Thus, programming practices 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 activity needed to
translate the existing algorithm into implementation 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 function 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

Estimated Program Length (N^) = 86.51

Potential Volume (V*) = 11.6

Difficulty (D) = 37.03

Estimated 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