SlideShare une entreprise Scribd logo
1  sur  35
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

Contenu connexe

Tendances

Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software EngineeringPurvik Rana
 
Design concepts and principles
Design concepts and principlesDesign concepts and principles
Design concepts and principlessaurabhshertukde
 
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 ConfidenceDan Donahue
 
Chapter 4 software design
Chapter 4  software designChapter 4  software design
Chapter 4 software designCliftone Mullah
 
Couplingand cohesion student
Couplingand cohesion studentCouplingand cohesion student
Couplingand cohesion studentsaurabh kumar
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and ModularityDanyal 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 - cohesionbabak danyal
 
Function oriented design
Function oriented designFunction oriented design
Function oriented designVidhun 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 - couplingbabak danyal
 
12 couplingand cohesion-student
12 couplingand cohesion-student12 couplingand cohesion-student
12 couplingand cohesion-studentrandhirlpu
 
Design Concepts & Principles
Design Concepts & PrinciplesDesign Concepts & Principles
Design Concepts & Principlescyberns_
 
4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-danielleroux4 agile modeldevelopement-danielleroux
4 agile modeldevelopement-daniellerouxIBM
 
Design and Implementation in Software Engineering
Design and Implementation in Software EngineeringDesign and Implementation in Software Engineering
Design and Implementation in Software EngineeringKourosh Sajjadi
 

Tendances (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
 

En vedette

programming languages
programming languagesprogramming languages
programming languagesRajendran
 
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 engineeringSharif Omar Salem
 
Online Library Mangement System
Online Library Mangement SystemOnline Library Mangement System
Online Library Mangement SystemAmmar Azeem
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesVasavi College of Engg
 
Library Management System
Library Management SystemLibrary Management System
Library Management SystemPankaj Kumar
 
AUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEMAUTOMATED LIBRARY MANAGEMENT SYSTEM
AUTOMATED LIBRARY MANAGEMENT SYSTEMAbhishek Kumar
 

En vedette (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
 

Similaire à Software Design

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 mbaBabasab Patil
 
Software engg. pressman_ch-9
Software engg. pressman_ch-9Software engg. pressman_ch-9
Software engg. pressman_ch-9Dhairya Joshi
 
Design concept -Software Engineering
Design concept -Software EngineeringDesign concept -Software Engineering
Design concept -Software EngineeringVarsha Ajith
 
11.3.14&22.1.16
11.3.14&22.1.1611.3.14&22.1.16
11.3.14&22.1.16Rajes Wari
 
Software Design
Software Design Software Design
Software Design Anas Bilal
 
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.pptxInfotech27
 
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 exavictorring
 
Object oriented sad-5 part i
Object oriented sad-5 part iObject oriented sad-5 part i
Object oriented sad-5 part iBisrat 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.docxmccormicknadine86
 
Scalable constrained spectral clustering
Scalable constrained spectral clusteringScalable constrained spectral clustering
Scalable constrained spectral clusteringNishanth Harapanahalli
 
software design: design fundamentals.pptx
software design: design fundamentals.pptxsoftware design: design fundamentals.pptx
software design: design fundamentals.pptxDr.Shweta
 
Reengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringReengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringMuhammad Chaudhry
 

Similaire à 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
 
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
 
Reengineering including reverse & forward Engineering
Reengineering including reverse & forward EngineeringReengineering including reverse & forward Engineering
Reengineering including reverse & forward Engineering
 

Dernier

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 

Dernier (20)

08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 

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

Notes de l'éditeur

  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