You are on page 1of 41

The effect of design on software

quality

Asanka Sanjaya | hmasanjaya@gmail.com

1
Quality
● Different people may have different views on what is quality and how to
measure the quality of a product or service.
● Even the same people may have different views on quality from time to time.

2
Views of Quality
● The transcendental view sees quality as something that can be recognised
but not defined.
● From a user’s point of view, quality is ‘fitness for purpose’. It can be highly
personal.
● The value-based view of quality is concerned with the ability to provide what
the customer requires at a price that they can afford.
● From the manufacturing point of view, the quality of a product is the
conformance to specification. It see quality as whether it is constructed ‘right
the first time’, therefore, the costs associated with rework during
development and after delivery can be avoided.

3
Views of Quality cont...
● Product view sees the quality of a product as tied to inherent characteristics
of the product. It looks inside of the product.
● As software designers, we take the product view of quality to study what
quality attributes the software should have.

4
Software quality
● Software quality must be addressed during the whole process of software
development.
● The designed software system should meet the required quality.

5
The effect of design
on software quality

6
The effect of design on software quality
● Design is importance in developing quality software for two reasons:
○ Design is the first stage in software system creation. Therefore errors made at this stage can
be costly, even impossible, to be rectified.
○ Design decisions have significant effects on the quality of the final product.

● Software design tasks can be divided into several interrelated subtasks:


○ Architecture design
○ Interface design
○ Detailed design

● In next set of slides we discuss how architecture design, interface design


and detailed design affect the key quality attributes of software.
7
Key quality attributes of a software
● Efficiency
● Correctness and reliability
● Portability
● Maintainability
● Reusability
● Interoperability

8
Efficiency
● Efficiency refers to the responsiveness of the system.

Ex: The time required to respond to events or the number of events processed in some interval of
time.

9
The effect of design on Efficiency
● Communication between components:
○ A bad design would result in a large amount of communication between components; while a
good design can keep communications within components hence avoid unnecessary
communications between components.

● The computation times of components:


○ The computation times that components executed may have overlaps or gaps between them.
A good division and grouping of functionality into components and distribution of components
on different computing processors would maximise components’ parallel executions and
minimise time spent on synchronisation and waiting for each other.

10
The effect of design on Efficiency cont...
● Functionality assigned to the components:
○ Performance depends on the choice of algorithms and data structures to implement selected
functionality assigned to the components. It also depends on how the algorithms are coded,
e.g. in a particular programming language.

11
Correctness and reliability
● Correctness is the property that software implements the specified users’
requirements.
● Reliability is the probability that a system performs user required functionality
correctly at a specified environment in a given period of time.
● Reliability can be measured in:
○ Mean time between failures
○ The probability of failure on demand
○ Availability
● Reliability largely depends on the amount of faults in the software system.
○ Faults at architectural structure
○ Errors in algorithm and data structure design
○ flaws in coding and implementation.

12
The effect of design on Reliability
● A good architectural design:
○ decomposes a complicated design problem into simpler sub-problems.
○ Provides an understandable solution of the original problem.
● A good architectural design helps:
○ To reduce the probability of errors made at lower level design and implementation.
○ The Testability of the system. So errors can be fixed by testing.
○ To introduce fault tolerant features which help to recover from runtime failures.
● Good HCI designs can prevent invalid input and misinterpretation of output.
hence, they can significantly reduce the probability of system failures caused
by human operation errors.

13
The effect of design on Reliability cont...
● Detailed design such as algorithm and data structure design affect the
simplicity of the coding.
● The choice of programming language determines whether algorithms and
data structures can be naturally and easily coded.

14
Portability
● Portability is the property of a software system that can be easily transported
from one hardware/software platform to another.
○ Ex: Windows, Linux, Mac Compatibility of a software.
● Moving from one environment to another usually requires replacing the part
of the code that depends on the facilities provided by the environment, such
as system calls.

15
The effect of design on Portability
● A well structured architectural design should group environment dependent
code into a small number of components so that the change on the code to
move to another environment can be achieved by replacing such components
with new ones rather than rewrite the whole system.
● At detail design level, the design of algorithms and data structures should not
heavily depend on the platform specific feature so that portability can be
obtained.
● As for interface design, if an interface is heavily dependent on the
environment specific features, the moving from one environment to another
will be difficult.

16
Maintainability
● Maintainability refers to the easiness of maintaining a software system.
● Two types of software maintenance operations.
○ Corrective maintenance: Modification of the system for correction of bugs.
○ Adaptive maintenance: Modification of the system due to environment changes.
■ Ex: upgrades in DBMS or OS

17
The effect of design on Maintainability
● Well-structured architectural design helps software engineers to understand
the system.
● Architectural design plays an important role in maintenance,.
● Maintainability is less heavily dependent on detail design and interface
design.

18
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.

