Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
04 design concepts_n_principles
1. DESIGN CONCEPTS & DESIGN PRINCIPLE
What are those factors which drive a good design ?
2. DESIGN CONCEPTS & DESIGN PRINCIPLE
How Analysis Model Feeds DATA to the DESIGN
Phase ?
CSPEC, PSPEC Component
Level Design
DFD, STD INTERFACE
DESIGN
DFD
ARCHITECTURAL DESIGN
DOB, ERD, DATA DICT
DATA DESIGN
The PYRAMID MODEL OF DESIGN
January 13, 2012 Made by Utpal Kumar Ray 2
3. DESIGN CONCEPTS & DESIGN PRINCIPLE
TRANSITION FROM ANALYSIS TO DESIGN
January 13, 2012 Made by Utpal Kumar Ray 3
4. DESIGN CONCEPTS & DESIGN PRINCIPLE
The GOAL of the DESIGN Process
The Design should meet all the implicit and
explicit requirement of the customer.
The Design must be a readable and
understandable guide for those who generates
codes, does testing and provides maintenance.
The Design should provide a complete picture of
the software, addressing the data, functional and
behavioral domains from an implementation
perspective.
January 13, 2012 Made by Utpal Kumar Ray 4
5. DESIGN CONCEPTS & DESIGN PRINCIPLE
Technical Criteria for good design
-A Design should exhibit a good architectural structure.
-A Design should be modular.
-A Design should lead to the Data Structure that are
appropriate enough for a practical object implementation.
-A Design should contain distinct representations of data,
architecture, interfaces and components.
-A Design should lead to interfaces that reduce the
complexity of connections between modules and with
external environments.
-A Design should be derived using repeatable method that is
driven by information obtained during software
requirement analysis.
January 13, 2012 Made by Utpal Kumar Ray 5
6. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Principles
- The design process should not suffer from tunnel
vision, but should consider multiple alternative
approaches.
- The design should be traceable to the analysis model.
- The design should not reinvent the wheel.
- The design should “minimize the intellectual distance”
between the software and the problem as it exists in the
real world.
- A design should exhibit uniformity and integration.
January 13, 2012 Made by Utpal Kumar Ray 6
7. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Principles ( contd. )
- The design should be structured to accommodate
change
- The design should be structured to degrade
gracefully, even when aberrant data, events, or operating
conditions are encountered. It should accommodate all
the unusual circumstances.
- The design is not coding; coding is not design.
- The design should be assessed for quality on continuous
basis.
January 13, 2012 Made by Utpal Kumar Ray 7
8. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Abstraction
Each step in the software process is a refinement in the
level of abstraction of the software solution. During
software requirement analysis, the software solution is
stated in terms “that are familiar in the problem
environment”. As one move through the design
process, the level of abstraction is reduced. Finally, the
lowest level of abstraction is reached when the source
code is generated. The notion of abstraction permits
one to concentrate on a problem at some level of
generalization without regard to the irrelevant details
of the lower levels.
January 13, 2012 Made by Utpal Kumar Ray 8
9. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Refinement
Refinement is actually a process of elaboration. One
begins with a statement of function that is defined at
high level of abstraction. That is the statement
describes function or information conceptually but
provides no information about the internal workings
of the function or the internal structure of the
information. Refinement causes the designer to
elaborate on the original statement, providing more
and more details as each successive refinement
(elaboration) occurs.
January 13, 2012 Made by Utpal Kumar Ray 9
10. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Abstraction and Refinement
They are complementary concepts. Abstraction
enables a designer to specify procedure and data
without mentioning low level details. Refinement
helps the designer to reveal low-level details as
design progresses. Both concepts aid designer in
creating a complete design model as the design
evolves.
January 13, 2012 Made by Utpal Kumar Ray 10
11. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity
- Modularity makes a big software to be more
manageable.
- Modularity makes a complex problem to solve more
easily. Which means, it is easier to solve a complex big
problem when that big problem is broken down into
smaller manageable pieces.
- Modularity can not be extended indefinitely as cost to
integrate goes up as big module is broken into smaller
modules. One has to find the region of minimum
cost.
January 13, 2012 Made by Utpal Kumar Ray 11
12. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity (contd.)
Modularity and Complexity of Problem
Let C(x) be the function which defines the perceived
complexity of a problem x, and E(x) be the function that
defines the effort (in time) required to solve the problem.
For the two problems P1 and P2; if C(P1) > C(P2) then E(P1) >
E(P2).
If there exists a big problem P which can be broken down to
p1 and p2 then as per human problem solving nature; C(P) >
C(p1) + C(p2).
So it is also true that E(P) > E(p1) + E(p2).
January 13, 2012 Made by Utpal Kumar Ray 12
13. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd.)
Total S/W Cost
Cost of
Region of
effort
Minimum cost
Cost to
Integrate
Cost per Module
No of Modules
Modularity Vs. Software Cost
January 13, 2012 Made by Utpal Kumar Ray 13
14. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
- How to arrive at the correct no of modules ?
- What should be the ideal module size ?
- How do we know we have reached the lowest
possible modular granularity ?
To answer the above questions one has to
remember the following criteria which enables one
to understand whether the optimum module size
is reached.
January 13, 2012 Made by Utpal Kumar Ray 14
15. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
- Modular Understandability
Module should be understood as a standalone unit
- Modular Continuity
A small change to the system requirements should
not trigger a system wide changes rather than a
change in the individual module.
- Modular Protection
An error condition generated in a module should
stay in the same module, rather than propagating
to other modules.
January 13, 2012 Made by Utpal Kumar Ray 15
16. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
- Cohesion
While breaking down a big problem to individual
modules, it should be noted that all individual
module should aim for high cohesion. High
cohesion means, that module is doing a single
task. An example of low cohesion is , when a
module performs a set of task that are loosely
related to each other
January 13, 2012 Made by Utpal Kumar Ray 16
17. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
- Coupling
Coupling is a measure of interconnection among
modules. One should always aim for the lowest possible
coupling for a module. There are so many different types
of coupling:
1. Low Coupling: data or data structure coupling
2. Moderate Coupling: Control flag Coupling
3. High Coupling: Common Coupling
4. Highest Coupling: Content Coupling
January 13, 2012 Made by Utpal Kumar Ray 17
18. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
a d
Data Structure
Coupling (low) Data Coupling Control Flag Coupling
(low) ( moderate )
b c e
Low and Moderate Coupling
January 13, 2012 Made by Utpal Kumar Ray 18
19. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
a d g
b c e f h
Common Coupling (high)
Common Coupling
( high ) Global Data
Area Common Coupling
( high )
High Coupling
January 13, 2012 Made by Utpal Kumar Ray 19
20. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Modularity ( contd. )
a c
Data
b d
Content Coupling Control
(Highest)
Highest Coupling
January 13, 2012 Made by Utpal Kumar Ray 20
21. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Concepts – Information Hiding
The modules should be specified and designed such a way,
so that the information (procedure and data) contained
within a module is inaccessible to other modules that have
no need for such information. Which means all modules
should be functionally independent.
The use of information hiding as a design criterion for
modular systems provides the greatest benefits when
modification is required during testing and later, during
software maintenance. The unintentional errors
introduced in one module during modification are unlikely
to propagate to other modules.
January 13, 2012 Made by Utpal Kumar Ray 21
22. DESIGN CONCEPTS & DESIGN PRINCIPLE
A Typical Design Specification
1. Preface : A brief history about the project
2.Audience : Who should read this document
3. Scope of Design : A description of S/W Req Spec
4.Data Design : A description of database structure,
external file structure, internal data structure etc.
5.Architectural Design : A description of evolved s/w
architecture and how it was been derived from the
analysis model.
January 13, 2012 Made by Utpal Kumar Ray 22
23. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Spec ( contd. )
6.Interface Design : All internal and external interface
are described here. All human and machine interfaces
are described here.
7.All low levels s/w components (modules) are described
here using English like languages ( pseudo-coding).
8.Requirement Cross Reference : The purpose of this
cross reference is to show that all requirements are
satisfied by the s/w design. And also to indicate which
are those critical components to be implemented to
satisfy specific requirements.
January 13, 2012 Made by Utpal Kumar Ray 23
24. DESIGN CONCEPTS & DESIGN PRINCIPLE
Design Spec ( contd. )
9.Design Constraints : Physical memory limitation,
necessity for a specialized external interface, the other
h/w factors which may influence the design latter etc.
10.Supplementary Data : Algorithm descriptions,
Alternative procedure, Tabular Data etc.
11.Software Distribution & Installation : Procedure for
distributing s/w and installing it in the customer
location.
January 13, 2012 Made by Utpal Kumar Ray 24
25. DESIGN CONCEPTS & DESIGN PRINCIPLE
Home Task
Develop at least five levels of abstractions for a
SUDOKU Game.
January 13, 2012 Made by Utpal Kumar Ray 25