You are on page 1of 31

CSE 303 – SOFTWARE

DESIGN AND
ARCHITECTURE
LECTURE 03
Previous Lecture
 Design phase in SDLC – architecture and detailed
design
 Factors that affect design
 Quality Models
Outline
 Good design
 Quality attributes of software design
 Software design principles
 Concepts in design
good design
Efficiency
 Efficiency refers to the responsiveness of the
system,
 i.e. the time required to respond to stimuli (events),
 or the number of events processed in some interval of
time.
Efficiency
 The time to process a sequence of events can be divided into
three parts.

 First, time is needed to communicate between different software


components that collaborate to process an event.

 Second, the computation times that components executed may


have overlaps or gaps between them.

 Third, the times are needed for each component to complete its
computation.
Correctness
 Correctness is the property that software
implements the specified users’ requirements.

 It is impossible that a design at any level that does


not correctly implement the specified requirements
would lead to a correct implementation.
Reliability
 Reliability can be defined as the probability that a
system performs user required functionality
correctly
 at a specified environment in a given period of time.
Portability
 Portability is the property of a software system that
can be easily transported from one
hardware/software platform to another,
 for example, from a PC/Windows environment to a
Sun/Unix environment or a Macintosh environment.
Maintainability
 Maintainability refers to the easiness of maintaining a
software system.

 There are two types of software maintenance operations.


 corrective maintenance.
 adaptive maintenance.

 Well-structured design helps software engineers to


understand the system.
Reusability

 Reusability is the property of a software system


that its components can be easily reused in the
development of other software systems.

 Reusability depends on the generality of the


components in a given application domain and the
extent to which the components are parameterised and
configurable.
Interoperability
 Interoperability is the property of how easy a software
system can be used with other software systems.

 Interoperability mostly depends on the interface


between a software system and its environment.

 It requires that the implementation of the software


follow certain standard interface and coding
conventions.
QUALITY ATTRIBUTES OF SOFTWARE
DESIGN
Quality Attributes – Design Objectives

 Modularity:
 The design should be composed of replaceable, self-
contained assemblies of elementary parts,
 thereby aiding both the initial development and the later
maintenance.

 Portability:
 The designed product should be able to be moved unchanged
 from test environments to operational environments and
 from one operational environment to another.
Quality Attributes – Design Objectives
 Flexibility or modifiability:
 The design should facilitate adaptation to changing end-user
requirements,
 changes based on new problems in the end users’ world

 Conceptual integrity:
 The design should exhibit harmony, symmetry and predictability.

 Well structured:
 The design should be consistent with chosen design principles,
such as information hiding, to organise the structure of the design.
Quality Attributes – Design Objectives

 Simple:
 The design should be ‘as simple as possible, but no
simpler’.

 Efficient:
 The functions provided by the design should be computable
by using the available resources.

 Adequate:
 The design should meet the stated requirements.
Quality Attributes – Design Objectives

 Flexible:
 The design should be able to accommodate likely changes in the
requirements, however these might arise.

 Implementable:
 The functions offered by the design should be theoretically computable
with the information available and achievable using currently available
software and hardware technology.

 Standardised:
 The design should be represented using standard or well defined and
familiar notation for any documentation.
Quality Attributes – Design Objectives

 Feasibility:
 The designed process of bringing about the product should be
executable.

 Simplicity:
 The production (i.e. the development) of the designed software should
be as simple and straightforward as possible without unnecessary
complication.

 Reliability:
 The designed development process should with high probability be
successful rather than fail to achieve its goal.
Software design principles
Software Design Principles
 Always consider alternative approaches

 The design should be traceable to the analysis model

 The design should not reinvent the wheel

 The design should minimise intellectual distance between


the software and the problem as it exists in the real world.
Software Design Principles contd…

 The design should exhibit uniformity and integration


 A design is uniform if it appears that one person developed
the whole thing.
 A design is integrated if care is taken in defining interfaces
between design components.

 The design should be reviewed to minimize conceptual


(semantic) errors
Software Design Principles contd…

 Design is not coding, coding is not design


 Even when detailed designs are created for program
components, the level of abstraction of the design model is
higher than source code.

 The design should be structured to accommodate change

 The design should be assessed for quality as it is being


created
23 CONCEPTS IN DESIGN
Concepts in Software Design Process
 Abstraction
 Concentrate on a problem at some level of generalization
without regard to irrelevant low level details.
 Modularity
 Divide the software into separately named and addressable
components, that are integrated to satisfy the problem
requirements.
 Refinement
 Top down design strategy that successively refines the
levels of procedural details.
 Every refinement step involves Design Decisions.
Modular Design
 Easier to manage
 Easier to understand
 Reduces complexity
 Delegation / division of work
 Fault isolation
 Independent development
 Separation of concerns
 Reuse
Effective Modular Design
 How to decompose a software system into best set
of modules?
 Information hiding
 Cohesion
 Coupling
 Functional independence
Information Hiding
 Design the modules in such a way that information
(data & procedures) contained in one module is
inaccessible to other modules that have no need for
such information.

 Independent modules.
 Benefits:
 when modifications are required, it reduces the chances
of propagating to other modules.
Cohesion
 “A module should ideally do one thing.”
 Each module performs a single task requiring little
interaction with other modules.
 A cohesive module since accomplished neatly defined
single task so it can be re-used in other projects
 High cohesion is good
 Changes are likely to be local to a module
 Easier to understand a module in isolation
Coupling

 A measure of interconnection among modules in a


software structure
 Depends on the interface complexity between the
modules
 High coupling causes problems
 Change propagation- ripple effect

 Difficulty in understanding

 Difficult reuse
Functional Independence
 A module having high cohesion and low coupling is said to
be functionally independent of other modules.

 Each module addresses a specific sub function of


requirements and is easier to maintain or modify
 Benefits:
 Error isolation
 Scope of Re-use
 Understandability
Summary
 Good design
 Quality attributes of software design
 Software design principles
 A few concepts in design

You might also like