SlideShare a Scribd company logo
SOFTWARE DESIGN
Present by : Bui, Ninh L.
OVERVIEW
 Design principles
 Design methods
2
DESIGN PRINCIPLES
3
 Abstraction
 Modularity, coupling and cohesion
 Information hiding
 Limit complexity
 Hierarchical structure
ABSTRACTION
 procedural abstraction: natural consequence of
stepwise refinement: name of procedure denotes
sequence of actions
4
abstraction subproblems
time
ABSTRACTION
 data abstraction: aimed at finding a hierarchy in
the data
5
application-oriented
data structures
simpler data
structuregeneral
data structures
MODULARITY
 structural criteria which tell us something about
individual modules and their interconnections
 cohesion and coupling
 cohesion: the glue that keeps a module together
 coupling: the strength of the connection between
modules
6
TYPES OF COHESION
7
 coincidental cohesion
 logical cohesion
 temporal cohesion
 communicational cohesion
 procedural cohesion
 sequential cohesion
 functional cohesion
lowest and worst by far
still not bad at all
still not bad at all
not bad at all
still ok
ok
high and best
EXAMPLE FOR COHESION
Staff
Checkemail()
Sendemail()
Emailvalidate()
Printletter()
8
Staff
Salary
Emailaddr
Setsalary(newsalary)
Getsalary()
Setemailaddr(newemail)
Getemailaddr()
Example of Low Cohesion: Example of high Cohesion:
Cohesion refers to what the class (or module) will do. Low cohesion
would mean that the class does a great variety of actions and is not
focused on what it should do. High cohesion would then mean that
the class is focused on what it should be doing, i.e. only methods
relating to the intention of the class.
TYPES OF COUPLING
9
 Data coupling
 Stamp coupling
 Control coupling
 External coupling
 Common coupling
 Content coupling
loose and best
still very good
ok
ok
very bad
tight and worst
INFORMATION HIDING
10
 each module has a secret
 design involves a series of decision: for each such
decision, wonder who needs to know and who can
be kept in the dark
 information hiding is strongly related to
 abstraction: if you hide something, the user may
abstract from that fact
 coupling: the secret decreases coupling between a
module and its environment
 cohesion: the secret is what binds the parts of the
module together
COMPLEXITY
 measure certain aspects of the software (lines of
code, # of if-statements, depth of nesting, …)
 use these numbers as a criterion to assess a
design, or to guide the design
 interpretation: higher value ⇒ higher complexity
⇒ more effort required (= worse design)
 two kinds:
 intra-modular: inside one module
 inter-modular: between modules
11
OBJECT-ORIENTED METRICS
12
 WMC: Weighted Methods per Class
 DIT: Depth of Inheritance Tree
 NOC: Number Of Children
 CBO: Coupling Between Object Classes
 RFC: Response For a Class
 LCOM: Lack of Cohesion of a Method
DEPTH OF CLASS IN INHERITANCE
TREE
 DIT = distance of class to root of its inheritance tree
 DIT is somewhat language-dependent
 widely accepted heuristic: strive for a forest of classes, a
collection of inheritance trees of medium height
13
Department
StoreDepartments
manager
Employees
display()
credit()
Clothing
customer_gender
size_range
exchange()
Appliances
Category
delivery()
service()
parts_ordering()
DIT (Appliances) =2
DIT(StoreDepartments)=1
DIT(Department)=0
NUMBER OF CHILDREN
14
 NOC: counts immediate descendants
 higher values NOC are considered bad:
 possibly improper abstraction of the parent class
 also suggests that class is to be used in a variety
of settings
NOC(Division) = 1
NOC(StoreDepartments)= 2
NOC(Appliances)= 0
Division
StoreDepartments
manager
Employees
display()
credit()
Clothing
customer_gender
size_range
exchange()
Appliances
Category
delivery()
service()
parts_ordering()
OVERVIEW
 Design principles
 Design methods
15
DESIGN METHODS
 Functional decomposition
 Data Flow Design (SA/SD)
 Design based on Data Structures (JSP)
 Ojbject-Oriented method
16
SAMPLE OF DESIGN METHODS
17
 Decision tables
 E-R
 Flowcharts
 FSM
 JSD
 JSP
 LCP
 Meta IV
 NoteCards
 OBJ
 OOD
 PDL
 Petri Nets
 SA/SD
 SA/WM
 SADT
 SSADM
 Statecharts
FUNCTIONAL DECOMPOSITION
18
bottom-up top-down
FUNCTIONAL DECOMPOSITION
(CNT’D)
 Extremes: bottom-up and top-down
 Not used as such; design is not purely rational:
 clients do not know what they want
 changes influence earlier decisions
 people make errors
 projects do not start from scratch
 Rather, design has a yo-yo character
 We can only fake a rational design process
19
DATA FLOW DESIGN
 Yourdon and Constantine (early 70s)
 nowadays version: two-step process:
 Structured Analysis (SA), resulting in a logical
design, drawn as a set of data flow diagrams
 Structured Design (SD) transforming the logical
design into a program structure drawn as a set of
structure charts
20
ENTITIES IN A DATA FLOW
DIAGRAM
 external entities
 processes
 data flows
 data stores
21
DESIGN BASED ON DATA
STRUCTURES
(JSP )
 JSP = Jackson Structured Programming (for
programming-in-the-small)
22
JSP
 basic idea: good program reflects structure of its
input and output
 program can be derived almost mechanically
from a description of the input and output
 input and output are depicted in a structure
diagram and/or in structured text/schematic
logic (a kind of pseudocode)
 three basic compound forms: sequence, iteration,
and selection)
23
COMPOUND COMPONENTS IN JSP
24
A
B C D
sequence
B
A
*
iteration
B C D
A
o o o
selection
DIFFERENCE BETWEEN JSP AND
OTHER METHODS
 Functional decomposition, data flow design:
