SlideShare a Scribd company logo
1 of 35
1
Software Design
2
3
4
5
The Waterfall Software Process – Design phase
time
Requirements
Analysis
Design
Phases (activities)
Testing
Maintenance
Product
describing modules,
classes, interfaces,
algorithms, data
structures:
as text and diagrams
Software
Design
Document
Retirement
Implementation
6
The Process of Design
• Definition:
– Design is a problem-solving process whose
objective is to find and describe a way:
• To implement the system’s functional
requirements...
• While respecting the constraints imposed by the
non-functional requirements...
–including the budget
• And while adhering to general principles of
good quality
7
Design space
• The space of possible designs that could be
achieved by choosing different sets of
alternatives is often called the design space
– For example:
8
Component
• Any piece of software or hardware that has a
clear role.
– A component can be isolated, allowing you to
replace it with a different component that has
equivalent functionality.
– Many components are designed to be reusable.
– Conversely, others perform special-purpose
functions.
9
Module
• A component that is defined at the
programming language level
– For example, methods, classes and packages are
modules in Java.
10
System
• A logical entity, having a set of definable
responsibilities or objectives, and consisting of
hardware, software or both.
– A system can have a specification which is then
implemented by a collection of components.
– A system continues to exist, even if its components are
changed or replaced.
– Subsystem:
• A system that is part of a larger system, and which has a definite
interface
11
UML diagram of system parts
12
Top-down and bottom-up design
• Top-down design
– First design the very high level structure of the
system.
– Then gradually work down to detailed decisions
about low-level constructs.
– Finally arrive at detailed decisions such as:
• the format of particular data items;
• the individual algorithms that will be used.
13
Top-down and bottom-up design
• Bottom-up design
– Make decisions about reusable low-level utilities.
– Then decide how these will be put together to create high-
level constructs.
A mix of top-down and bottom-up approaches are normally used:
– Top-down design is almost always needed to give the
system a good structure.
– Bottom-up design is normally useful so that reusable
components can be created.
14
Different aspects of design
– Architecture design:
• The division into subsystems and components,
– How these will be connected.
– How they will interact.
– Their interfaces.
– Class design:
• The various features of classes.
– User interface design
– Algorithm design:
• The design of computational mechanisms.
– Protocol design:
• The design of communications protocol.
15
Design Principle 1: Divide and conquer
• Trying to deal with something big all at once is
normally much harder than dealing with a
series of smaller things
– Separate people can work on each part.
– An individual software engineer can specialize.
– Each individual component is smaller, and
therefore easier to understand.
– Parts can be replaced or changed without having to
replace or extensively change other parts.
16
Ways of dividing a software system
– A distributed system is divided up into clients and
servers
– A system is divided up into subsystems
– A subsystem can be divided up into one or more
packages
– A package is divided up into classes
– A class is divided up into methods
17
Design Principle 2: Increase cohesion
where possible
• A subsystem or module has high cohesion if it
keeps together things that are related to each
other, and keeps out other things
– This makes the system as a whole easier to
understand and change
– Type of cohesion:
• Functional, Layer, Communicational, Sequential,
Procedural, Temporal, Utility
18
Functional cohesion
• This is achieved when all the code that
computes a particular result is kept together -
and everything else is kept out
– i.e. when a module only performs a single
computation, and returns a result, without having
side-effects.
– Benefits to the system:
• Easier to understand
• More reusable
• Easier to replace
– Modules that update a database, create a new file
or interact with the user are not functionally
cohesive
19
Layer cohesion
• All the facilities for providing or accessing a set of
related services are kept together, and everything else
is kept out
– The layers should form a hierarchy
• Higher layers can access services of lower layers,
• Lower layers do not access higher layers
– The set of procedures through which a layer provides its
services is the application programming interface (API)
– You can replace a layer without having any impact on the
other layers
• You just replicate the API
20
Example of the use of layers
21
Communicational cohesion
• All the modules that access or manipulate certain data
are kept together (e.g. in the same class) - and
everything else is kept out
– A class would have good communicational
cohesion
• if all the system’s facilities for storing and
manipulating its data are contained in this class.
• if the class does not do anything other than
manage its data.
– Main advantage: When you need to make changes
to the data, you find all the code in one place
22
Sequential cohesion
• Procedures, in which one procedure provides
input to the next, are kept together – and
everything else is kept out.
– You should achieve sequential cohesion, only once
you have already achieved the preceding types of
cohesion.
23
Procedural cohesion
• Keep together several procedures that are used
one after another
– Even if one does not necessarily provide input to
the next.
24
Temporal Cohesion
• Operations that are performed during the same
phase of the execution of the program are kept
together, and everything else is kept out
– For example, placing together the code used during
system start-up or initialization.
25
Design Principle 3:
Reduce coupling where possible
• Coupling occurs when there are interdependencies between
one module and another
– When interdependencies exist, changes in one place will
require changes somewhere else.
– A network of interdependencies makes it hard to see at a
glance how some component works.
26
Design Principle 4:
Keep the level of abstraction as high as
possible
• Ensure that your designs allow you to hide or
defer consideration of details, thus reducing
complexity
– A good abstraction is said to provide information
hiding
– Abstractions allow you to understand the essence
of a subsystem without having to know
unnecessary details
27
Design Principle 5:
Increase reusability where possible
• Design the various aspects of your system so
that they can be used again in other contexts
– Generalize your design as much as possible
– Follow the preceding three design principles
– Design your system to contain hooks
– Simplify your design as much as possible
28
Design Principle 6:
Reuse existing designs and code where possible
• Design with reuse is complementary to design
for reusability
•
– Actively reusing designs or code allows you to
take advantage of the investment you or others
have made in reusable components
29
Design Principle 7:
Design for flexibility
• Actively anticipate changes that a design may
have to undergo in the future, and prepare for
them
– Reduce coupling and increase cohesion
– Create abstractions
– Do not hard-code anything
– Leave all options open
• Do not restrict the options of people who have to
modify the system later
– Use reusable code and make code reusable
30
Design Principle 8:
Anticipate obsolescence
• Plan for changes in the technology or environment so the
software will continue to run or can be easily changed
– Avoid using early releases of technology
– Avoid using software libraries that are specific to
particular environments
– Avoid using undocumented features or little-used
features of software libraries
– Avoid using software or special hardware from
companies that are less likely to provide long-term
support
– Use standard languages and technologies that are
supported by multiple vendors
31
Design Principle 9:
Design for Portability
• Have the software run on as many platforms as
possible
– Avoid the use of facilities that are specific to one
particular environment
– E.g. a library only available in Microsoft Windows
32
Design Principle 10:
Design for Testability
• Take steps to make testing easier
– Design a program to automatically test the
software
33
Design Principle 11:
Design defensively
• Never trust how others will try to use a
component you are designing
– Handle all cases where other code might attempt to
use your component inappropriately
– Check that all of the inputs to your component are
valid.
34
Techniques for making good
design decisions
• Using priorities and objectives to decide among alternatives
– Step 1: List and describe the alternatives for the design
decision.
– Step 2: List the advantages and disadvantages of each
alternative with respect to your objectives and priorities.
– Step 3: Determine whether any of the alternatives prevents
you from meeting one or more of the objectives.
– Step 4: Choose the alternative that helps you to best meet
your objectives.
– Step 5: Adjust priorities for subsequent decision making.
35
End of lecture

