Software Engineering Axioms

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

Design Fundamentals

Software Design andArchitecture (Fall 2020)

Lecture 2

Aamir Anwar

Lecturer Computer Science


SZABIST, Islamabad Campus

1/ 18
Outline

Introduction

FunctionalIndependence

Design Errors

Axioms for Good Design

2/ 18
Design Concepts

Abstraction
• Concentrate on a a problem at some level of generalization
without regard to irrelevant low leveldetails.
Refınement
• Top down design strategy that successively refınes the levels of
procedural details.
• Every refınement step involves Design Decisions.
Modularity
• Divide the software into separately named and addressable
components, that are integrated to satisfy the problem requirements.

3/ 18
Modularity

• Easier to manage
• Easier to understand
• Reduces complexity
• Delegation / division of work
• Fault isolation
• Independent development
• Separation of concerns
• Reuse

4/ 18
Modular Design

How to decompose a software system into best set of modules?


• Information hiding
• Functional independence
• Cohesion
• Coupling

5/ 18
Information Hiding

• Modules to be characterized by design decisions that hide from


all others.
• Design the modules in such a way that information (data &
procedures) contained in one module is directly inaccessible to other
modules.
• Independent modules.
Benefıts:
• When modifıcations are required, it reduces the chances
of propagating to othermodules.

6/ 18
Information Hiding

public class PersonalInfo {


public String name;
public String City;
private int age;

person1.age=25;

7/ 18
Functional Independence

• Develop modules with “single-minded” function.


• Each module addresses a specifıc sub function of requirements
and has a simple interface when viewed from other parts of the
system.
• Functions are compartmentalized and interfaces are simplifıed.
Benefıts
• Error propagation is reduced and can lead to reusability of
modules.

8/ 18
Cohesion

• An extension of Information hiding and functional


independence. “A module should ideally do onething.”
• Each module performs a single task requiring little interaction
with other modules.
• High cohesion is good
o Changes are likely to be local toa module
o Easier to understand a module inisolation

9/ 18
Coupling

A measure of interconnection among modules in a software


structure

• Depends on the interface complexity between the modules.


• Number of dependencies between modules.
• High coupling causes problems
o Change propagation- ripple effect
o Diffıculty in understanding
o Diffıcult reuse

10/ 18
Design ErrorsI

Incorrectness
• The design does not meet the users‘ requirements on
its functionality and features.
Inconsistency
• Inconsistency is where a design does not work
o Conflicting assumptions about functionality, data etc. bydifferent
design decisions/statements

11/ 18
Design ErrorsII

Ambiguity
• Different interpretations or ambiguous design specifıcation
o Ambiguity causes errors in the implementation of the design due
to inconsistent interpretations made in the implementation
process.
Inferiority
• The design does not address quality requirements adequately.
o Typical inferior quality problems include ineffıciency and
infTexibility.

12/ 18
Reducing Diffıculties

Witt, Baker and Merritt1 listed 4 basic statements (axioms)about


principles that can lead to good design
• The axiom of separation of concerns
• The axiom of comprehension
• The axiom of translation
• The axiom of transformation

Book “Software Architecture and Design” published 1994


1

13/ 18
AxiomsI

The Axiom of Separation ofConcerns


• A complex problem can best be solved by initially devising an
intermediate solution expressed in terms of simpler independent
problems.
The Axiom of Comprehension
• The mind cannot easily manipulate more than about seven things
at a time.
• This axiom is widely known as the Rule of Seven Plus or Minus Two.
o Avoid large numberof independent units of information

14/ 18
AxiomsII

The Axiom of Translation


• Design correctness is unaffected by movement between
equivalent contexts.
o A correct design that meets its interface and behaviour
specifıcations in one environment will continue to meet its
specifıcations despite a change in environment, provided that the
new environment provides equivalent services

15/ 18
AxiomsIII

The Axiom of Transformation


• Design correctness is unaffected by replacement of
equivalent components.
o Suppose that we have a design with several components that
meet their interface and behaviorspecifıcations.
o Replacement of one its components with a different design,
provided that the replacement satisfıes the interface and behavior
specifıcations of the original component, will have no effect on the
overall design of the system.

16/ 18
Conclusions

1. Design is an iterative process, it can’t be correct or complete in 1st


attempt.
2. You have to decide when to stop designing and move to
implementation
3. Design is a creative process
4. Completeness of design upfront might not be possible in certain
situations...

17/ 18
References

Chapter 8 (Design Concepts), Chapter 9 (Architectural Design) of “Software


Engineering: A Practitioner’s Approach” 7th Ed, by RogerS. Pressman.

18/ 18

You might also like