Problem structure ⇒ functional structure ⇒
program structure
 JSP:
Problem structure ⇒ data structure ⇒
program structure
25
26
OOAD METHODS
 three major steps:
1 identify the objects
2 determine their attributes and services
3 determine the relationships between objects
27
(PART OF) PROBLEM STATEMENT
Design the software to support the operation of a
public library. The system has a number of
stations for customer transactions. These
stations are operated by library employees.
When a book is borrowed, the identification card
of the client is read. Next, the station’s bar code
reader reads the book’s code. When a book is
returned, the identification card isnot needed
and only the book’s code needs to be read.
28
CANDIDATE OBJECTS
 software
 library
 system
 station
 customer
 transaction
 book
 library employee
 identification card
 client
 bar code reader
 book’s code
29
RELATIONSHIPS
 From the problem statement:
 employee operates station
 station has bar code reader
 bar code reader reads book copy
 bar code reader reads identification card
 Tacit knowledge:
 library owns computer
 library owns stations
 computer communicates with station
 library employs employee
 client is member of library
 client has identification card
RESULT: INITIAL CLASS DIAGRAM
30
USAGE SCENARIO ⇒ SEQUENCE
DIAGRAM
31
CAVEATS WHEN CHOOSING A
PARTICULAR DESIGN METHOD
 Familiarity with the problem domain
 Designer’s experience
 Available tools
 Development philosophy
32
DESIGN PATTERN
33
 Provides solution to a recurring problem
 Balances set of opposing forces
 Documents well-prove design experience
 Abstraction above the level of a single component
 Provides common vocabulary and understanding
 Are a means of documentation
 Supports construction of software with defined
properties
EXAMPLE DESIGN PATTERN: PROXY
 Context:
 Client needs services from other component, direct
access may not be the best approach
 Problem:
 We do not want hard-code access
 Solution:
 Communication via a representative, the Proxy
34
THANK YOU!
35

More Related Content

What's hot

Design Principles
Design PrinciplesDesign Principles
Software design
Software designSoftware design
Software design
Naveen Sagayaselvaraj
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
Purvik Rana
 
Design techniques
Design techniquesDesign techniques
Design techniques
Amit Debnath
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
saurabhshertukde
 
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With ConfidenceCohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
Dan Donahue
 
Design final
Design finalDesign final
Design final
Indu Sharma Bhardwaj
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
Cliftone Mullah
 