More Related Content

What's hot

Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-designOliver Cheng
 
software design principles
software design principlessoftware design principles
software design principlesCristal Ngo
 
Component design and implementation tools
Component design and implementation toolsComponent design and implementation tools
Component design and implementation toolsKalai Vani V
 
07 software design
07   software design07   software design
07 software designkebsterz
 
10 architectural design (1)
10 architectural design (1)10 architectural design (1)
10 architectural design (1)Ayesha Bhatti
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software EngineeringPurvik Rana
 
Software architecture
Software architectureSoftware architecture
Software architectureUri Meirav
 
SWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design StrategiesSWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design Strategiesghayour abbas
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering Madhar Khan Pathan
 
Software architecture
Software architectureSoftware architecture
Software architecturenazn
 
Software design principles
Software design principlesSoftware design principles
Software design principlesRitesh Singh
 
Software Engineering - Ch8
Software Engineering - Ch8Software Engineering - Ch8
Software Engineering - Ch8Siddharth Ayer
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and ModularityDanyal Ahmad
 
Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10koolkampus
 
Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2Sudarshan Dhondaley
 
Software Engineering
 Software Engineering  Software Engineering
Software Engineering JayaKamal
 

What's hot (19)

Pressman ch-11-component-level-design
Pressman ch-11-component-level-designPressman ch-11-component-level-design
Pressman ch-11-component-level-design
 
