Professional Documents
Culture Documents
Topics covered
Chapter 7 Design and implementation 433 Chapter 7 Design and implementation 434
1
3/20/2023
Design acti
vities
q Modularity has long been seen as a key to cheap, high
Architectur
al Abstract Interface Component Data
structur
e
Algorithm quality software.
design specifica
tio design design design
n design
q The goal of system design is to decode:
System Software Interface Component
Data
structure
Algorithm q What the modules are;
architectur
e specifica
tion specifica
tion specifica
tion specifica
tion
specification
Design pr
oducts
q What the modules should be;
q How the modules interact with one another
2
3/20/2023
• The system is viewed as a collection qWe can identify five criteria to help
of interacting objects. evaluate modular design methods:
qModular decomposability;
• The system state is decentralised and
qModular composability;
each object manages its own state.
qModular understandability;
• Objec ts m ay be ins tance s of an
qModular continuity;
object class and communicate by
qModular protection.
exchanging methods.
3
3/20/2023
method supports the decomposition of a problem q Not appropriate for large-scale, distributed systems: mainly
into smaller sub-problems, which can be solved applicable to the design of methods.
q Basic idea is:
independently.
q Start with a high-level spec of what a method is to achieve;
q In general the method will be repetitive:
q Break this down into a small number of problems (usually
q sub-problems will be divided still further
no more than 10)
q Top-down design methods fulfil this criterion;
q For each of these problems do the same;
q stepwise refinement is an example of such method q Repeat until the sub-problems may be solved immediately.
System level
Sub-system
level
source: learnlearn.uk/
4
3/20/2023
Examples
1. The Numerical Algorithm Group (NAG) libraries contain a wide Modular Understandability
range of routines for solving problems in linear algebra, differential A design method satisfies this criterion if it
equations, etc. encourages the development of modules which
are easily understandable.
2. The Unix shell provides a facility called a pipe, (|), whereby:
COUNTER EXAMPLE 1.
the standard output of one program may be redirected to the standard
Take a thousand lines program, containing no
input of another for further processing; this convention favours procedures; it’s just a long list of sequential
composability. statements.
Divide it into twenty blocks, each fifty statements
Syntax: Command 1 | command 2 | command 3 | ……
long.
E.g.: $ cat roughstudentlist.txt | sort | uniq > sortedstudentlist.txt Make each block a method.
(Fetches the file, sorts it and removes redundancies and saves in another file C O U N T E R EXAMPLE 2. “Go to”
with the same extension.) statements ...
5
3/20/2023
change in the problem specification leads run-time only affects one (or very few) modules
to a change in just one (or a small number EXAMPLE. Validating input at source prevents errors
EXAMPLE. Some projects enforce the rule that no COUNTER EXAMPLE. Using int types where
numerical or textual literals should be used in short types are appropriate.
programs: only symbolic constants should be used
6
3/20/2023
2
Your system should stay closer to the minimum
7
3/20/2023
Coupling Coupling
qLoose coupling means component changes are
qA measure of
unlikely to affect other components.
qt he strength of the q Shared variables (see next slide) or control
interco nnecti ons be tw ee n information exchange lead to tight coupling.
q Loose coupling can be achieved by state
system components
decentralisation (as in objects where each
qi.e., a measure of the degree of has its own state) and component
interdependence between co m m u n ic at i o n v ia p a r a m et e r s o r
message passing.
8
3/20/2023
A’s data
Module A Module B
Module B Module C
Module C Module D B’s data C’s data
9
3/20/2023
10
3/20/2023
11
3/20/2023
12
3/20/2023
13
3/20/2023
Communicational Cohesion
Cohesion Levels
A mod ule exhi bi ts co mmunic ati on al
cohesion if all the activities it supports use S e quential cohesion
the same input or output data - or access
and modi fy the same p art of a d ata (medium)
structure.
E.g. a module supporting the activities The output for one part of a
Find Title of Book
Find Price of Book
component is the input to
Find Publisher of Book another part.
Find Author of Book
14
3/20/2023
15
3/20/2023
Implementation issues
Reuse Reuse levels
q From the 1960s to the 1990s, most new software was q The abstraction level
developed from scratch, by writing all code in a high-level At this level, you don’t reuse software directly but use
q
programming language. knowledge of successful abstractions in the design of
q The only significant reuse or software was the reuse of
your software.
functions and objects in programming language libraries. q The object level
q At this level, you directly reuse objects from a library
q Costs and schedule pressure mean that this approach
rather than writing the code yourself.
became increasingly unviable, especially for commercial
q The component level
and Internet-based systems.
q Components are collections of objects and object
q An approach to development based around the reuse of
classes that you reuse in application systems.
existing software emerged and is now generally used for
q The system level
business and scientific software.
q At this level, you reuse entire application systems.
Chapter 7 Design and implementation 497 Chapter 7 Design and implementation 498
16
3/20/2023
Implementation issues
Configuration management Software Change
q ‘Change is a fact of life in software development.’
qConfiguration management is the name given q ‘No matter where you are in the system life cycle, the system will change.’
to the general process of managing a changing q ‘Most changes are justified.’
q Pressman
software system.
q Why does software continually change?
qThe aim of configuration management is to q Business growth, business downsizing, budget constraints
support the system integration process so that q New business, new markets, new customers
q all developers can access the project code and q Existing customers change requirements
documents in a controlled way, q Project managers change strategy
q Developers learn of new technical solutions
q find out what changes have been made, and
q During the development of software change must be
q compile and link components to create a system. managed and controlled in order to improve quality and
reduce error.
Chapter 7 Design and implementation 501
17
3/20/2023
system for software components. q In the first version of a product, you might have an image with a blue background.
q In the next release, the marketing department requests that it have a red
background instead.
q Since a large number of parts go into a software
q The engineering department makes the change and records that change in the
product, we need a version system version system.
q We are still talking about the same part but it's a different version of the same
part.
q to store all of these parts and
q When the person building the product requests the set of parts from the version
system for the new release, they will get the image with the red background.
q record which part goes into which configuration of your
q If there is a request to rebuild the older version of the product, then the builder
product. will request the set of parts for that version and gets the image with the blue
background.
Chapter 7 Design and implementation 505 Chapter 7 Design and implementation 506
18
3/20/2023
q documents, software, source code, hardware, tapes, qDocuments describing the programs
disks, computer listings q technical manual
q Aims: q users manual
q uniquely identify every version of every product or
qData
configuration item
q within program
q retain historical versions of software / documents
q provide an audit trail of all changes q external
Chapter 7 Design and implementation 509 Chapter 7 Design and implementation 510
19
3/20/2023
Chapter 7 Design and implementation 513 Chapter 7 Design and implementation 514
20
3/20/2023
editors 1. Identification
2. Version Control
compilers
3. Change Control
CASE tools 4. Configuration Auditing
5. Reporting
Chapter 7 Design and implementation 515 Chapter 7 Design and implementation 516
» Attributes and reference pointer to the object in the database which program(s)?
» Relationships to other configuration objects which user manual?
The configuration objects are either
etc.
» Basic objects or Aggregate objects (components)
21
3/20/2023
3. Change Control
4. Configuration Audit
‘For a large software engineering project uncontrolled change rapidly How to ensure change has been properly implemented:
leads to chaos.’ (Pressman)
1. Formal Technical Review
Process:
A Change Request initiates a change 2. Software Configuration Audit
The configuration object is ‘checked-out’ of the database
Conducted by the Software Quality Assurance group
The changes are applied to the object
The object is then ‘checked-in’ to the database where automatic version control is 5. Status Reporting
applied.
Focuses on communication of the changes to all people in
Note that in an organisation a formal change control process
involving many steps is instituted to control all changes an organisation involved with the changes.
22
3/20/2023
23
3/20/2023
Implementation issues
Configuration Management Summary Host-target development
q Most software is developed on one computer (the host),
q When a system needs a hardware or software
upgrade, a computer technician can accesses the but runs on a separate machine (the target).
configuration management program and database to q More generally, we can talk about a development
see what is currently installed. platform and an execution platform.
q The technician can then make a more informed q A platform is more than just hardware.
decision about the upgrade needed. q It includes the installed operating system plus other
q An a dv anta ge of a c onf i gur a ti on mana g eme n t supporting software such as a database management
application is that the entire collection of systems can system or, for development platforms, an interactive
be reviewed to make sure any changes made to one development environment.
system do not adversely affect any of the other q Development platforms usually have different installed
systems. software than execution platforms; these platforms may
Chapter 7 Design and implementation 529
have different architectures.
Chapter 7 Design and implementation 530
24
3/20/2023
q Testing tools, such as Junit that can automatically run programming language such as Java.
a set of tests on a new version of a program. q The language IDE may be developed specially, or may be
Chapter 7 Design and implementation 531 Chapter 7 Design and implementation 532
25
3/20/2023
used for the software’s development? allow software to be developed more cheaply, more quickly
and will create a community of users for the software.
Chapter 7 Design and implementation 537 Chapter 7 Design and implementation 538
26
3/20/2023
27
3/20/2023
Key points
q When developing software, you should always consider the
possibility of reusing existing software, either as components,
services or complete systems.
q Configuration management is the process of managing
changes to an evolving software system. It is essential when a
team of people are cooperating to develop software.
q Most software development is host-target development.
You use an IDE on a host machine to develop the software,
which is transferred to a target machine for execution.
q Open source development involves making the source code of
a system publicly available. This means that many people can
propose changes and improvements to the software.
q Quality software is usable.
Chapter 7 Design and implementation 545
28