Couplingand cohesion student
Couplingand cohesion studentCouplingand cohesion student
Couplingand cohesion student
saurabh kumar
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
Danyal Ahmad
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
babak danyal
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
Vidhun T
 
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24  - 12 may15 - modularity - i - couplingSe 381 - lec 22 - 24  - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
babak danyal
 
Design engineering
Design engineeringDesign engineering
Design engineering
Vikram Dahiya
 
Week 6
Week 6Week 6
Colloquium Report
Colloquium ReportColloquium Report
Colloquium Report
Deepak Kumar
 
12 couplingand cohesion-student
12 couplingand cohesion-student12 couplingand cohesion-student
12 couplingand cohesion-student
randhirlpu
 
Design Concepts & Principles
Design Concepts & PrinciplesDesign Concepts & Principles
Design Concepts & Principles
cyberns_
 
4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-danielleroux4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-danielleroux
IBM
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
Kourosh Sajjadi
 

What's hot (20)

Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Software design
Software designSoftware design
Software design
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
 
Design techniques
Design techniquesDesign techniques
Design techniques
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principles
 
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With ConfidenceCohesion and Coupling - The Keys To Changing Your Code With Confidence
Cohesion and Coupling - The Keys To Changing Your Code With Confidence
 
Design final
Design finalDesign final
Design final
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software design
 
Couplingand cohesion student
Couplingand cohesion studentCouplingand cohesion student
Couplingand cohesion student
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesionSe 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
Se 381 - lec 23 - 28 - 12 may16 - modularity - ii - cohesion
 
Function oriented design
Function oriented designFunction oriented design
Function oriented design
 
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24  - 12 may15 - modularity - i - couplingSe 381 - lec 22 - 24  - 12 may15 - modularity - i - coupling
Se 381 - lec 22 - 24 - 12 may15 - modularity - i - coupling
 
Design engineering
Design engineeringDesign engineering
Design engineering
 
Week 6
Week 6Week 6
Week 6
 
Colloquium Report
Colloquium ReportColloquium Report
Colloquium Report
 
12 couplingand cohesion-student
12 couplingand cohesion-student12 couplingand cohesion-student
12 couplingand cohesion-student
 
Design Concepts & Principles
Design Concepts & PrinciplesDesign Concepts & Principles
Design Concepts & Principles
 
4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-danielleroux4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-danielleroux
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software Engineering
 

Viewers also liked

programming languages
programming languagesprogramming languages
programming languages
Rajendran
 
Oo methodology
Oo methodologyOo methodology
Oo methodology
Vijay Kumar Verma
 
Dfd2
Dfd2Dfd2
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)
IIUI
 
#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering
Sharif Omar Salem
 
Unit 1 Java
Unit 1 JavaUnit 1 Java
Unit 1 Java
arnold 7490
 
Online Library Mangement System
Online Library Mangement SystemOnline Library Mangement System
Online Library Mangement System
Ammar Azeem
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming Languages
Vasavi College of Engg
 
Software design methodologies
Software design methodologiesSoftware design methodologies
Software design methodologies
Dr. C.V. Suresh Babu
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
Pankaj Kumar
 
Cohesion Types
Cohesion TypesCohesion Types
Cohesion Types
Dr. Cupid Lucid
 
AUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEMAUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEM
Abhishek Kumar
 

Viewers also liked (12)

programming languages
programming languagesprogramming languages
programming languages
 
Oo methodology
Oo methodologyOo methodology
Oo methodology
 
Dfd2
Dfd2Dfd2
Dfd2
 
Lecture 17 design concepts (2)
Lecture 17   design concepts (2)Lecture 17   design concepts (2)
Lecture 17 design concepts (2)
 
#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering#1 formal methods – introduction for software engineering
#1 formal methods – introduction for software engineering
 
Unit 1 Java
Unit 1 JavaUnit 1 Java
Unit 1 Java
 
Online Library Mangement System
Online Library Mangement SystemOnline Library Mangement System
Online Library Mangement System
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming Languages
 
Software design methodologies
Software design methodologiesSoftware design methodologies
Software design methodologies
 
Library Management System
Library Management SystemLibrary Management System
Library Management System
 