software design principles
software design principlessoftware design principles
software design principles
 
Component design and implementation tools
Component design and implementation toolsComponent design and implementation tools
Component design and implementation tools
 
07 software design
07   software design07   software design
07 software design
 
10 architectural design (1)
10 architectural design (1)10 architectural design (1)
10 architectural design (1)
 
Architec design introduction
Architec design introductionArchitec design introduction
Architec design introduction
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Software Designing - Software Engineering
Software Designing - Software EngineeringSoftware Designing - Software Engineering
Software Designing - Software Engineering
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
SWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design StrategiesSWE-401 - 7. Software Design Strategies
SWE-401 - 7. Software Design Strategies
 
Introduction
IntroductionIntroduction
Introduction
 
Fundamentals of Software Engineering
Fundamentals of Software Engineering Fundamentals of Software Engineering
Fundamentals of Software Engineering
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Software design principles
Software design principlesSoftware design principles
Software design principles
 
Software Engineering - Ch8
Software Engineering - Ch8Software Engineering - Ch8
Software Engineering - Ch8
 
Software Design and Modularity
Software Design and ModularitySoftware Design and Modularity
Software Design and Modularity
 
Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10Architectural Design in Software Engineering SE10
Architectural Design in Software Engineering SE10
 
Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2Architectural Styles and Case Studies, Software architecture ,unit–2
Architectural Styles and Case Studies, Software architecture ,unit–2
 
Software Engineering
 Software Engineering  Software Engineering
Software Engineering
 

Similar to Software Engineering Lec 8-design-

Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Sudarshan Dhondaley
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxgauriVarshney8
 
Software Architecture
Software ArchitectureSoftware Architecture
Software ArchitectureAhmed Misbah
 
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptx
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptxWINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptx
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptxVivekananda Gn
 
UNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTUNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTmalathijanapati1
 
Software System Engineering - Chapter 15
Software System Engineering - Chapter 15Software System Engineering - Chapter 15
Software System Engineering - Chapter 15Fadhil Ismail
 
System design process.pptx
System design process.pptxSystem design process.pptx
System design process.pptxNajibMuhammad16
 
MOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfMOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfTigabu Yaya
 
Lecture 3 software_engineering
Lecture 3 software_engineeringLecture 3 software_engineering
Lecture 3 software_engineeringmoduledesign
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineeringAlonzee Tash
 
Shared information systems
Shared information systemsShared information systems
Shared information systemsHimanshu
 
Function Oriented and Object Oriented Design,Modularization techniques
Function Oriented and Object Oriented Design,Modularization techniquesFunction Oriented and Object Oriented Design,Modularization techniques
Function Oriented and Object Oriented Design,Modularization techniquesnimmik4u
 
session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architectureSUJOY SETT
 
Lecture 3 software_engineering
Lecture 3 software_engineeringLecture 3 software_engineering
Lecture 3 software_engineeringmoduledesign
 
System software design1
System software design1System software design1
System software design1PrityRawat2
 

Similar to Software Engineering Lec 8-design- (20)

5 software design
5 software design5 software design
5 software design
 
SE-software design.ppt
SE-software design.pptSE-software design.ppt
SE-software design.ppt
 
Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5Designing and documenting software architecture unit 5
Designing and documenting software architecture unit 5
 
Component level design
Component   level designComponent   level design
Component level design
 
Software Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptxSoftware Eng S3 ( Software Design ).pptx
Software Eng S3 ( Software Design ).pptx
 
Software Design - SDLC Model
Software Design - SDLC ModelSoftware Design - SDLC Model
Software Design - SDLC Model
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptx
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptxWINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptx
WINSEM2022-23_SWE2004_ETH_VL2022230501954_2023-02-01_Reference-Material-I.pptx
 
UNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPTUNIT-4design-concepts-se-pressman-ppt.PPT
UNIT-4design-concepts-se-pressman-ppt.PPT
 
