SDA - Chapter - 1
SDA - Chapter - 1
Introduction
1
Discussion
2
Design in SDLC
3
Software Design
4
Cont’d
The design process consists mainly 4 activities:
» Propose a solution.
» The system well enough that coders can build it and deploy
it without serious problems.
» All the parts of the system and how they are to be assembled.
6
Design Concepts
» Modularity
» Refinement
» Architecture
7
Abstraction
Abstraction allows designers to focus on solving a problem without
being concerned about irrelevant lower level details.
8
Cont’d
Abstraction is the selection of a set of concepts to represent a complex
whole.
Abstraction is mostly formed by reducing information content of a concept or
a physical phenomenon typically to retain information that is relevant to a
particular purpose.
Each step in the software design process is a refinement in the level of
abstraction of the software solution.
Abstraction methods in Object Oriented Programming (OOP):
– Encapsulation
– Information hiding
– Inheritance
– Polymorphism and dynamic binding
9
Cont’d
10
Modularity
Modularity is the degree to which software can be understood by examining its
components independently of one another.
A module is a named entity that:
» Contains instructions, processing logic, and data structures.
» Can be separately compiled and stored in a library.
» Can be included in a program.
» Module segments can be used by invoking a name and some parameters.
» Modules can use other modules.
» Modules:
– Any kind of an “independent” software unit.
– Routines, subroutines (in Java: “methods”; in C:“functions”)
– Various physical units
Files (as in C, C++)
Library files (.a is the UNIX convention, DLL in Windows, JAR in Java)
11
Cont’d
Partitioning a problem in to sub parts (Modules)
Quality attributes:
» Well-defined: Modules are clearly distinguished.
» Loosely coupled.
» Cohesive.
12
Coupling: Degree of dependence among
components
13
Range of Coupling
High Coupling
Content
Common
Control
Stamp Loose
Data
Uncoupled
Low 14
Cohesion
15
Range of Cohesion
High Cohesion
Functional
Informational
Sequential
Communicational
Procedural
Temporal
Logical
Coincidental Low
16
Examples of Cohesion-1
Function A
Function B
Function C
Procedural
Related by order of functions
17
Examples of Cohesion-2
Function A Function A
Function B Function B
Function C Function C
Communicational Sequential
Access same data Output of one is input to
another
Function A part 1
Function A part 2
Function A part 3
Functional
Sequential with complete, related functions 18
Individual Assignment
19
Cont’d
A good architecture:
» Minimizes coupling between modules:
• Goal: modules don’t need to know much about one another to
interact.
• Low coupling makes future change easier.
» Maximizes the cohesion of each module:
• Goal: the contents of each module are strongly inter-related
• High cohesion makes a module easier to understand.
20
Cont’d
• Advantages of Modularity
» Understandability.
» Parallel development of different modules is possible.
» Quality of design since it will be easier to:
– Test
– Verify and validate
– Measure reliability
– Maintainability( It will be easier to):
Locate faults and correct them
Enhance
Reuse modules for different design work
21
Refinement
Refinement is the process of elaboration where the designer
provides successively more detail for each design component.
23
Architecture
24
Common Design Principles
Basic design principles help software designers to manage the design
process.
When these design principles are properly applied, the software engineer
creates a design that shows both external and internal quality factors.
25
Cont’d
1. Consideration of alternative approaches
» Decision on the approaches to follow must be made based on
– the requirements of the problem, the resources available to do the job, and
design concepts
2. The design should be traceable to the analysis model.
» it is necessary to have a means for tracking how requirements have been
satisfied by the design model.
3. The design should not reinvent the wheel.
» Design time should be invested in representing truly new ideas and integrating
those patterns that already exist.
4. Reduced intellectual gap between software and the problem
» The structure of the software design should (whenever possible) reflect the
structure of the problem domain.
26
Cont’d
5. The design should exhibit uniformity and integration
» A design is uniform if it appears that one person developed the entire
thing.
6. The design should be structured to accommodate change.
» The design should allow maintainability
7. Quality assessment of the design during the development process
» A variety of design concepts and design measures are available to
assist the designer in assessing quality.
8. The design should be structured to degrade gently (perform at a lower
quality level), even when erroneous data, events, or operating
conditions are encountered.
27
Cont’d
9. Design is not coding, coding is not design.
28
Keep it Simple (KIS)
29
Goals of Software Design
Correctness
Robustness
Flexibility
Reusability
Efficiency
Reliability
Usability
30
Cont’d
Correctness
» Software design must satisfy the requirements for the
application
Robustness
» A design or implementation is robust if it is able to handle
miscellaneous and unusual conditions such as bad data, user
error, programmer error, and environmental conditions.
31
Cont’d
Flexibility
Requirements of an application can change in many ways.
Design should be flexible to accommodate these changes.
Reusability
The trend in software is to reuse parts among applications
» Good designs are more easily modified and reused
Efficiency
» It refers to the use of available machine cycles and memory
» Efficiency conflicts with other goals of software design
Reliability
» An application is reliable if it is relatively defect free.
Usability
» An application has high usability if users find it easy to use.
32
What is Software Architecture?
33
Cont’d
34
Cont’d
36
Who Influences Software Architecture?
37
Cont’d
38
Importance of Software Architecture
Barry Boehm
39
Architecture as Communication Vehicle
40
Architecture Constrains Implementation
41
Architecture Organizes the Development
Project
42
Architecture Permits/Precludes
Achievement of Quality Attributes
For example
43
Architecture is Key to Managing Change
44
Architecture is Basis for Incremental
Development
45
Architecture is a Reusable Model
46
Architecture vs Design
All architecture is design.
SOFTWARE
DESIGN
SOFTWARE
ARCHITECTURE
47
Summary: Software Architecture
48