Cohesion Types
Cohesion TypesCohesion Types
Cohesion Types
 
AUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEMAUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEM
 

Similar to Software Design

Software design i (2) (1)
Software design   i (2) (1)Software design   i (2) (1)
Software design i (2) (1)
Shagufta shaheen
 
Futuristic knowledge management ppt bec bagalkot mba
Futuristic knowledge management ppt bec bagalkot mbaFuturistic knowledge management ppt bec bagalkot mba
Futuristic knowledge management ppt bec bagalkot mba
Babasab Patil
 
Software engg. pressman_ch-9
Software engg. pressman_ch-9Software engg. pressman_ch-9
Software engg. pressman_ch-9
Dhairya Joshi
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
Dr. Radhey Shyam
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
Varsha Ajith
 
11.3.14&22.1.16
11.3.14&22.1.1611.3.14&22.1.16
11.3.14&22.1.16
Rajes Wari
 
Software Design
Software Design Software Design
Software Design
Anas Bilal
 
software design
software designsoftware design
software design
PRIYADARSINISK
 
06 fse design
06 fse design06 fse design
06 fse design
Mohesh Chandran
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
Infotech27
 
Software design
Software designSoftware design
Software design
Himanshu Awasthi
 
Software Engineering - SOFTWARE DESIGN Process
Software Engineering - SOFTWARE DESIGN ProcessSoftware Engineering - SOFTWARE DESIGN Process
Software Engineering - SOFTWARE DESIGN Process
Dr Anuranjan Misra
 
What is the difference between Data and Information give an exa
What is the difference between Data and Information give an exaWhat is the difference between Data and Information give an exa
What is the difference between Data and Information give an exa
victorring
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
Nazir Ahmed
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part i
Bisrat Girma
 
Chapter 7 Design Architecture and Methodology1.docx
Chapter 7 Design Architecture and Methodology1.docxChapter 7 Design Architecture and Methodology1.docx
Chapter 7 Design Architecture and Methodology1.docx
mccormicknadine86
 
rEFUP.pdf
rEFUP.pdfrEFUP.pdf
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
Nishanth Harapanahalli
 
software design: design fundamentals.pptx
software design: design fundamentals.pptxsoftware design: design fundamentals.pptx
software design: design fundamentals.pptx
Dr.Shweta
 
Design1
Design1Design1
Design1
deepinderbedi
 

Similar to Software Design (20)

Software design i (2) (1)
Software design   i (2) (1)Software design   i (2) (1)
Software design i (2) (1)
 
Futuristic knowledge management ppt bec bagalkot mba
Futuristic knowledge management ppt bec bagalkot mbaFuturistic knowledge management ppt bec bagalkot mba
Futuristic knowledge management ppt bec bagalkot mba
 
Software engg. pressman_ch-9
Software engg. pressman_ch-9Software engg. pressman_ch-9
Software engg. pressman_ch-9
 
SE UNIT-3.pdf
SE UNIT-3.pdfSE UNIT-3.pdf
SE UNIT-3.pdf
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software Engineering
 
11.3.14&22.1.16
11.3.14&22.1.1611.3.14&22.1.16
11.3.14&22.1.16
 
Software Design
Software Design Software Design
Software Design
 
software design
software designsoftware design
software design
 
06 fse design
06 fse design06 fse design
06 fse design
 
ICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptxICT DBA3 03 0710 Designing a Database.pptx
ICT DBA3 03 0710 Designing a Database.pptx
 
Software design
Software designSoftware design
Software design
 
Software Engineering - SOFTWARE DESIGN Process
Software Engineering - SOFTWARE DESIGN ProcessSoftware Engineering - SOFTWARE DESIGN Process
Software Engineering - SOFTWARE DESIGN Process
 
What is the difference between Data and Information give an exa
What is the difference between Data and Information give an exaWhat is the difference between Data and Information give an exa
What is the difference between Data and Information give an exa
 
Chapter 08
Chapter 08Chapter 08
Chapter 08
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part i
 
Chapter 7 Design Architecture and Methodology1.docx
Chapter 7 Design Architecture and Methodology1.docxChapter 7 Design Architecture and Methodology1.docx
Chapter 7 Design Architecture and Methodology1.docx
 