Software System Engineering - Chapter 15
Software System Engineering - Chapter 15Software System Engineering - Chapter 15
Software System Engineering - Chapter 15
 
System design process.pptx
System design process.pptxSystem design process.pptx
System design process.pptx
 
MOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdfMOD_Architectural_Design_Chap6_Summary.pdf
MOD_Architectural_Design_Chap6_Summary.pdf
 
Lecture 3 software_engineering
Lecture 3 software_engineeringLecture 3 software_engineering
Lecture 3 software_engineering
 
Bse 3105 lecture 4-software re-engineering
Bse 3105  lecture 4-software re-engineeringBse 3105  lecture 4-software re-engineering
Bse 3105 lecture 4-software re-engineering
 
Ch 11-component-level-design
Ch 11-component-level-designCh 11-component-level-design
Ch 11-component-level-design
 
Shared information systems
Shared information systemsShared information systems
Shared information systems
 
Function Oriented and Object Oriented Design,Modularization techniques
Function Oriented and Object Oriented Design,Modularization techniquesFunction Oriented and Object Oriented Design,Modularization techniques
Function Oriented and Object Oriented Design,Modularization techniques
 
session on pattern oriented software architecture
session on pattern oriented software architecturesession on pattern oriented software architecture
session on pattern oriented software architecture
 
Lecture 3 software_engineering
Lecture 3 software_engineeringLecture 3 software_engineering
Lecture 3 software_engineering
 
System software design1
System software design1System software design1
System software design1
 

More from Taymoor Nazmy

Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicTaymoor Nazmy
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchTaymoor Nazmy
 
Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-Taymoor Nazmy
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lecturesTaymoor Nazmy
 
Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Taymoor Nazmy
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Taymoor Nazmy
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iTaymoor Nazmy
 
Software Engineering Lec 4-requirments
Software Engineering Lec 4-requirmentsSoftware Engineering Lec 4-requirments
Software Engineering Lec 4-requirmentsTaymoor Nazmy
 
Software Engineering Lec 3-project managment
Software Engineering Lec 3-project managmentSoftware Engineering Lec 3-project managment
Software Engineering Lec 3-project managmentTaymoor Nazmy
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2Taymoor Nazmy
 
Software Engineering Lec 1-introduction
Software Engineering Lec 1-introductionSoftware Engineering Lec 1-introduction
Software Engineering Lec 1-introductionTaymoor Nazmy
 

More from Taymoor Nazmy (20)

Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
 
Cognitive systems
Cognitive  systemsCognitive  systems
Cognitive systems
 
Artificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logicArtificial intelligent Lec 5-logic
Artificial intelligent Lec 5-logic
 
Artificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-searchArtificial intelligent Lec 3-ai chapter3-search
Artificial intelligent Lec 3-ai chapter3-search
 
Lec 2-agents
Lec 2-agentsLec 2-agents
Lec 2-agents
 
Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-Artificial intelligent Lec 1-ai-introduction-
Artificial intelligent Lec 1-ai-introduction-
 
Image processing 2
Image processing 2Image processing 2
Image processing 2
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
 
Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--Software Engineering Lec 10 -software testing--
Software Engineering Lec 10 -software testing--
 
Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-Software Engineering Lec 7-uml-
Software Engineering Lec 7-uml-
 
Software Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-iSoftware Engineering Lec5 oop-uml-i
Software Engineering Lec5 oop-uml-i
 
Software Engineering Lec 4-requirments
Software Engineering Lec 4-requirmentsSoftware Engineering Lec 4-requirments
Software Engineering Lec 4-requirments
 
Software Engineering Lec 3-project managment
Software Engineering Lec 3-project managmentSoftware Engineering Lec 3-project managment
Software Engineering Lec 3-project managment
 
Software Engineering Lec 2
Software Engineering Lec 2Software Engineering Lec 2
Software Engineering Lec 2
 
Software Engineering Lec 1-introduction
Software Engineering Lec 1-introductionSoftware Engineering Lec 1-introduction
Software Engineering Lec 1-introduction
 
Lec 6-
Lec 6-Lec 6-
Lec 6-
 
presentation skill
presentation skillpresentation skill
presentation skill
 
Lec 4
Lec 4Lec 4
Lec 4
 
