Software Design: Lecturer DR: Reem Razzaq Class 3 Time: Department: Businesses Information Technology (BIT)
Software Design: Lecturer DR: Reem Razzaq Class 3 Time: Department: Businesses Information Technology (BIT)
Software Design
Software Design Patterns
Introduction To Software Design Representations
Software Design Approaches
Software Architectures
2
“Introduction to Software Engineering”, Second Edition
Outline
Software Design
3
“Introduction to Software Engineering”, Second Edition
SoftwareOutline
Design Patterns
4
“Introduction to Software Engineering”, Second Edition
SoftwareOutline
Design Patterns
5
“Introduction to Software Engineering”, Second Edition
SoftwareOutline
Design Patterns
6
“Introduction to Software Engineering”, Second Edition
Outline
Introduction To Software Design Representations
7
“Introduction to Software Engineering”, Second Edition
Introduction To Software Design
Outline
Representations (Cont.)
Example : A Pseudocode Description of a Hypothetical Computer System
GET login_id as input from keyboard
Compare Input to entries in login_id database
IF not a match THEN
WAIT 10 seconds
SET error_count to 1
REPEAT
PROMPT user for new login_id
IF login_id matches database
THEN PROMPT for password
ELSE increment error_count
WAIT 10 seconds
END IF
IF error_count > 3 EXIT password PROMPT
END REPEAT
ELSE
GET password as input from keyboard
Compare password entries in password databaseSoftware Design ◾ 169
IF error THEN
EXIT
ELSE
BEGIN login process
END IF 8
“Introduction to Software Engineering”, Second Edition
Outline
Software Design Approaches
9
“Introduction to Software Engineering”, Second Edition
Outline
Software Design Approaches (Cont.)
2- Bottom-up Design
• this model starts with most specific and basic components.
• It keeps creating higher level components until the desired system is not
evolved as one single component.
• With each higher level, the amount of abstraction is increased.
• Bottom-up strategy is more suitable when a system needs to be created
from some existing system, where the basic primitives can be used in the
newer system.
• Both, top-down and bottom-up approaches are not practical individually.
Instead, a good combination of both is used.
10
“Introduction to Software Engineering”, Second Edition
Outline
Software Architectures
11
“Introduction to Software Engineering”, Second Edition
Outline
Software Architectures
12
“Introduction to Software Engineering”, Second Edition
Outline
Software Architectures
13
“Introduction to Software Engineering”, Second Edition
Outline
Software Architectures
18
“Introduction to Software Engineering”, Second Edition
THANK YOU
19
3- CODING
2
“Introduction to Software Engineering”, Second Edition
Choice Of Programming
Outline Language
3
“Introduction to Software Engineering”, Second Edition
Choice Of Programming
Outline Language
4
“Introduction to Software Engineering”, Second Edition
Choice Of Programming
Outline Language (Cont.)
5
“Introduction to Software Engineering”, Second Edition
Coding
Outline
Styles
1- The way that you could organize your code can make it easier to read or
more efficient.
2- The amount of internal documentation required is to keep the
documentation within the source code.
3- This ensures that documentation will be available, regardless of any
external documents that may be lost or any changes in project personnel
()الموظفين.
2. Comments
3. Standard naming conventions ()مصطﻼحات التسمية القياسية
a. Name formats
b. General guidelines for variable names
7
“Introduction to Software Engineering”, Second Edition
Coding
Outline
Standards
8
“Introduction to Software Engineering”, Second Edition
Coding
Outline
Standards
9
“Introduction to Software Engineering”, Second Edition
Coding Standards
Outline (Cont.)
10
“Introduction to Software Engineering”, Second Edition
Coding, Design, Requirements,
Outline And Change
11
“Introduction to Software Engineering”, Second Edition
Coupling Can
Outline
Be Dangerous
12
“Introduction to Software Engineering”, Second Edition
Coupling Can
Outline
Be Dangerous
13
“Introduction to Software Engineering”, Second Edition
Coupling Can Outline
Be Dangerous (Cont.)
3- Control coupling:
• occurs when one module is able to control the logic of another, by
passing it information on what to do (e.g., by passing a what-to-do
flag).
• Therefore, in control coupling, execution of a loop or program
branch depends upon the parameter.
4- Stamp coupling and data coupling:
• occurs when modules share data through parameters.
• Parameters may be used in a calculation, but they do not affect
logical flow (loops, branches) of the receiving module.
5- External coupling:
• occurs when two modules use data that is external to both.
• The external data may have a specified format, communications
protocol, or device interface.
14
“Introduction to Software Engineering”, Second Edition
Coupling Can Outline
Be Dangerous (Cont.)
6- Message coupling:
• is a very low level of coupling in which modules do not communicate
with each other through parameters.
• The communicating modules use a public interface, such as messages
or events, to exchange parameter-less messages.
• message coupling is more spread in object-oriented systems.
15
“Introduction to Software Engineering”, Second Edition
Some Coding
OutlineMetrics
16
“Introduction to Software Engineering”, Second Edition
THANK YOU
17