Design Concepts 1
Design Concepts 1
Design Concepts 1
CONCEPTS
By,
SHRINIDHI N
• ABSTRACTION
• REFINEMENT
• MODULARITY
• SOFTWARE ARCHITECTURE
• CONTROL HIERARCHY
• STRUCTURAL PARTITIONING
• DATA STRUCTURE
• SOFTWARE PROCEDURE
• INFORMATION HIDING
ABSTRACTION
• When we consider a modular solution to
a problem, many levels of abstraction can
be modeled.
• At the highest levels of abstraction, a
solution is stated in broad terms using the
language of the problem environment.
• At lower levels of abstraction, a more
procedural orientation is taken.
Levels of abstraction:
Procedural abstraction – instructions that has a
specific and limited function. Eg: The word
“open ” for a door
Data abstraction – collection of data that
describes a data object. Eg: Ada package
Control abstraction – implies a program
control mechanism without specifying internal
details. Eg: Synchronization semaphore
REFINEMENT
• Stepwise refinement is a top-down design strategy
originally proposed by Niklaus Wirth.
• A program is developed by successively refining
levels of procedural detail.
• A hierarchy is developed by decomposing a
macroscopic statement of function (a procedural
abstraction) in a stepwise fashion until
programming language statements are reached.
• In each step (refinement), one or several
instructions of the given program are decomposed
into more detailed instructions.
• .
• Every refinement step implies some design
decisions. It is important that . . .
• The programmer be aware of the underlying criteria
and of the existence of alternative solutions
Refinement is actually a process of elaboration.
• We begin with a statement of function (or description of
information) that is defined at a 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 helps the designer to disclose low-level
details as design progresses.
MODULARITY
• Software is divided into separately named and
addressable components, often called
modules, that are integrated to satisfy problem
requirements.
• The system is decomposed into a number of
modules
• Software architecture and design patterns
represent modularity and there are 5 criteria to
evaluate a design method with respect to its
ability to define effective modular system.
MODULAR DECOMPOSABILITY:
It provides a systematic approach for
decomposing the problem into sub problems.
If a design method provides a systematic
mechanism for decomposing the problem into sub
problems, it will reduce the complexity of the
overall problem
MODULAR COMPOSABILITY:
It enables existing(reusable) design
components to be assembled into a new system.
MODULAR UNDERSTANDABILITY:
If a module can be understood as a standalone
unit (without reference to other modules), it will be
easier to build and easier to change.
MODULAR CONTINUITY:
If small changes to the system requirements
result in changes to individual modules, rather than
system wide changes, the impact of change-induced
side effects will be minimized.
MODULAR PROTECTION:
If an abnormal condition occurs within a module
and its effects are constrained within that module.
SOFTWARE ARCHITECTURE
• It is overall structure of the software and the ways
in which that structure provides conceptual
integrity for a system.
• Architecture is the hierarchical structure of
program components the manner in which these
components interact and the structure of data that
are used by the components.
• One goal of software design is to derive an
architectural rendering of a system.
• This rendering serves as a framework from which
more detailed design activities are conducted.
PROPERTIES OF ARCHITECTURAL
DESIGN:
• Structural properties : defines the components of a
system (e.g., modules, objects, filters) and the manner
in which those components are packaged and interact
with one another.
• Extra-functional properties : design should address
how the design architecture achieves requirements for
performance, capacity, reliability, security,
adaptability, and other system characteristics.
• Families of related systems : The architectural
design should draw upon repeatable patterns that are
commonly encountered in the design of families of
similar systems. In essence, the design should have
the ability to reuse architectural building blocks.
MODELS OF ARCHITECTURE :
• Structural models : represent architecture as an
organized collection of program components.
• Framework models : To identify repeatable
architectural design framework that similar to the
types of applications
• Dynamic models : address behavioral aspects of
the program architecture
• Process models : design of the business or
technical process of a system
• Functional models : functional hierarchy of a
system
CONTROL HIERARCHY
• also called program structure, represents the
organization of program components (modules)
and implies a hierarchy of control.
• It does not represent procedural aspects of
software such as sequence of processes,
occurrence or order of decisions, or repetition of
operations; nor is it necessarily applicable to all
architectural styles.
• Different notations are used to represent control
hierarchy for those architectural styles that are
agreeable to this representation.
• The most common is the treelike diagram that
represents hierarchical control for call and return
architectures.
STRUCTURAL PARTITIONING
• The program structure can be partitioned both
horizontally and vertically.
• Horizontal partitioning : defines separate
branches of the modular hierarchy for each major
program function.
3 partitions—input, data transformation and
output.
Benefits of horizontal partitioning :
1. software that is easier to test
2. software that is easier to maintain
3. propagation of fewer side effects
4. software that is easier to extend
Negative : cause more data to be passed
across module interfaces and can complicate
the overall control of program flow .
• Vertical partitioning: also called factoring.
Control and work should be distributed top-
down in the program structure.
Top level modules should perform control
functions and do little actual processing work.
Modules that reside low in the structure
should be the workers, performing all
input,computation, and output tasks.
DATA STRUCTURE
• Data structure is a representation of the logical
relationship among individual elements of data.
• Because the structure of information will
invariably affect the final procedural design, data
structure is as important as program structure to
the representation of software architecture.
• Data structure dictates the organization, methods
of access, degree of associativity and processing
alternatives for information.
• A scalar item is the simplest of all data structures.
a scalar item represents a single element of
information that may be addressed by an
identifier.
• When scalar items are organized as a list or contiguous
group, a sequential vector is formed. Vectors are the
most common of all data structures and open the door
to variable indexing of information.
• When the sequential vector is extended to two, three,
and ultimately, an arbitrary number of dimensions, an
n-dimensional space is created. The most common n-
dimensional space is the two-dimensional matrix. In
many programming languages, an n - dimensional
space is called an array.
• A linked list is a data structure that organizes non -
contiguous scalar items, vectors, or spaces in a manner
(called nodes) that enables them to be processed as a
list.
SOFTWARE PROCEDURE
• Program structure defines control hierarchy
without regard to the sequence of processing and
decisions.
• Software procedure focuses on the processing
details of each module individually.
• Procedure must provide a precise specification of
processing, including sequence of events, exact
decision points, repetitive operations, and even
data organization and structure.
• The processing indicated for each module must
include a reference to all modules subordinate to
the module being described.
INFORMATION HIDING
• The principle of information hiding suggests that
modules be characterized by design decisions that
(each) hides from all others.
• Hiding implies that effective modularity can be
achieved by defining a set of independent
modules that communicate with one another only
that information necessary to achieve software
function.
• Abstraction helps to define the procedural entities
that make up the software.
• Hiding defines and enforces access constraints to
both procedural detail within a module and any
local data structure used by the module.
• The use of information hiding as a design
criterion for modular systems provides the
greatest benefits when modifications are
required during testing and later, during
software maintenance.
• Because most data and procedure are hidden
from other parts of the software, inadvertent
errors introduced during modification are less
likely to propagate to other locations within
the software.
THANK YOU