Lec 3
Lec 3Lec 3
Lec 3
 
Lec 2
Lec 2Lec 2
Lec 2
 

Recently uploaded

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementmkooblal
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfadityarao40181
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerunnathinaik
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Celine George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupJonathanParaisoCruz
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Hierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of managementHierarchy of management that covers different levels of management
Hierarchy of management that covers different levels of management
 
Biting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdfBiting mechanism of poisonous snakes.pdf
Biting mechanism of poisonous snakes.pdf
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
internship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developerinternship ppt on smartinternz platform as salesforce developer
internship ppt on smartinternz platform as salesforce developer
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
9953330565 Low Rate Call Girls In Rohini Delhi NCR
9953330565 Low Rate Call Girls In Rohini  Delhi NCR9953330565 Low Rate Call Girls In Rohini  Delhi NCR
9953330565 Low Rate Call Girls In Rohini Delhi NCR
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 
Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17Computed Fields and api Depends in the Odoo 17
Computed Fields and api Depends in the Odoo 17
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
MARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized GroupMARGINALIZATION (Different learners in Marginalized Group
MARGINALIZATION (Different learners in Marginalized Group
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

Software Engineering Lec 8-design-

  • 2. 2
  • 3. 3
  • 4. 4
  • 5. 5 The Waterfall Software Process – Design phase time Requirements Analysis Design Phases (activities) Testing Maintenance Product describing modules, classes, interfaces, algorithms, data structures: as text and diagrams Software Design Document Retirement Implementation
  • 6. 6 The Process of Design • Definition: – Design is a problem-solving process whose objective is to find and describe a way: • To implement the system’s functional requirements... • While respecting the constraints imposed by the non-functional requirements... –including the budget • And while adhering to general principles of good quality
  • 7. 7 Design space • The space of possible designs that could be achieved by choosing different sets of alternatives is often called the design space – For example:
  • 8. 8 Component • Any piece of software or hardware that has a clear role. – A component can be isolated, allowing you to replace it with a different component that has equivalent functionality. – Many components are designed to be reusable. – Conversely, others perform special-purpose functions.
  • 9. 9 Module • A component that is defined at the programming language level – For example, methods, classes and packages are modules in Java.
  • 10. 10 System • A logical entity, having a set of definable responsibilities or objectives, and consisting of hardware, software or both. – A system can have a specification which is then implemented by a collection of components. – A system continues to exist, even if its components are changed or replaced. – Subsystem: • A system that is part of a larger system, and which has a definite interface
  • 11. 11 UML diagram of system parts
  • 12. 12 Top-down and bottom-up design • Top-down design – First design the very high level structure of the system. – Then gradually work down to detailed decisions about low-level constructs. – Finally arrive at detailed decisions such as: • the format of particular data items; • the individual algorithms that will be used.
  • 13. 13 Top-down and bottom-up design • Bottom-up design – Make decisions about reusable low-level utilities. – Then decide how these will be put together to create high- level constructs. A mix of top-down and bottom-up approaches are normally used: – Top-down design is almost always needed to give the system a good structure. – Bottom-up design is normally useful so that reusable components can be created.
  • 14. 14 Different aspects of design – Architecture design: • The division into subsystems and components, – How these will be connected. – How they will interact. – Their interfaces. – Class design: • The various features of classes. – User interface design – Algorithm design: • The design of computational mechanisms. – Protocol design: • The design of communications protocol.
  • 15. 15 Design Principle 1: Divide and conquer • Trying to deal with something big all at once is normally much harder than dealing with a series of smaller things – Separate people can work on each part. – An individual software engineer can specialize. – Each individual component is smaller, and therefore easier to understand. – Parts can be replaced or changed without having to replace or extensively change other parts.
  • 16. 16 Ways of dividing a software system – A distributed system is divided up into clients and servers – A system is divided up into subsystems – A subsystem can be divided up into one or more packages – A package is divided up into classes – A class is divided up into methods
  • 17. 17 Design Principle 2: Increase cohesion where possible • A subsystem or module has high cohesion if it keeps together things that are related to each other, and keeps out other things – This makes the system as a whole easier to understand and change – Type of cohesion: • Functional, Layer, Communicational, Sequential, Procedural, Temporal, Utility
  • 18. 18 Functional cohesion • This is achieved when all the code that computes a particular result is kept together - and everything else is kept out – i.e. when a module only performs a single computation, and returns a result, without having side-effects. – Benefits to the system: • Easier to understand • More reusable • Easier to replace – Modules that update a database, create a new file or interact with the user are not functionally cohesive
  • 19. 19 Layer cohesion • All the facilities for providing or accessing a set of related services are kept together, and everything else is kept out – The layers should form a hierarchy • Higher layers can access services of lower layers, • Lower layers do not access higher layers – The set of procedures through which a layer provides its services is the application programming interface (API) – You can replace a layer without having any impact on the other layers • You just replicate the API
  • 20. 20 Example of the use of layers
  • 21. 21 Communicational cohesion • All the modules that access or manipulate certain data are kept together (e.g. in the same class) - and everything else is kept out – A class would have good communicational cohesion • if all the system’s facilities for storing and manipulating its data are contained in this class. • if the class does not do anything other than manage its data. – Main advantage: When you need to make changes to the data, you find all the code in one place
  • 22. 22 Sequential cohesion • Procedures, in which one procedure provides input to the next, are kept together – and everything else is kept out. – You should achieve sequential cohesion, only once you have already achieved the preceding types of cohesion.
  • 23. 23 Procedural cohesion • Keep together several procedures that are used one after another – Even if one does not necessarily provide input to the next.
  • 24. 24 Temporal Cohesion • Operations that are performed during the same phase of the execution of the program are kept together, and everything else is kept out – For example, placing together the code used during system start-up or initialization.
  • 25. 25 Design Principle 3: Reduce coupling where possible • Coupling occurs when there are interdependencies between one module and another – When interdependencies exist, changes in one place will require changes somewhere else. – A network of interdependencies makes it hard to see at a glance how some component works.
  • 26. 26 Design Principle 4: Keep the level of abstraction as high as possible • Ensure that your designs allow you to hide or defer consideration of details, thus reducing complexity – A good abstraction is said to provide information hiding – Abstractions allow you to understand the essence of a subsystem without having to know unnecessary details
  • 27. 27 Design Principle 5: Increase reusability where possible • Design the various aspects of your system so that they can be used again in other contexts – Generalize your design as much as possible – Follow the preceding three design principles – Design your system to contain hooks – Simplify your design as much as possible
  • 28. 28 Design Principle 6: Reuse existing designs and code where possible • Design with reuse is complementary to design for reusability • – Actively reusing designs or code allows you to take advantage of the investment you or others have made in reusable components
  • 29. 29 Design Principle 7: Design for flexibility • Actively anticipate changes that a design may have to undergo in the future, and prepare for them – Reduce coupling and increase cohesion – Create abstractions – Do not hard-code anything – Leave all options open • Do not restrict the options of people who have to modify the system later – Use reusable code and make code reusable
  • 30. 30 Design Principle 8: Anticipate obsolescence • Plan for changes in the technology or environment so the software will continue to run or can be easily changed – Avoid using early releases of technology – Avoid using software libraries that are specific to particular environments – Avoid using undocumented features or little-used features of software libraries – Avoid using software or special hardware from companies that are less likely to provide long-term support – Use standard languages and technologies that are supported by multiple vendors
  • 31. 31 Design Principle 9: Design for Portability • Have the software run on as many platforms as possible – Avoid the use of facilities that are specific to one particular environment – E.g. a library only available in Microsoft Windows
  • 32. 32 Design Principle 10: Design for Testability • Take steps to make testing easier – Design a program to automatically test the software
  • 33. 33 Design Principle 11: Design defensively • Never trust how others will try to use a component you are designing – Handle all cases where other code might attempt to use your component inappropriately – Check that all of the inputs to your component are valid.
  • 34. 34 Techniques for making good design decisions • Using priorities and objectives to decide among alternatives – Step 1: List and describe the alternatives for the design decision. – Step 2: List the advantages and disadvantages of each alternative with respect to your objectives and priorities. – Step 3: Determine whether any of the alternatives prevents you from meeting one or more of the objectives. – Step 4: Choose the alternative that helps you to best meet your objectives. – Step 5: Adjust priorities for subsequent decision making.