19
The effect of design on Reusability
● Architecture design is importance because it determines how the
functionality of a software system is decomposed into components and how
they are interconnected.
● Detailed design in terms of algorithm and data structure design also play a
role in reusability in the way that they determine how easily the components
can be parameterised and the way to configure the components.
● Interface design contributes to the reusability in a minor way in that it
determines how reusable the interface is.

20
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.
● Architecture design and algorithm and data structure design have little to do
with interoperability.

21
Different views of
quality attributes of
Software design

22
Different views of quality attributes of Software
design
● We have already discussed about key quality attributes of a software.
● Among many software design quality attributes, some are believed to be
more important than the others.
● Different authors have proposed different sets of quality attributes that are
considered as most desirable.
○ Witt, Baker and Merritt’s design objectives
○ Parnas and Weiss’s requirements of good designs

23
Witt, Baker and Merritt’s design objectives
Witt, Baker and Merritt regarded the following properties as design ‘objectives’.

Designs that have these properties relatively easily achieve many software quality
attributes.

● Modularity
● Portability
● Malleability
● Conceptual integrity

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

25
Portability
● Individual parts of the design, as well as the design as a whole, should be
capable of reuse in different environments.
● The designed product should be able to be moved unchanged from test
environments to operational environments and from one operational
environment to another.

26
Malleability
● The design should facilitate adaptation to changing end-user requirements,
for example, changes based on new problems in the end users’ world, the
discovery of a need for information not previously anticipated or included in
the original specifications.
● This property is also widely known as flexibility or modifiability.

27
Conceptual integrity
● Conceptual integrity is the principle that anywhere you look in your system,
you can tell that the design is part of the same overall design.
● There should be no surprises for its users or its maintainers; knowledge
gained in one use or change should be immediately transferable to the next.

28
Parnas and Weiss’s requirements of good
designs
Parnas and Weiss identified the following eight requirements for good designs.

1. Well structured: The design should be consistent with chosen design


principles, such as information hiding, to organise the structure of the design.
2. Simple: The design should be ‘as simple as possible, but no simpler’.
3. Efficient: The functions provided by the design should be computable by
using the available resources.
4. Adequate: The design should meet the stated requirements.
5. Flexible: The design should be able to accommodate likely changes in the
requirements, however these might arise.
29
Parnas and Weiss’s requirements of good
designs cont...
6. Practical: Each module in the design should provide the required facilities,
neither more nor less.

7. Implementable: The functions offered by the design should be theoretically


computable with the information available and achievable using currently available
software and hardware technology.

8. Standardised: The design should be represented using standard or well defined


and familiar notation for any documentation.

30
Software quality
models

31
Software quality models
● What are software quality attributes? How are they interrelated? Proposals to
answer these questions have been advanced as software quality models.
● Two types of Models:
○ Hierarchical models
○ Relational models

32
Hierarchical models
In hierarchical models quality attributes are often classified into a hierarchical
structure to highlight the relationship between them.

Ex: McCall’s model of software quality

33
McCall’s model of software quality

34
McCall’s model of software quality cont...
● McCall identified three main perspectives for characterizing the quality
attributes of a software product.
○ Product revision (ability to change).
○ Product transition (adaptability to new environments).
○ Product operations (basic operational characteristics).
● Each group represents the quality with respect to one aspect of the software
system while the attributes in the group contribute to that aspect.
● Each quality attribute is defined by a question so that the quality of the
software system can be assessed by answering the question.

35
Relational models
Ex: Perry’s relational model of software quality

36
Perry’s relational model of software quality

37
Perry’s relational model of software quality
cont...
The direct relationship between two quality attributes means that if a software
system is good at one attribute it should also be good at the other attribute.

The inverse relationship means that a software system that is good at one
attribute will not be good at the other attribute.

The neutral relationship means that the two attributes are normally independent of
each other.

38
Perry’s relational model of software quality
cont...
● Integrity vs. efficiency (inverse): The control of data access will need
additional code, leading to a longer runtime and more storage requirement.
● Usability vs. efficiency (inverse): Improvement of HCI will need more code
and data, hence the system will be less efficient.
● Maintainability and testability vs. efficiency (inverse): Compact and
optimised code is not easy to maintain and test, and well-commented code is
less efficient.
● Flexibility, reusability vs. integrity (inverse): Flexible data structures required
for flexible and reusable software increase the data security problem.

39
Perry’s relational model of software quality
cont...
● Flexibility and reusability vs. maintainability (direct): Maintainable code
arises from the code that is well structured; meantime, well-structured
maintainable code is easy to reuse in other programs.
● Portability vs. reusability (direct): Portable code is likely to be easily used in
other environments. The code is likely well-structured and easier to be reused.
● Correctness vs. efficiency (neutral): The correctness of code has no relation
with its efficiency. Correct code may be efficient or inefficient in operation.

40
Shortcomings of Perry’s model
● His analysis is based on ‘common sense’ and lack of hard evidence.
● The assumption that the relationships are commutative.

41

You might also like