0321313798_cover.qxd 26/4/06 17:48 Page 1
Software Engineering
SOMMERVILLE
Software
Engineering
8
The 8th edition of the best-selling
introduction to software engineering is
now updated with three new chapters on
state-of-the-art topics.
NEW CHAPTERS IN THE 8TH EDITION
• Security engineering, showing you how
you can design software to resist attacks
and recover from damage;
• Service-oriented software engineering,
explaining how reusable web services
can be used to develop new
applications;
• Aspect-oriented software development,
introducing new techniques based on
the separation of concerns.
Log on to aw-bc.com/computing
for a full list of Computing titles.
an imprint of
KEY FEATURES
• Includes the latest developments in software
engineering theory and practice, integrated
with relevant aspects of systems engineering.
• Extensive coverage of agile methods and
reuse.
• Integrated coverage of system safety,
security and reliability – illustrating best
practice in developing critical systems.
• Two running case studies (an information
system and a control system) illuminate
different stages of the software lifecycle.
ONLINE RESOURCES
Visit www.pearsoned.co.uk/sommerville to
access a full range of resources for students
and instructors.
In addition, a rich collection of resources
including links to other websites, teaching
material on related courses and additional
chapters is available at
http://www.software-engin.com.
IAN SOMMERVILLE is Professor of Software
Engineering at the University of St. Andrews
in Scotland
ISBN 0-321-31379-8
9 780321 313799
www.pearson-books.com
SOMMERVILLE
S
O
M
M
E
R
V
I
L
L
E
i
E
n
g
n
e
e
r
i
n
g
S
o
f
t
w
a
e
r
8
Software
Engineering
8
.
Software Engineering
Eighth Edition
This 8th edition has enhanced the 7th edition with
new material on security engineering, service-oriented
software engineering and aspect-oriented software
development. For educational purposes, it is completely
compatible with the 7th edition.
Visit the Software Engineering, eighth edition Companion
Website at www.pearsoned.co.uk/sommerville to find
valuable student learning material including:
• Lecture presentations (in PowerPoint and PDF) for all
chapters in the book
• Class quiz questions for each chapter
• Case studies
• Project suggestions
• Suggestions for further reading and links to web
resources for each chapter
SE8_A01.qxd 4/4/06 8:53 Page i
••
.
SE8_A01.qxd 4/4/06 8:53 Page ii
International Computer Science Series
Selected titles in the series
Operating Systems
J Bacon and T Harris
Programming Language Essentials
H E Bal and D Grune
Programming in Ada 95, 2nd ed
J G P Barnes
Java Gently, 3rd ed
J Bishop
Software Design, 2nd ed
D Budgen
Concurrent Programming
A Burns and G Davies
Introductory Logic and Sets for Computer Scientists
N Nissanke
Human-Computer Interaction
J Preece et al
Algorithms
F Rabhi and G Lapalme
Ada 95 From the Beginning, 3rd ed
J Skansholm
C++ From the Beginning, 2nd ed
J Skansholm
Java From the Beginning, 2nd ed
J Skansholm
Real-Time Systems and Programming Languages, 3rd ed
A Burns and A Wellings
Object-Oriented Programming in Eiffel, 2nd ed
P Thomas and R Weedon
Database Systems, 4th ed
T Connolly and C Begg
Distributed Systems, 4th ed
G Coulouris, J Dollimore and T Kindberg
Fortran 90 Programming, 2nd ed
T M R Ellis, I R Phillips and T M Lahey
Program Verification
N Francez
Introduction to Programming using SML
M Hansen and H Rischel
Functional C
P Hartel and H Muller
Algorithms and Data Structures, 2nd ed
J Kingston
Miranda
S Thompson
Haskell, 2nd ed
S Thompson
Discrete Mathematics for Computer Scientists, 2nd ed
J K Truss
Compiler Design
R Wilhem and D Maurer
Discover Delphi
S Williams and S Walmsley
Comparative Programming Languages, 3rd ed
R G Clark
••
.
SE8_A01.qxd 4/4/06 8:53 Page iii
Software Engineering
Eighth Edition
Ian Sommerville
••
.
SE8_A01.qxd 4/4/06 8:53 Page iv
Pearson Education Limited
Edinburgh Gate
Harlow
Essex CM20 2JE
England
and Associated Companies around the World.
Visit us on the World Wide Web at:
www.pearsoned.co.uk
First published 1982
Second Edition 1984
Third Edition 1989
Fourth Edition 1992
Fifth Edition 1995
Sixth Edition 2001
Seventh Edition 2004
Eighth Edition 2007
© Addison-Wesley Publishers Limited 1982, 1984
© Pearson Education Limited 1989, 1995, 2001, 2004, 2007
The right of Ian Sommerville to be identified as author of
this Work has been asserted by him in accordance with
the Copyright, Designs and Patents Act 1988.
All rights reserved. No part of this publication may be reproduced, stored
in a retrieval system, or transmitted in any form or by any means, electronic,
mechanical, photocopying, recording or otherwise, without either the prior
written permission of the publisher or a licence permitting restricted copying
in the United Kingdom issued by the Copyright Licensing Agency Ltd,
90 Tottenham Court Road, London W1T 4LP.
All trademarks used herein are the property of their respective owners. The use
of any trademark in this text does not vest in the author or publisher any trademark
ownership rights in such trademarks, nor does the use of such trademarks imply
any affiliation with or endorsement of this book by such owners.
ISBN 13: 978-0-321-31379-9
ISBN 10: 0-321-31379-8
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library
Library of Congress Cataloging-in-Publication Data
A catalog record for this book is available from the Library of Congress
10 9 8 7 6 5 4 3 2
10 09 08 07 06
Typeset by 35 in 10/12.5pt Times
Printed and bound in the United States of America
••
.
SE8_A01.qxd 4/4/06 8:53 Page v
Preface
The first edition of this textbook on software engineering was published more than
twenty years ago. That edition was written using a dumb terminal attached to an early
minicomputer (a PDP-11) that probably cost about $50,000. I wrote this edition on
a wireless laptop that cost less than $2,000 and is many times more powerful than
that PDP-11. Software then was mostly mainframe software, but personal computers
were just becoming available. None of us then realised how pervasive these would
become and how much they would change the world.
Changes in hardware over the past twenty or so years have been absolutely remark-
able, and it may appear that changes in software have been equally significant.
Certainly, our ability to build large and complex systems has improved dramatically.
Our national utilities and infrastructure—energy, communications and transport—
rely on very complex and, largely, very reliable computer systems. For building
business systems, there is an alphabet soup of technologies—J2EE, .NET, EJB, SAP,
BPEL4WS, SOAP, CBSE—that allow large web-based applications to be deployed
much more quickly than was possible in the past.
However, although much appears to have changed in the last two decades, when
we look beyond the specific technologies to the fundamental processes of soft-
ware engineering, much has stayed the same. We recognised twenty years ago that
the waterfall model of the software process had serious problems, yet a survey
published in December 2003 in IEEE Software showed that more than 40% of
companies are still using this approach. Testing is still the dominant program
validation technique, although other techniques such as inspections have been used
more effectively since the mid-1970s. CASE tools, although now based around the
UML, are still essentially diagram editors with some checking and code-generation
functionality.
••
.
SE8_A01.qxd 4/4/06 8:53 Page vi
vi
Preface
Our current software engineering methods and techniques have made us much
better at building large and complex systems than we were. However, there are still
too many projects that are late, are over budget and do not deliver the software
that meets the customer’s needs. While I was writing the 7th edition, a government
enquiry in the UK reported on the project to provide a national system to be used
in courts that try relatively minor offenders. The cost of this system was estimated
at £156 million and it was scheduled for delivery in 2001. In 2004, costs had
escalated to £390 million and it was still not fully operational. There is, therefore,
still a pressing need for software engineering education.
Over the past few years, the most significant developments in software engineer-
ing have been the emergence of the UML as a standard for object-oriented system
description and the development of agile methods such as extreme programming.
Agile methods are geared to rapid system development, explicitly involve the user
in the development team, and reduce paperwork and bureaucracy in the software
process. In spite of what some critics claim, I think these approaches embody good
software engineering practice. They have a well-defined process, pay attention to
system specification and user requirements, and have high quality standards.
However, this revision has not become a text on agile methods. Rather, I focus
on the basic software engineering processes—specification, design, development,
verification, and validation and management. You need to understand these processes
and associated techniques to decide whether agile methods are the most appropriate
development strategy for you and how to adapt and change methods to suit your
particular situation. A pervasive theme of the book is critical systems—systems whose
failure has severe consequences and where system dependability is critical. In
each part of the book, I discuss specific software engineering techniques that are
relevant to critical systems engineering.
Books inevitably reflect the opinions and prejudices of their authors. Some
readers will disagree with my opinions and with my choice of material. Such dis-
agreement is a healthy reflection of the diversity of the discipline and is essential
for its evolution. Nevertheless, I hope that all software engineers and software
engineering students can find something of interest here.
The structure of the book
The structure of the book is based around the fundamental software engineering
processes. It is organised into seven parts. The first six focus on software processes
and the final part discusses some important new software engineering technologies.
Part 1: Introduces software engineering, places it in a broader systems context
and presents the notions of software engineering processes and management.
••
••
.
SE8_A01.qxd 4/4/06 8:53 Page vii
Preface
vii
Part 2: Covers the processes, techniques and deliverables that are associated with
requirements engineering. It includes a discussion of software requirements,
system modelling, formal specification and techniques for specifying dependability.
Part 3: This part is devoted to software design and design processes. Three out of
the six chapters focus on the important topic of software architectures. Other topics
include object-oriented design, real-time systems design and user interface design.
Part 4: Describes a number of approaches to development, including agile methods,
software reuse, CBSE and critical systems development. Because change is now
such a large part of development, I have integrated material on software evolution
and maintenance into this part.
Part 5: Focuses on techniques for software verification and validation. It includes
chapters on static V & V, testing and critical systems validation.
Part 6: This part covers a range of management topics: managing people,
cost estimation, quality management, process improvement and configuration
management.
Part 7: The final part includes three chapters that are devoted to important
new technologies that are already starting to be used. The chapters cover security
engineering, service-oriented software engineering and aspect-oriented software
development.
In the introduction to each part, I discuss the structure and organisation in more
detail.
Changes from the 7th edition
This new edition of my textbook can be thought of as a mid-life upgrade than a
radical new revision of the book. I have designed it to be completely compatible
with the 7th edition but have included a new section on Emerging Technologies.
This discusses recent developments which I believe are significant for the future of
software engineering. This section includes three additional chapters:
30. Security engineering where I discuss issues of how to ensure that your soft-
ware is secure and can resist external attacks.
31. Service-oriented software engineering where I describe new approaches to
application development using reusable web services.
32. Aspect-oriented software development where I introduce a new technique of
software development based around the separation of concerns.
As the other chapters in the book are still current and relevant, I have not mod-
ified these, apart from very small changes to link to the new material in Chapters
30–32. More information on changes and the differences between the 6th and 7th
editions is available from the book website.
••
••
.