rEFUP.pdf
rEFUP.pdfrEFUP.pdf
rEFUP.pdf
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clustering
 
software design: design fundamentals.pptx
software design: design fundamentals.pptxsoftware design: design fundamentals.pptx
software design: design fundamentals.pptx
 
Design1
Design1Design1
Design1
 

Recently uploaded

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
TIPNGVN2
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 

Recently uploaded (20)

GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Data structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdfData structures and Algorithms in Python.pdf
Data structures and Algorithms in Python.pdf
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 

Software Design

  • 1. SOFTWARE DESIGN Present by : Bui, Ninh L.
  • 3. DESIGN PRINCIPLES 3  Abstraction  Modularity, coupling and cohesion  Information hiding  Limit complexity  Hierarchical structure
  • 4. ABSTRACTION  procedural abstraction: natural consequence of stepwise refinement: name of procedure denotes sequence of actions 4 abstraction subproblems time
  • 5. ABSTRACTION  data abstraction: aimed at finding a hierarchy in the data 5 application-oriented data structures simpler data structuregeneral data structures
  • 6. MODULARITY  structural criteria which tell us something about individual modules and their interconnections  cohesion and coupling  cohesion: the glue that keeps a module together  coupling: the strength of the connection between modules 6
  • 7. TYPES OF COHESION 7  coincidental cohesion  logical cohesion  temporal cohesion  communicational cohesion  procedural cohesion  sequential cohesion  functional cohesion lowest and worst by far still not bad at all still not bad at all not bad at all still ok ok high and best
  • 8. EXAMPLE FOR COHESION Staff Checkemail() Sendemail() Emailvalidate() Printletter() 8 Staff Salary Emailaddr Setsalary(newsalary) Getsalary() Setemailaddr(newemail) Getemailaddr() Example of Low Cohesion: Example of high Cohesion: Cohesion refers to what the class (or module) will do. Low cohesion would mean that the class does a great variety of actions and is not focused on what it should do. High cohesion would then mean that the class is focused on what it should be doing, i.e. only methods relating to the intention of the class.
  • 9. TYPES OF COUPLING 9  Data coupling  Stamp coupling  Control coupling  External coupling  Common coupling  Content coupling loose and best still very good ok ok very bad tight and worst
  • 10. INFORMATION HIDING 10  each module has a secret  design involves a series of decision: for each such decision, wonder who needs to know and who can be kept in the dark  information hiding is strongly related to  abstraction: if you hide something, the user may abstract from that fact  coupling: the secret decreases coupling between a module and its environment  cohesion: the secret is what binds the parts of the module together
  • 11. COMPLEXITY  measure certain aspects of the software (lines of code, # of if-statements, depth of nesting, …)  use these numbers as a criterion to assess a design, or to guide the design  interpretation: higher value ⇒ higher complexity ⇒ more effort required (= worse design)  two kinds:  intra-modular: inside one module  inter-modular: between modules 11
  • 12. OBJECT-ORIENTED METRICS 12  WMC: Weighted Methods per Class  DIT: Depth of Inheritance Tree  NOC: Number Of Children  CBO: Coupling Between Object Classes  RFC: Response For a Class  LCOM: Lack of Cohesion of a Method
  • 13. DEPTH OF CLASS IN INHERITANCE TREE  DIT = distance of class to root of its inheritance tree  DIT is somewhat language-dependent  widely accepted heuristic: strive for a forest of classes, a collection of inheritance trees of medium height 13 Department StoreDepartments manager Employees display() credit() Clothing customer_gender size_range exchange() Appliances Category delivery() service() parts_ordering() DIT (Appliances) =2 DIT(StoreDepartments)=1 DIT(Department)=0
  • 14. NUMBER OF CHILDREN 14  NOC: counts immediate descendants  higher values NOC are considered bad:  possibly improper abstraction of the parent class  also suggests that class is to be used in a variety of settings NOC(Division) = 1 NOC(StoreDepartments)= 2 NOC(Appliances)= 0 Division StoreDepartments manager Employees display() credit() Clothing customer_gender size_range exchange() Appliances Category delivery() service() parts_ordering()
  • 16. DESIGN METHODS  Functional decomposition  Data Flow Design (SA/SD)  Design based on Data Structures (JSP)  Ojbject-Oriented method 16
  • 17. SAMPLE OF DESIGN METHODS 17  Decision tables  E-R  Flowcharts  FSM  JSD  JSP  LCP  Meta IV  NoteCards  OBJ  OOD  PDL  Petri Nets  SA/SD  SA/WM  SADT  SSADM  Statecharts
  • 19. FUNCTIONAL DECOMPOSITION (CNT’D)  Extremes: bottom-up and top-down  Not used as such; design is not purely rational:  clients do not know what they want  changes influence earlier decisions  people make errors  projects do not start from scratch  Rather, design has a yo-yo character  We can only fake a rational design process 19
  • 20. DATA FLOW DESIGN  Yourdon and Constantine (early 70s)  nowadays version: two-step process:  Structured Analysis (SA), resulting in a logical design, drawn as a set of data flow diagrams  Structured Design (SD) transforming the logical design into a program structure drawn as a set of structure charts 20
  • 21. ENTITIES IN A DATA FLOW DIAGRAM  external entities  processes  data flows  data stores 21
  • 22. DESIGN BASED ON DATA STRUCTURES (JSP )  JSP = Jackson Structured Programming (for programming-in-the-small) 22
  • 23. JSP  basic idea: good program reflects structure of its input and output  program can be derived almost mechanically from a description of the input and output  input and output are depicted in a structure diagram and/or in structured text/schematic logic (a kind of pseudocode)  three basic compound forms: sequence, iteration, and selection) 23
  • 24. COMPOUND COMPONENTS IN JSP 24 A B C D sequence B A * iteration B C D A o o o selection
  • 25. DIFFERENCE BETWEEN JSP AND OTHER METHODS  Functional decomposition, data flow design: Problem structure ⇒ functional structure ⇒ program structure  JSP: Problem structure ⇒ data structure ⇒ program structure 25
  • 26. 26 OOAD METHODS  three major steps: 1 identify the objects 2 determine their attributes and services 3 determine the relationships between objects
  • 27. 27 (PART OF) PROBLEM STATEMENT Design the software to support the operation of a public library. The system has a number of stations for customer transactions. These stations are operated by library employees. When a book is borrowed, the identification card of the client is read. Next, the station’s bar code reader reads the book’s code. When a book is returned, the identification card isnot needed and only the book’s code needs to be read.
  • 28. 28 CANDIDATE OBJECTS  software  library  system  station  customer  transaction  book  library employee  identification card  client  bar code reader  book’s code
  • 29. 29 RELATIONSHIPS  From the problem statement:  employee operates station  station has bar code reader  bar code reader reads book copy  bar code reader reads identification card  Tacit knowledge:  library owns computer  library owns stations  computer communicates with station  library employs employee  client is member of library  client has identification card
  • 30. RESULT: INITIAL CLASS DIAGRAM 30
  • 31. USAGE SCENARIO ⇒ SEQUENCE DIAGRAM 31
  • 32. CAVEATS WHEN CHOOSING A PARTICULAR DESIGN METHOD  Familiarity with the problem domain  Designer’s experience  Available tools  Development philosophy 32
  • 33. DESIGN PATTERN 33  Provides solution to a recurring problem  Balances set of opposing forces  Documents well-prove design experience  Abstraction above the level of a single component  Provides common vocabulary and understanding  Are a means of documentation  Supports construction of software with defined properties
  • 34. EXAMPLE DESIGN PATTERN: PROXY  Context:  Client needs services from other component, direct access may not be the best approach  Problem:  We do not want hard-code access  Solution:  Communication via a representative, the Proxy 34

Editor's Notes

  1. © SE, Design, Hans van Vliet The resulting design description fakes the actual process followed.
  2. © SE, Design, Hans van Vliet Mention another important article by David Parnas
  3. © SE, Design, Hans van Vliet In the slides, we only discuss JSP. JSD is of historical interest, but little used now
  4. © SE, Design, Hans van Vliet
  5. © SE, Design, Hans van Vliet