<<

ppc_234x172budgen3 9/18/07 12:24 PM Page 1

Software second second edition edition

Software is a multi-disciplinary Since the first edition, much progress activity that develops tools through effective has been made in the area of software

David Budgen of ideas and the use of design, with the major changes to the engineering practices. This text provides an new edition being: overview and perspective of software design within the context of software • A much stronger recognition of the development and also of more general role played by the concept of thinking about design issues. It examines architectural style in helping to the nature of design activities, as well as structure ideas about design. This is their applications within software used to provide an underpinning development, providing the reader with: framework throughout the second edition. • a non-proprietary view of design issues • The inclusion of new forms of • an overview of design representation software and of new approaches to forms design, ranging from agile methods • a concise review of design practices and through to the based on the more widely used component concept and the use of the Unified (UML). • a strong architectural framework • An improved formalism to support the analysis of the processes A particular feature is the strong embodied in design methods. evidence-based approach used in the analysis and assessment of these issues. SOFTWARE DESIGN

Software Design provides a balanced view of the many and varied software design David Budgen strategies most widely used by practitioners. By being aware of the strengths and limitations of each one, a student is better able to judge which to adopt when working in the field. The book is also valuable for software and project managers who need an objective guide to the state of the in this area.

David Budgen is Professor of at Keele University, UK. A long- term student of software design, he has worked closely with the Software Engineering Institute in Pittsburgh to develop tutorial modules, as well as publishing many papers on software design topics. Budgen SOFTWARE DESIGN SOFTWARE

second edition www.pearsoneduc.com SDA01 9/18/07 10:32 AM Page i

Software Design SDA01 9/18/07 10:32 AM Page ii

INTERNATIONAL COMPUTER SERIES

Consulting Editor A McGettrick University of Strathclyde

SELECTED TITLES IN THE SERIES

Operating Systems Bacon and Harris Essentials H Bal and D Grune Programming in Ada 95 (2nd edn) J G P Barnes Java Gently (3rd edn) J Bishop Concurrent Programming A Burns and G Davies Real-Time Systems and Programming Languages: Ada 95, Real-Time Java and Real- Time POSIX (3rd edn) A Burns and A Wellings Comparative Programming Languages (3rd edn) L B Wilson and G Clark, updated by R G Clark Systems (3rd edn) T M Connolly and Begg Distributed Systems: Concepts and Design (3rd edn) G Coulouris, J Dollimore and T Kindberg Principles of Object-Oriented (2nd edn) A Eliëns 90 Programming T M R Ellis, I R Philips 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 and Data Structures: Design, Correctness, Analysis (2nd edn) J Kingston Introductory Logic and Sets for Computer Scientists N Nissanke Human–Computer Interaction J Preece et al. Algorithms: A Functional Programming Approach F Rabhi and G Lapalme Ada 95 From the Beginning (3rd edn) J Skansholm Java From the Beginning J Skansholm Software Engineering (6th edn) I Sommerville Object-Oriented Programming in Eiffel (2nd edn) P Thomas and R Weedon Miranda: The of Functional Programming S Thompson Haskell: The Craft of Functional Programming (2nd edn) S Thompson for Computer Scientists (2nd edn) J Truss Design R Wilhelm and D Maurer Discover Delphi: Programming Principles Explained S Williams and S Walmsley Software Engineering with B J B Wordsworth SDA01 9/18/07 10:32 AM Page iii

Software Design

David Budgen SDA01 9/18/07 10:32 AM Page iv

Pearson Limited Edinburgh Gate Harlow Essex CM20 2JE England

and Associated Companies throughout the world

Visit us on the at: www.pearsoned.co.uk

First published 1993 Second edition 2003

© Addison-Wesley Publishers Limited 1993 © Pearson Education Limited 2003

The right of David Budgen to be identified as the author of this has been asserted by him in accordance with the , 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.

The programs in this book have been included for their instructional value. They have been tested with care but are not guaranteed for any particular purpose. The publisher does not offer any warranties or representations nor does it accept any liabilities with respect to the programs.

All trademarks used herein are the 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 0 201 72219 4

British Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library

Library of Congress Cataloging-in-Publication Data Budgen, D. (David) Software design / David Budgen.—2nd ed. p. cm. Includes bibliographical references and index. ISBN 0–201–72219–4 (alk. paper) 1. Computer software—Development. I. Title.

QA76.76.D47B83 2003 005.1′2—dc21 2003041859

10987654321 08 07 06 05 04 03

Typeset in 10/12pt Sabon by 35 Printed and bound in Great Britain by Biddles Ltd., Guildford and King’s Lynn

The publisher’s policy is to use paper manufactured from sustainable forests. SDA01 9/18/07 10:32 AM Page v

v

Contents

Preface to the Second Edition ix Preface to the First Edition xii Publisher’s Acknowledgements xvi

Part 1 The Role of Software Design 1

Chapter 1 The Nature of the Design Process 3 1.1 What is design? 4 1.2 The role of the design activity 14 1.3 Design as a problem-solving process 18 1.4 Design as a ‘wicked’ problem 19

Chapter 2 The Software Design Process 25 2.1 What is software? 26 2.2 Building models 27 2.3 Transferring 32 2.4 Constraints upon the design process and product 37 2.5 Recording design decisions 38 2.6 Designing with others 40

Chapter 3 Design in the Software Development Process 45 3.1 A context for design 46 3.2 Linear development processes 50 3.3 Incremental development processes 51 3.4 Economic factors 55 3.5 The longer term 57 ale for Method 175 8.38.4 Why methods don’t work miracles Problem domains and their influence9.19.2 The role of strategy in methods9.3 Describing the design process – the D-Matrix9.4 Design by top-down decomposition9.5 Design by composition Organizational influences upon design 185 187 200 194 205 209 207 6.5 A unified interpretation?7.17.2 A problem of selection7.3 Black box notations7.4 White box notations Developing a diagram8.18.2 What is a software design method? The support that design methods provide 122 128 180 129 176 158 168 5.15.2 abstract ideas Representing 5.3viewpoints for software Design of notation Forms 6.16.2 The need to share knowledge6.3 The concept6.4 Design methods Design patterns 94 90 106 98 109 118 120 4.14.2 quality concept The 4.3 quality design Assessing 4.4 of the design product attributes Quality process the design Assessing 75 65 64 82 Part 2 Knowledge Design Transferring 87 Chapter 9Chapter Strategies and Design Processes Design 193 Chapter 8Chapter The Ration Chapter 7Chapter Representations Some Design 127 Chapter 6Chapter Knowledge Design Transferring 105 Chapter 5Chapter Solution Design a Describing 89 Chapter 4 Chapter Qualities Design 63

vi Contents SDA01 9/18/07 10:32 AM Page vi 10:32 AM 9/18/07 SDA01 vii Contents Design 257 14.214.3 JSP representation forms14.4 The JSP process Some JSP heuristics15.115.2 The JSD model15.3 JSD representation forms15.4 The JSD process JSD heuristics 291 301 293 318 316 322 336 13.113.2 Origins, development and philosophy13.3 Representation forms for SSA/SD13.4 The SSA/SD process13.5 The role of heuristics in SSA/SD13.6 Extended forms of SSA/SD SSA/SD: an outline example14.1 Some background to JSP 258 259 273 275 263 275 290 11.111.2 role of stepwise refinement The historical 11.3 consequences Architectural and weaknesses of the stepwise strategy Strengths 12.112.2 Black box to white box in stages12.3 Prototyping 237 An example – DSDM 234 235 242 247 245 10.110.2 and design reuse Design by template 10.3 The design pattern10.4 patterns Designing with wider design context Patterns in the 214 227 225 216 Part 3 Practices Design 231 Chapter 15Chapter (JSD) Development System Jackson 315 Chapter 14Chapter (JSP) Programming Structured Jackson 289 Chapter 13Chapter and Systems Structured Chapter 12Chapter Design Incremental 241 Chapter 11Chapter Refinement Stepwise 233 Chapter 10Chapter Patterns Design 213 SDA01 9/18/07 10:32 AM Page vii 10:32 AM 9/18/07 SDA01 461 19.119.2 What is software now?19.3 Codifying design knowledge Improving knowledge transfer 444 447 442 17.117.2 concept The component 17.3 with components Designing 17.4 components Designing extremity – COTS At the 18.118.2 The case for rigour18.3 Model-based strategies Property-based strategies 408 402 414 415 425 432 420 16.116.2 The ‘object concept’16.3 paradigm for the object-oriented Design practices 16.4 frameworks Object-Oriented 16.5 Object-based design design Object-Oriented 356 367 342 379 371 Chapter 19Chapter Design? Whither Software 441 Chapter 18Chapter to DesignApproach A Formal 419 Chapter 17Chapter Design Component-Based 401 Chapter 16Chapter Objects with Designing 341 BibliographyIndex 451

Contents viii SDA01 9/18/07 10:32 AM Page viii 10:32 AM 9/18/07 SDA01 SDA01 9/18/07 10:32 AM Page ix

ix

Preface to the Second Edition

‘Science is built up of facts as a house is built of stones, but an accumulation of facts is no more a science than a heap of stones is a house.’ Jules Henri Poincaré (1854–1912)

At times, it is hard not to feel that our knowledge about designing software is rather too close to being a heap of stones. Indeed, a large element in the motivation for the first edition of this book was the desire to gather, classify, categorize, and interpret that knowledge, in the hope of providing a structure that would be of assistance to others. While the end result was certainly far from being a ‘house’, it did perhaps resemble a low wall or two! Indeed, the production of this second edition (which I hope builds the walls a little higher at least), was motivated by the way that the first edition of this book has been generally well received by both teachers and students (a situation which is gratifying to any author!). In terms of its wider role, one of the more external signs of the recogni- tion of its ‘foundational’ status is the extent to which it was cited in the Trial Version of the IEEE’s SWEBOK (Software Engineering Body of Knowledge). However, and march on, albeit not always at the same rate and, in preparing this second edition, the material from the first edition has been extensively revised and rewritten to reflect the many changes that have occurred since it was published. So what are the major changes? In brief, these are as follows.

n A much stronger recognition of the role played by the concept of architectural style in helping to structure our ideas about software design. This is used to provide an underpinning framework throughout this second edition. n The inclusion of new forms of ‘software’ and of new approaches to design, ranging from agile methods and design patterns through to the component concept and the use of the Unified Modeling Language. n An improved formalism to support the analysis of the processes embodied in design methods.

It would be nice if this list could also include the use of a suitably extensive body of empirical evidence about the effectiveness and limitations of the design approaches changed is what may be considered as the unique strength of this be considered as the unique strength changed is what may not However, I hope that the result is not a dry and dusty tome. Software design is a However, I hope that the result is not of source material, concerns the citation of One last point, returning to the issue What has Obviously there has also had to be a degree of restructuring and reorganization reorganization of restructuring and to be a degree there has also had Obviously ability to suspend too-evident disbelief at yet another claim of ‘nearly completed’. Acknowledgements So I should The production of this second edition has been a rather lengthy process. especially rightly begin by thanking my family and the staff of Pearson Education, degree of Keith Mansfield, for their patience and tolerance, as well as a collective websites, a vexed question for any author! During the development of this revised edi- websites, a vexed question for any author! some of which ‘disappeared’ during the process, tion, I consulted a range of websites, Also, of course, few websites contain while others ceased to be actively maintained. a peer process. So, where possible, I have material that has been reviewed through to be relatively stable and which can also be cited only those sites which I consider sense. regarded as authoritative in a technical topic that readily begets enthusiasm among practitioners and students, not least topic that readily begets enthusiasm forms of activity possible in any technical sphere. because it is one of the most creative opportunities to both the practitioner and the It is certainly one that offers exciting pages that follow. researcher, as should be evident in the cacy so often replacing systematic evaluation, this role seems a particularly important cacy so often replacing systematic evaluation, authors of the design chapter of the SWEBOK (I one, as was indeed recognized by the in which I had no part!). Returning for a should add here that this was a production aim for this book was at least to construct the moment to the opening quotation, my permit a more objective and systematic study of foundational walls that would in time not been fully met in all aspects, at least the software design. Even if that goal has heaps! stones have been sorted into appropriate material in a form readily accessible to the student, such as journals and textbooks, readily accessible to the student, such material in a form forms such as conference where possible to less widely available has been preferred proceedings. design in a scholarly and non- to describe the domain of software book, in that it seeks apt to be inundated with hype, and with advo- partisan manner. In an area that is so emphasis placed upon procedural methods by practitioners. The chapter on design procedural methods by practitioners. emphasis placed upon to include some new forms of been restructured and also extended representations has the book from a two-part overall grouping of chapters has changed notation. And the also been extensively updated, three parts. The bibliography has structure to one of material in order to pro- I have quoted from original source and, wherever possible, might be made. Again, source evidence for any assertions that vide the supporting described. Indeed, where any such evidence is available, I have sought to give it due to give have sought I is available, evidence any such where Indeed, described. remains one that is field of research this particular though, Unfortunately prominence. in such research. the difficulties implicit least because of cultivated, not only sparsely a future editionMaybe in . . . number of design the new. The order to accommodate material in of the existing the reduction in reflecting a more general slightly reduced, described has been methods

x Preface to the second edition SDA01 9/18/07 10:32 AM Page x AM Page 10:32 9/18/07 SDA01 xi Preface to the second edition David Budgen November 2002 , and eventually resulting in the first , and eventually resulting curriculum modules : especially Pearl Brereton, Keith Bennett and Paul Layzell. I should Paul Layzell. I Keith Bennett and Pearl Brereton, : especially And as before, of course, any errors of fact and any omissions are entirely my own! any errors of fact and any omissions And as before, of course, I should also express my thanks to those who patiently answered my queries about my thanks to those who patiently I should also express Thanks again to my many friends and colleagues for their support and encour- support for their and colleagues friends to my many again Thanks Shaw for discussion about pedagogical issues as well as checking my explanations of about pedagogical issues as well as Shaw for discussion 12 could not have been com- . Also, Chapter the concepts of software Consortium, and indeed from help that I received from the DSDM pleted without the the wider DSDM community. ment of one of the SEI’s first ment of one of the edition of this book. the help from I would like to acknowledge specific issues. In particular, to Manny Lehman for helping ideas about ‘shells of knowledge’; Jnr in explaining his E-type software; and to Mary references to his ideas about me to pin down elusive agement. In addition to those listed in the original preface, many of whom have con- whom have many of preface, original in the those listed to In addition agement. the of my colleagues in the support I should recognise provide help and ideas, tinued to Pennine Group Gibbs when Director by the late Norm contribution made here the also acknowledge to with my attempts me to persist Norm encouraged Education Program. of the SEI’s with my develop- design, starting about software and classify knowledge categorize SDA01 9/18/07 10:32 AM Page xi 10:32 AM 9/18/07 SDA01 SDA01 9/18/07 10:32 AM Page xii

xii

Preface to the First Edition

Why you might benefit from reading this book

Why should software need to be designed at all? Well, you would not expect any other engineered artifacts such as bridges, cars or television sets to be built without someone first designing them and producing plans for their . And you certainly would not expect to modify them significantly without having some detailed documentation available either. Software is no different: throwing a few dozen pro- grammers at a problem without having detailed plans is hardly likely to result in well-engineered software that actually works. So, where does the design process fit in? It occurs somewhere between the optimistic phase where we decide what we would like our system to do (often termed ‘Requirements Capture’) and the increasingly pessimistic phase where we build it (‘Implementation’), although it may appear in many different guises. Design is the highly creative stage in software development where someone (the ) plans how the system or program should meet the customer’s needs, be easy to implement, ‘efficient’ and easily extended to meet new needs. If it’s so creative a task, how will this book help? Mainly because any form of is likely to be more effective when there are ways of learning from the exper- iences of others (‘rules of form’, design methods) and when there are well-developed notations that can be used for communicating the designer’s ideas and plans to those whose task it is to implement them. These are just the sort of issues that this book addresses: how to develop our ideas about a design, the criteria we might use to assess our ideas and the ways in which we might convey these ideas to programmers. This is a book about software design. It pro- vides an analysis of a number of the currently-used approaches to the task of design, rather than being dedicated to describing just one representation or method. OK, so who will benefit from reading it? Well, every author would like their work to be a best-seller that appears on every airport and railway station bookstall – but this one is perhaps a bit too specialist for that! It contains information and ideas that are relevant to anyone who is in the business of developing software (except, of course, those whom Tom De Marco has described as the ‘Mugwump School, people who believe that design is for sissies’). However, it does assume a acquaintance with imperative programming languages (although it is certainly not language-specific) Preface to the first edition xiii xiii . Page

AM So the 1970s also saw the development of design representation forms, and the So the 1970s also saw the development of design representation forms, Abstraction has played a central role in the development of better programming Abstraction has played a central role During the 1970s a number of advances in software technology were designed to a number of advances in software technology During the 1970s 10:32 10:32

abstraction tion forms at the same time. While the benefits arising from these improved techniques tion forms at the same time. While the of programming activities, there was also grow- were at first identified mainly in terms better practices for programming-in-the-large, ing realization of the need to develop development of ‘systems’ as a whole. which is concerned with the design and techniques, allowing the designer of a program to reason about its structure and techniques, allowing the designer of the detailed issues of determining implementa- behaviour without needing to address (Throughout this book the term design method has been used in preference to the (Throughout this book the term design method has been used in preference According much-abused design methodology when describing specific design techniques. much more isolated from their actual creation, compounded by the likeli- designers much more isolated from their actual creation, compounded means that hood that the task of implementation will be allocated to others. This manner. designers also need to communicate their ideas to others in an unambiguous designers, emergence of design methods intended to capture the experiences of other their task. and so to help designers describe their ideas and to control and structure Programming-in-the-large significant problems, the design of large systems While the design of programs offers complexity. The increased levels of abstraction provides a vastly increased degree of it more difficult for the designer to visual- required for designing a large system eventual system. The greatly increased time inter- ize and ‘model’ the behaviour of the of an idea and its actual realization leaves val that can occur between the origination ages, more efficient , practices and symbolic debug- ages, more efficient compilers, structured programmers with developing, controlling and ging facilities. All of these have assisted mainly through increased use of the concept visualizing their ideas about a program, of correctness of its dynamic behaviour still needs to be confirmed. Indeed, it is this need behaviour still needs to be confirmed. correctness of its dynamic continually in mind when form and eventual dynamic behaviour to keep both static challenge that programming that forms a significant part of the developing a solution provides. programs: higher- programming langu- improve the task of developing computer Writing a computer program is a challenging and creative experience, motivated by the program is a challenging and creative Writing a computer computer program is not The task of developing even a desire to solve problems. keep their attention focused are continually required to an easy one. Programmers Even when the static aspects of both problems and solutions. upon many different ‘compiles’ successfully), the is complete (that is, the program structure of a program and with concepts such as abstract data types. It is suitable as a text for advanced as a is suitable types. It data as abstract such with concepts and engineering. or software design in software courses or postgraduate undergraduate should benefit from project managers programmers and Systems analysts/designers, methods. spectrum of design of a broad the comparison important is design Why software 9/18/07 9/18/07

SDA01 SDA01 is the methodology design, or even necessarily about is ‘a procedure for doing things’, while things’, for doing procedure is ‘a does not teach a student method methods design. The would-be designer needs to study widely and to gain a thorough design. The would-be designer needs do The analogy should not be pushed too far (few symphonies have been produced The analogy should not be pushed too A field which provides a good (and partly comforting) analogy is that of the A field which provides a good (and As software plays a central role in the operation of many systems, as varied as a central role in the operation of many As software plays based systems (whether we that the study of software It is increasingly accepted the teaching of design knowledge and suggested ways in which these might be intro- the teaching of design knowledge and suggested ways in which these might duced to the student, supported by a bibliographical survey. I was fortunate enough to spend some time at Carnegie-Mellon’s Software Engineering I was fortunate enough to spend some time at Carnegie-Mellon’s Software design was Institute (SEI) during 1986, during which an initial curriculum in software revised in developed for the Graduate Curriculum Project. This was then extensively work was 1988, taking on board subsequent thinking and experience. The aim of this issues in to develop a ‘road-’ for use by instructors which identified the principal teaching design how to influence the design process before taking on the understanding of the many issues that not this involes the use of specific design methods. role of a system designer, whether or about book came How this ficient in reading and interpreting musical scores, before ever attempting to master the ficient in reading and interpreting musical software design the novice needs to learn to pro- rules of composition. In the case of the manipulation of various forms of abstrac- gram effectively, and to be familiar with of any size or complexity. tion, before proceeding to design a system project managers), but we do need to realize that by ‘composition teams’, organized by develop a significant item of software from the abstract design to its final implementa- develop a significant item of software students to gain real feedback from carrying their tion usually makes it impractical for designs through to fruition. is another highly creative task and, like software study of music. Musical composition complex static notation to describe the eventual designers, composers need to use a music. The student of music must become pro- dynamic performance of a piece of even information technology) needs to involve some basic knowledge about the roles needs to involve some basic even information technology) students of design are software development process. However, of design within the the high level of abstrac- of the same problems as the designer: confronted with many ‘distance’ from the eventual descriptive forms, and the resulting tion required in the necessary degree of ‘feeling’ it difficult to provide them with the solution, can make As a further complication, the time required to for all the issues that are involved. banking transactions, spreadsheet calculations, or aircraft control systems (‘fly by spreadsheet calculations, or aircraft banking transactions, should be designed as well increasingly important that such systems wire’), it becomes even be life-threatening. design can lead to disaster and can as possible. Faulty , or , information call it software engineering, to the dictionary, dictionary, to the involves as it is methodological, in this book be doing we will What of method’. ‘study design methods have and many process has continued, of methods!) This the study far beyond their gradually evolved en route, and have been re-designed themselves the describing and new viewpoints about design quality New ideas original forms. into both in turn been incorporated emerged, and have of software have existing design methods. new and

xiv Preface to the first edition SDA01 9/18/07 10:32 AM Page xiv 10:32 AM 9/18/07 SDA01 xv Preface to the first edition design, do David Budgen November 1993 software . There are relatively There design. systems software about . While these books cater for a very important set of skill a very important books cater for . While these is Last (but certainly not least) grateful thanks to my family, who have put up with Last (but certainly not least) grateful thanks to my family, who have put I should also like to acknowledge the contribution of my various student classes, I should also like to acknowledge the One of the aims of this book is therefore to redress the balance by providing a book this book is therefore to redress the balance One of the aims of In compiling the curriculum, one of the major problems that emerged was the lack was the emerged that problems of the major one curriculum, the In compiling unfortunate lot to provide some of the testing ground for the frameworks that have unfortunate lot to provide some of the testing ground for the frameworks been used in this book, and their feedback has been invaluable for this. for his ‘not another book’ for so long; and to Simon Plumtree of Addison-Wesley encouragement, and amazing patience in waiting for the final manuscript! present colleagues at the University of Keele, including Mike Brough and my other present colleagues at the University Andrew Reeves and Grant Friel, who have research collaborators, Mustafa Marashi, ideas. All of them have had to labour long and put in so much work on some of my to further my education on the subject of soft- hard to correct my misconceptions and are all my own. ware design. The mistakes that remain Keele, as well as in . It has been their in the Universities of Stirling and of and sustained my efforts on this book from its original inception to the final product. and sustained my efforts on this book at the SEI, especially Jim Tomayko, Mary These include: my friends and mentors of the Education Program; my friends and Shaw, Carol Sledge and the other members Ken Jackson, Hugo Simpson, Ray Foulkes collaborators in industry, Mike Looney, at the University of Stirling, with special and Alastair O’Brien; my former colleagues Naftalin for the many exchanges of ideas; and my thanks to Chic Rattray and Maurice Design in any sphere can be a pleasurable and creative act for those involved in it, Design in any sphere can be a pleasurable sand-castles on the beach, engineering a complex whether it involves building simple or writing a fugue. Writing books is a creative structure such as the Thames Barrier, (at times), especially so once the task is com- act, and can also give the writer pleasure also depends upon the help, advice and encour- pleted! Like so many creative tasks it like to thank the many people who have helped agement of many others, and I would those books that teach specific design methods in detail, but rather to provide a broad specific design methods in detail, those books that teach precede any detailed study of of understanding that might usefully intermediate level to be used in a project. or the selection of a design method one or more methods, Acknowledgements some degree of proselytizing! design, and survey the roles to the issues of software systems that can act as a ‘road-map’ about design (with particular play in this. This book is therefore that design methods although in the process and its needs), rather than about method, attention to software other. It is not meant to replace we necessarily have to discuss the of describing the one, of textbooks suitable for teaching teaching for suitable of textbooks in terms of software), general (not just subject of design in that address the few books one the use of are centred on describing software design all textbooks about and nearly how to being books about be considered as method. These can particular what design rather than all authors to avoid difficult for almost does make it one approach needs, teaching SDA01 9/18/07 10:32 AM Page xv AM Page 10:32 9/18/07 SDA01 SDA01 9/18/07 10:32 AM Page xvi

xvi

Publisher’s Acknowledgements

We are grateful to the following for permission to reproduce copyright material:

Figure 2.6 from A field study of the software design process for large systems, Comm. ACM, 31(11), (Curtis et al., 1988); Figures 3.2 and 3.4 from A of soft- ware development and enhancement, IEEE Computer, 21(5), (Boehm, B.W. 1988), Figure 3.3 from Open source software development: an overview, IEEE Computer, 34(6), (Wu, M.-W. and Lin, Y.-D. 2001), Figure 9.4 from A generic model for repre- senting design methods. In Proceedings of the 11th International Conference on Software Engineering, (Potts, C. 1989) and Figure 17.5 from What do you mean by COTS? Finally a useful answer, IEEE Software, 17(2) (Carney, D. and Long, F. 2000) all with permission from the IEEE. SDC01 9/18/07 10:34 AM Page 1

part 1 The Role of Software Design

Chapter 1 The Nature of the Design Process 3

Chapter 2 The Software Design Process 25

Chapter 3 Design in the Software Development Process 45

Chapter 4 Design Qualities 63 SDC01 9/18/07 10:34 AM Page 2 SDC01 9/18/07 10:34 AM Page 3

chapter 1 3 The Nature of the Design Process

1.1 What is design? 1.3 Design as a problem-solving 1.2 The role of the design activity process 1.4 Design as a ‘wicked’ problem

This opening chapter is concerned with examining the role that design plays in a wide range of spheres. It looks at the ideas of design theorists and examines these in the light of some simple examples of design activity. In particular, it contrasts the use of design as a problem-solving technique with that of scientific method, and shows how these differ in a number of highly significant ways. . Tools are tools . Translating a ‘design’ activity, whether or not this is activity, whether or discipline also occurs when the design communication engineering to an craft ideas is a major element in the development of design expertise, and an import- ideas is a major element in the development Obviously design is not the only factor that matters in the production of artifacts. Obviously design is not the only factor that matters in the production of Our perception of the importance of the roles that design may play in producing Our perception of the importance of All of these are core concepts that underpin the ideas presented in this book, and All of these are core concepts that underpin Communication also plays another, rather different, role in design activities. This plays another, rather different, role Communication also A second distinguishing characteristic of human beings that provides an under- characteristic of human beings A second distinguishing design from faulty fabrication if shoes leak in the rain, or if the door falls off a car design from faulty fabrication if shoes leak in the rain, or if the door falls fabrication, when it is opened. However, while good design may be marred by poor usually no amount of constructional skill can disguise poor design. range of less safety-critical objects – such as a domestic refrigerator: we do not want to range of less safety-critical objects – such as a domestic refrigerator: we do the door. have to de-ice it continually, nor to replace bottles that fall out when we open not find our- Similarly, we also want to have well-designed footwear so that we do selves suffering from foot complaints. faulty The fabrication process matters too, and a customer is unlikely to distinguish works reliably) or a poor one (the flat roof of a house leaks, or the chair col- machine works reliably) or a poor one legs). lapses when the leans back on two it may not always be correct. No-one is these different artifacts will vary, although well-proven design practices for the design of likely to deny the importance of using not least because of the safety issues con- motorway bridges, aeroplanes and buildings, Yet equally, good design is important for a wide cerned with the use of such objects. process extensively influence our lives. We ride in cars, trains, aeroplanes; we live in process extensively influence our lives. appliances such as washing-, tele- houses or flats; we use everyday domestic on chairs, lie on beds, walk around in shoes; we vision sets, vacuum cleaners; we sit are artifacts because they have been devised play games, listen to music. All of these of them in some way are the products of some and created by human beings, and all a good one (shoes are comfortable, a washing- form of design process – whether to ‘novice’, as well as shared amongst a community of experts. Indeed, the ability to to ‘novice’, as well as shared amongst reuse ant part of the transition from a the process of fabrication. scope of reuse is extended to include at the first of them rather more closely. Indeed, so it is appropriate to begin by looking of many different applications of the design various artifacts that are the outcome development team, whether it be for the purpose of building a megalithic barrow, or whether it be for the purpose of building development team, of design therefore requires due banking system. Any discussion for creating an on-line their ideas and convey them to means by which designers record consideration of the result. responsible for fabricating the final those who will be and expertise are transferred from ‘expert’ is to act as the by which experience tool in question is a stone axe or a compiler – and producing any form of artifact is an a stone axe or a compiler – and producing tool in question is incorporates some element of act that implicitly at the time. explicitly appreciated of design activity is that of pinning for any form the designer’s ideas to the always involves communicating into a ‘product’ almost 1.1 design? is What how we can make with exploring this book is concerned subject matter of While the a of barely half which has a history of a technology effective application the most distinctive of human in one of the most are rooted the ideas that it presents century – of, of, and the use is the making This characteristic characteristics. the artifacts, whether to create further are then in turn used artifacts, which themselves

4 The nature of the design process SDC01 9/18/07 10:34 AM Page 4 AM Page 10:34 9/18/07 SDC01 5 What is design? (Jones, 1970). , with observation are , 1989). Yet all too rarely et al. Design Methods: Seeds of Human Futures Design Methods: Seeds of Human Futures has been concerned with studying things as they science So what is design exactly, what sort of activities does it involve, and what can we So what is design exactly, what sort Although this book is focused largely on the application of design ideas and Although this book is focused largely Despite extensive exposure to the products of the design process in general (with exposure to the products of the design Despite extensive Design is just as important with software systems also. Most people will readily people also. Most systems software with as important is just Design assumed effect upon the world to the beginning of a chain of events that will bring assumed effect upon the world to the beginning of a chain of events that the effect about.’ ‘The fundamental problem is that designers are obliged to use current information ‘The fundamental problem is that designers come about unless their predictions are cor- to predict a future state that will not has to be assumed before the means of achiev- rect. The final outcome of designing have to work backwards in time from an ing it can be explored: the designers between mankind and the surrounding ‘world’ has historically taken two paths. The between mankind and the surrounding ‘world’ has historically taken two path of approach and experimentation as its key activities. In its ‘classical’ form, the scientific This concise description of the design process is more than sufficient to show that its This concise description of the design process is more than sufficient to which form is very different from that of the scientific approach to problem-solving interaction will perhaps be more familiar to many readers. As shown in Figure 1.1, the sider the words of one of the pioneering design methodologists, J. Christopher Jones, sider the words of one of the pioneering taken from his classic work, methods to the production of software, the task of design involves the use of many methods to the production of software, more widely. To help reinforce this point, the ideas and concepts that can be applied chapters will be drawn from a wide range of examples used in these introductory software development. fields, and not just from the field of process? Perhaps a good starting point is to con- observe about the products of that do we have a clear idea of the nature and purpose of the design process, and our ideas do we have a clear idea of the nature in with notions derived from the more specific about design are all too often muddled first chapter aims to explore some ideas about the practices of design methods. So this to provide a basic framework for an under- design process and its nature, in order be used to explore the ideas and concepts intro- standing of design issues that can then duced in the subsequent chapters. an associated awareness that good design practices cannot always ensure success in that good design practices cannot an associated awareness is carried out is often rather people’s awareness of how design terms of design quality), science and software engin- In the domain of computing unstructured and piecemeal. technique, to be ranked along- is a major problem-solving eering, designing software (Denning side the concepts of theory and of abstraction graph occurring at apparently random points in a . It may not be appropri- apparently random points in a document. graph occurring at designing a word processor as to employ the same techniques for ate or cost-effective for a well-designed product avionics systems, but the need for designing safety-critical of major road-bridges and the parallel might apply to the design is still there. The same complexities are very dif- the dentist’s waiting room: the structural design of seating in enough to meet our needs. them are expected to function well ferent, but both of accept that the software used in an aeroplane needs to be well designed and rigorously designed to be well needs an aeroplane used in software that the accept one on that aircraft as passengers might find themselves least because they tested, not still since the user smaller systems too, desirable for good design is equally day. Yet suffers from a simi- reliability (which only be defined) and (if it can requires efficiency not processor may manner). A word to define in a precise of being difficult lar problem occasional lost para- to appreciate the its user is unlikely item, but be a safety-critical SDC01 9/18/07 10:34 AM Page 5 AM Page 10:34 9/18/07 SDC01 Evaluation Construction Path of engineering Making of ‘new’ things (pyramids, ships, cars, telephones, etc.) (pyramids, ships, cars, has been much more concerned with creating has been much more concerned with Better tools measurement, etc. Human endeavours/ interaction with the world interaction engineering Better understanding of materials, Better understanding of Observation Measurement Path of science Experimentation The complementary nature of scientific and engineering activities. The complementary nature of scientific and Study of things as they are Study of things as they things, with the key activities involved being those of construction and evaluation. things, with the key activities involved (astronomy, biology, chemistry, etc.) chemistry, biology, (astronomy, The descriptions of both of these processes provided in Figures 1.2 and 1.3 are of The descriptions of both of these processes provided in Figures 1.2 and 1.3 The terms ‘black box’ and ‘white box’ used in Figure 1.3 merit a brief description Of course, these two paths are not isolated from one another. Indeed, the interplay Of course, these two paths are not isolated here, and will be discussed more fully in Chapter 5. Briefly, a ‘black box’ model is here, and will be discussed more fully in Chapter 5. Briefly, a ‘black box’ as a whole, one that describes the external functionality and behaviour of a system box’ model is without any reference to how this is to be achieved. In contrast, a ‘white eering processes. of the gen- course relatively simplified. A rather more detailed and ‘formal’ description eral design process is provided by the FBS framework (Function–Behaviour–Structure) described in Gero (1990). between them has always provided an important element for both. The products of between them has always provided tools for advancing scientific knowledge (from ‘engineering’ have formed important and measurements of science have pro- clocks to cyclotrons), while the observations materials that engineers need in order to use vided the understanding of their basic While the practices of both involve building them in new ways and to most effect. used for very different purposes, as is shown in ‘models’ of a problem, these are then and contrast the forms of the scientific and engin- Figures 1.2 and 1.3, which summarize we can generally refer to as new directed much more towards achieving a goal (or As Jones observes, these activities are hence they begin by assuming an end result ‘effect’) than conducting an investigation; this about. and then go on to seek ways of bringing Figure 1.1 of observing the characteristics of some phe- to problem-solving typically consists these, building a theory to explain them (and nomenon, making measurements of and then seeking to verify these pre- preferably to predict additional characteristics), and measurements. In contrast, the path of what dictions through further observation

6 The nature of the design process SDC01 9/18/07 10:34 AM Page 6 AM Page 10:34 9/18/07 SDC01 7 What is design? observations More systematic observations Experimental New predictions Predictions from theory observations Experimental Initial observations The nature of scientific analysis. So if we examine the quotation from Jones a little more closely, and rephrase it a So if we examine the quotation from Jones a little more closely, and rephrase Since software can be considered a prime example of an artifact, we can see why Since software can be considered a prime of design differs somewhat from the case of scientific investigation, since for the latter of design differs somewhat from the case of scientific investigation, since This set it is unusual for there to be more than one equivalent solution to a problem.) of actions can be summarized as: more complex, not least because design and implementation may be less distinctly sep- more complex, not least because design and implementation may be less distinctly arated, but it does not alter its essential nature. a designer in little, we can identify the set of actions that need to be performed by be more than deriving and specifying a solution to a problem. (There may, of course, the process one possible solution; indeed, this is generally so, and this is again where parent’ would in many ways be better ones, but ‘black box’ and ‘white box’ are the parent’ would in many ways be better ones most widely employed.) of design are so important in its production. an understanding of the techniques disciplines in general, in that they are Indeed, this is true of the craft and engineering of artifacts, whether these be bridges, buildings, usually concerned with the production of software may make this design process statues, cars or probes. The nature Figure 1.2 are described. (The terms ‘opaque’ and ‘trans- one in which the workings of the system SDC01 9/18/07 10:34 AM Page 7 AM Page 10:34 9/18/07 SDC01 4 2 Design plan of ) (including use Functional Validate solution Validate specification problem box’ model of Analyse needs and build ‘black specification Requirements 5 form of List of mismatches software Functional Implementation using a suitable specification of the design plan 1 Clarify nature of White box model requirements 3 design solution ‘white box’ Postulate a External A model of the design process. requirements postulate a solution; build a model of the solution; evaluate the model against the original requirement; elaborate the model to produce a detailed specification of the solution. We will be using this very general ‘process model’ again at various points, and will make We will be using this very general ‘process model’ again at various points, and for software use of it to build up our own models of the various design processes used n n n n Figure 1.3

8 The nature of the design process SDC01 9/18/07 10:34 AM Page 8 AM Page 10:34 9/18/07 SDC01 9 What is design? Moving house Moving . a small single- Figure 1.4 shows an example of such an outline plan for Outline plan of a single-storey house. One practice widely recommended to the new owner is to begin by measuring the One practice widely recommended to At this point it may be useful to look at an example of a design process, and to be useful to look at an example At this point it may culties or suggests better objectives, the pattern of the original problem may change better objectives, the pattern of the original culties or suggests one.’ the designers are thrown back to square so drastically that ‘If, as is likely, the act of out the intermediate steps exposes unforeseen diffi- steps exposes out the intermediate the act of tracing ‘If, as is likely, CASE STUDY 1 Figure 1.4 next step is to measure the dimensions of various items of furniture and to cut out next step is to measure the dimensions on the chosen scale. Together these form a repres- cardboard shapes to represent these contents that can be considered as forming the entation of the new house and its future initial model storey house. Moving to a new house is widely regarded as one of the major traumas in our lives. Moving to a new house is widely regarded lies a very good of what designing However, hidden within this operation we briefly examine some of the actions that can involve, and so for our case study into a new house. might be involved when planning a move house, to obtain some squared paper and to use dimensions of the various rooms in the all the rooms, doors, windows and so on. The this for up a scale plan showing use this to demonstrate how the practices of design may differ from those of scientific how the practices of design may use this to demonstrate analysis. In other words, the act of elaborating the original model might reveal its inadequacies or act of elaborating the original model In other words, the of design essentially unstable. so making the whole process even its total unsuitability, development. However, it should also be recognized that while there is an order to these an order there is that while also be recognized it should However, development. neces- It is usually precise sequence. a single, in performed by no means they are actions, as the design process, different stages of between the many iterations sary to perform of design choices. for the revision that may be needed backtracking well as extensive be even worse, since: the position may has recognized, Jones (1970) himself Indeed, as SDC01 9/18/07 10:34 AM Page 9 AM Page 10:34 9/18/07 SDC01 outlet that can be adopted: for example, strategies that apply to the various possible solutions will be more that apply to the various possible solutions constraints Expanded plan of a single-storey house. Expanded plan of a single-storey for use by the removal team on the removal day. Indeed, not only will it deter- for use by the removal team on the removal day. Indeed, not only will The decisions that result from this process can then be regarded as providing a The decisions that result from this process can then be regarded as providing Some of the as described above is somewhat incom- The representation provided by the model The design process itself then involves trying to identify the ‘best’ positions for the The design process itself then involves plan removal van mine just where in the house the various items are to be placed when the since arrives, but it may also affect the way that the removal process is to be organized, to make the the removers might choose to pack their van in a particular way in order unloading process easier. plete, since it is only two-dimensional. On occasion it will be necessary to consider the plete, since it is only two-dimensional. blocking windows with tall furniture, or to vertical dimension too, in order to avoid accessible through the legs of an item of furni- ensure that a power outlet will still be some trade-offs between what is desirable and ture. Again, it may be necessary to make how the model used in Figure 1.4 can be what is practicable. Figure 1.5 shows extended to describe these factors. significant than others. Most people would not wish to place kitchen equipment in the significant than others. Most people be prepared to position surplus fireside chairs in living-room, for example, but might constrain the choice could be colour matches, a bedroom. Other factors that might to obstruct power outlets – a point that leads style and so on. Equally, it is undesirable on to our next issue. be used to do this, since it is usually necessary to trade off different factors in making be used to do this, since it is usually the choices. However, there are various priority, and then seek to find ways of pro- determine which rooms will take greatest for those rooms. This strategy may lead to ducing a well-matched set of furniture rooms than would occur if the owner tried for an greater mismatches in the remaining overall best match. Figure 1.5 house. There is really no analytical form that can pieces of card on the plan of the new

10 The nature of the design process SDC01 9/18/07 10:34 AM Page 10 AM Page 10:34 9/18/07 SDC01 11 What is design? . reuse The garden shed The garden Apart from the cost of the timber, the main cost to consider in developing a new Apart from the cost of the timber, the The manager of the shed production unit therefore needs to produce a set of The manager of the shed production Before going any further, it may be useful to take a brief look at another example it may be useful to take a brief Before going any further, However, in some senses the problem that is presented in this case study provides senses the problem that is presented However, in some A shed should be assembled from a set of prefabricated panels for the sides and A shed should be assembled from a set of prefabricated panels for the roof. be of Assuming that the boarding on the sides runs horizontally, each panel should a height that allows it to be constructed from a whole number of boards. CASE STUDY 2 therefore led to the following set of design constraints. n n direct, but this time there are some constraints upon the form of the end result that are direct, but this time there are some constraints problem. These do not constrain the form rather different from those of the previous influence it indirectly in terms of their effect of the design process directly, but they upon the design product. Since sawing timber is very time-consuming, shed is the cost of fabricating the parts. to a minimum. Consideration of this factor has the amount of sawing needs to be kept producing various standard sizes of timber. As a sideline, they are developing a new producing various standard sizes of to construct a small range of garden sheds. production unit that will use the timber by using a set of prefabricated panels, so These sheds will all need to be constructed home with relative ease. that they can be assembled at the customer’s Much of the process for doing this is relatively designs for a number of different sheds. ware development, but this problem possesses a set of constraints that some readers ware development, but this problem In particular, it introduces the concept of will probably be more familiar with. concerned with operating sawmills and with The Lotsalogs timber company is chiefly Similarly, the ‘designer’ is able to manipulate well-defined ‘objects’, in that each item is able to manipulate well-defined Similarly, the ‘designer’ is, its dimensions) are fixed, exists and its relevant properties (that of furniture already for software objects will gener- The equivalent properties and can easily be measured. quantifiable or even identifiable. ally not be so easily from a more traditional field than that of soft- of a design problem. Again, it is taken a much simpler environment than is often available to the software designer. The form than is often available to the a much simpler environment related to that of the final used to describe the problem is directly of the initial model of the building. So the solution, in that both are scale plan used to describe used to describe the prob- ‘transform’ between the representation there is no need to the case for software design. to describe the solution, as is generally lem and that used From this relatively simple case study, we should be able to see some of the ways in of the to see some be able should study, we case simple this relatively From being than Rather method. that of scientific from differs of design the process which and the variables allows us to separate system that a ‘right’ coordinate able to identify model, and then make complex have to build a relatively each separately, we solve for many possible ‘solu- There may be to produce a solution. to this in order adjustments in be used to help us criteria that can no very strong we may well have tions’, and the better ones. from a number of choosing SDC01 9/18/07 10:34 AM Page 11 AM Page 10:34 9/18/07 SDC01 Assembling sheds from standard units. Figure 1.6

12 The nature of the design process SDC01 9/18/07 10:34 AM Page 12 AM Page 10:34 9/18/07 SDC01 13 What is design? quality and the way that it can be used in such a system. Modularity is an and the way that it can be used in The next section seeks to establish a clearer picture of the designer’s goals, and to The next section seeks to establish a clearer picture of the designer’s goals, In one case the end product is an organizational plan for the removal men, in the In one case the end product is an organizational For both of the case studies introduced here, we can see how the concepts of design For both of the case studies introduced Given the original requirements that were identified by the company, and the con- requirements that were identified by Given the original As we observed for the previous case study on moving house, there is no evident the previous case study on moving As we observed for Where possible, the panels used in one shed should be of a size that allows them to allows them size that be of a should in one shed used the panels possible, Where used also be shed could a small panel for the side example, for in another: be used model. panel for a larger as the back the height of each and again be of standard dimensions, and doors should Windows the time needed in order to reduce number of boards, to a whole should correspond out special shapes. for cutting modularity clarify how these can be described for software systems. sheds. For both cases there are constraints operating upon the process, although these sheds. For both cases there are constraints operating upon the process, although of have very different forms, and in both cases the designer has some concept and colour to help with making choices. In the one case this may be the balance of style shed that has for the furniture in a room, in the other it will be a matter of producing a concept, the ‘right’ proportions and which is easily fabricated. Quality is an elusive although an important one, and it is one that we will be returning to later. although the nature of the two problems is very different. In both cases the designer although the nature of the two problems or she wants to achieve – an organized house or proceeds to build a model of what he the model until satisfied that it can meet the a balanced range of products; modifies it in order to specify clearly what needs to particular constraints; and then elaborates be done to turn the model into reality. that will be used by the joiners who produce the other it is a set of plans and drawings important tool in construction, and it is as important for constructing software as important tool in construction, and blocks and the like. However, it is not always for constructing garden sheds, tower form it should take when we are designing quite so easy to see the most effective software. to the processes involved in producing a solution, as described by Jones can be related the panels can be assembled to create different sheds, as shown in Figure 1.6. the panels can be assembled to create further to provide more insight into the Obviously this problem could be explored can begin to see the importance of the basic idea design process, but for the moment we of automatically meet all of the criteria, as well as being visually pleasing and practical to all of the criteria, as well as being visually automatically meet be more direct than for of the problem, the process will certainly use. Given the nature and iteration of ideas. but it will still involve some feedback the previous case study, for reuse of components, the the nature of the material and the need straints created by drawings showing the dimensions of each panel, outcome of the process will be a set of from the basic units of timber, and the ways that the way that it should be assembled These effectively form constraints upon the design process too, and the designer will constraints upon the design process These effectively form size and shape of the range of a number of practical issues about also need to consider products. for garden sheds that will be used to produce a set of designs prescription that can n n SDC01 9/18/07 10:34 AM Page 13 AM Page 10:34 9/18/07 SDC01 this is to be organized. this is to how in its broadest sense as the most probable in its broadest sense . One consequence of the industrial revolution reuse architecture of sailing ships, it certainly simplified their fitting out and reduced its cost (Rolt, 1970). design The designers of pyramids and cathedrals will almost certainly have exchanged The designers of pyramids and cathedrals The recognition of design as a distinct and identifiable task then introduces the design as a distinct and identifiable The recognition of Just when this concept of the design task having a distinct role in the production a distinct role design task having this concept of the Just when extends a designer’s repertoire – on the one hand offering speedier development of extends a designer’s repertoire – on the one hand offering speedier development intro- an idea (‘improved time-to-market’) with potentially lower costs, but also ducing new constraints and trade-offs into the design process. knowledge in helping to create new structures. A good example is that of bridge knowledge in helping to create new engineers such as I K Brunel were able to building in the nineteenth century, when different from their predecessors, while also create structures that were radically proving to be remarkably durable. The existence of such components was the idea of ‘standardizing’ components.* erties of materials became better understood, and the means of predicting their erties of materials became better understood, dependable, so the designer could employ this behaviour became more refined and production of the blocks that formed a major element in the rigging of a sailing vessel. While this might not have production of the blocks that formed a major element in the rigging of a sailing vessel. While this influenced the installed in the Portsmouth dockyard in the early 1800s. The intention here was to improve and standardize the installed in the Portsmouth dockyard in the early 1800s. The intention here was to improve and * block-making machinery, One of the very earliest examples of standardization of components was Sir Marc Brunel’s 2. The second was the concept of there significant new inputs to the designer’s learning processes. Two of these are there significant new inputs to the of their longer-term implications for software worth noting here, not least because design. 1. research. As the prop- The first of these was the knowledge gained from scientific might also note that great engineering designers have also maintained ‘sketchbooks’ might also note that great engineering ‘commonplace book’ (Isambard Kingdom (Leonardo da Vinci) or the ’s and to provide a form of ‘pattern book’ for con- Brunel) both to aid their own thinking veying these ideas to others. However, each of the resulting artifacts was ideas with, and learned from, their peers. the emergence of engineering practices were a single unique creation, and only with question of how is a designer to learn their trade? For many centuries this was prob- a designer to learn their trade? For question of how is whether formal or through some form of ‘apprenticeship’, ably achieved primarily in many creative disciplines. there is still a strong element of this otherwise, and today is considered by some to be a very valuable Indeed, the concept of the ‘design studio’ software design too (Tomayko, 1996). We and effective route for teaching about of an artifact first began to emerge is likely to remain largely a matter for conjecture. began to emerge is likely to remain of an artifact first times, such as the pyramids, any of the major creations of ancient It is unlikely that of ‘design planning’, and so it without a significant degree could have been achieved to identify seems reasonable of design and construc- separation from the craft-level entwining domain where this begun. tion is likely to have 1.2 activity the design of role The the is to specify task for the designer section, the principal in the previous As we saw of and produce a description to a problem best solution of implementors be used by the eventual a ‘plan’ that can then forms This description the system.

14 The nature of the design process SDC01 9/18/07 10:34 AM Page 14 AM Page 10:34 9/18/07 SDC01 15 The role of the design activity with those responsible for domains – and has some important has some – and domains all communication Here we begin to discern one of the more distinctive features of software design. Here we begin to discern one of the more distinctive features of software From this, we can rightly conclude that From this, we can rightly conclude that to the design process and may address a This specification is an important input In addition, the plans produced by the designer may need to indicate some In addition, the plans produced by Returning briefly to the two case studies that were introduced above, we can see were introduced case studies that briefly to the two Returning a plan that informs the removal men where each major item of furniture is to be the removal men where each major a plan that informs positioned; of the panels and how the the joiner about the dimensions a set of plans that and so on. panels are to be jointed range of projects – for engineers such as I K Brunel, the designing of bridges, railways, range of projects – for engineers such as I K Brunel, the designing of bridges, opted for station buildings and ships were all part of their portfolio. Later ages have what distinguishes all of the examples used so far is that we can assume that the what distinguishes all of the examples used so far is that we can assume example, we designer is familiar with the context of the problem. Indeed, in this last as part of the would not expect that the purpose of a table would need to be explained specification. tackle a wide In the nineteenth century, the great Victorian engineers were prepared to wide range of factors. At the one extreme it may consist of a rather imprecise and gen- wide range of factors. At the one extreme the ‘customer’ trusts entirely to the designer eral requirement for a solution in which baron requires the craftsman to design a beech- to find the ‘best’ form (the medieval enough for 20 guests at a major feast). At the wood table for their great hall, large many constraining factors (a design for a table other it may provide details of very village halls, needing to be cheap to fabricate, which is to be produced for use in light enough to be readily moved). However, durable, easily cleaned, stackable, and fabricating the eventual solution is likely to be an important part of the designer’s role, fabricating the eventual solution is likely However, an equally important channel of especially for larger-scale developments. the ‘requirements’ specification that a designer is communication is with the source of this may take and however it may be obtained. being asked to address, whatever form information about the sequencing of operations in the eventual construction process. information about the sequencing of may need to be positioned before or after In the first example, some items of furniture to move items past them; and in the sec- others, perhaps because it will be difficult may indicate any significant ordering that ond example, the directions for assembly expect to erect all of the walls before beginning may be necessary. (We would generally to place the roof in position.) The first of these is largely approximate (the extent to which this is true is, of course, largely approximate (the extent to The first of these is repositioning a piano). The a chair is a less daunting task than variable: repositioning of tolerance that is accept- degree of precision, and the degree second requires a greater part of the plan. So the form of may well need to be specified as a able in the product not only upon the nature of the from the design process depends the output produced its eventual implementation. problem, but also upon the nature of n n It might well be argued that while the first of these has had its most important impact important its most has had of these the first that while argued well be It might has affected the second design’, in ‘engineering a topic in its own right return to this as too. We will for software design consequences 16 and 17. in Chapters as can be described in form. They are somewhat different for these that the objectives produce respectively: aiming to SDC01 9/18/07 10:34 AM Page 15 AM Page 10:34 9/18/07 SDC01 to hesit- Plans for realization of the design ought Domain knowledge The designer’s channels of communication. specification Requirements To continue with the needs of software development: it is clear from the above the needs of software development: To continue with One of the problems that this introduces, therefore, is that a software designer that this introduces, therefore, One of the problems Constraints production to proceed. The form and extent of the plans will be determined by the production to proceed. The form and chosen, as well as by the size of the design practices and means of implementation the software designer may need to be responsive to many channels of communi- may need to be responsive to the software designer in Chapter 3, while some of the that will be addressed further cation. This is an aspect examined more fully in later the domain knowledge will also be ways of transferring chapters. is to produce the plans necessary for software that the main task of the design phase types of application. as a routine part of the input some degree of ‘domain knowledge’ may need to acquire of this may be obtained from any particular design task. Some needed for undertaking but by no means all of the may well run to hundreds of pages), the specification (which So, as shown in Figure 1.7, is likely to be available in this way. necessary knowledge greater degrees of specialization, however, and we are unlikely to find an aeronautical to find are unlikely and we however, of specialization, degrees greater is less of specialization This degree tanker! a new oil design for the producing engineer back to the more in some ways harks development, which in software marked though is in across what – whilst being applied in an earlier era practices witnessed generalist in (say) database Admittedly a specialist of domains. a much wider range many ways least, system (or at a real-time control hesitate to design design might to design both the necessary expertise could possess in principle, one person ate) but, Figure 1.7

16 The nature of the design process SDC01 9/18/07 10:34 AM Page 16 AM Page 10:34 9/18/07 SDC01 17 The role of the design activity functions ; and so it becomes neces- process as well as its structure, and also the on the form of a design, as shown in Figure 1.8. behaviour viewpoint We will return later to consider more fully the ways in which the dynamic nature We will return later to consider more fully the ways in which the dynamic For software systems, however, a further degree of complexity has to be consid- For software systems, however, a further usually make use of a number of different To meet these needs, the designer will As in many more ‘classical’ forms of engineering, software designers produce plans As in many more ‘classical’ forms of Typically, such plans will be concerned with describing: concerned with such plans will be Typically, programming language); these should take, and the components, including the form interactions between links. nature of any causal any data objects to be used in the system; any data objects to used; the algorithms to be are grouped in compi- system, in terms of how components the packaging of the a conventional imperative that implementation will use lation units (assuming the static structure of the system, including any subprograms to be used and their subprograms to including any structure of the system, the static ; moment we will continue to focus our attention upon the nature of the design process moment we will continue to focus our attention upon the nature of the design in general. tation providing a different understand The more complex the system, the more we need a full set of viewpoints to for it to be its behaviour, and to provide a specification that is sufficiently complete used as an aid in the construction of the system. for the of a influences (and complicates) the process of design; that it will perform. So the designer’s model will ideally include descriptions that also that it will perform. So the designer’s system. encompass these aspects of the eventual with constructing the model, each represen- forms of design representation to help ered. For designing software consists of designing a ered. For designing software consists sary to model and describe its This usually requires the use of a variety of forms of representation, since each of these This usually requires the use of a variety In a way, the use of these multiple views corres- provides a different ‘view’ of a system. end views in , as well as to ponds to the use of plan, elevation and assembly details. (The concept of tolerance the cross-sectional forms used to indicate components generally have to ‘fit’ rather is perhaps lacking though, since software precisely.) oriented plans too, concerned with such matters as the preferred order of development oriented plans too, concerned with such and the strategy for their eventual integration for subprograms/modules and so on, rather like the assembly directions that are needed into the complete system. (These are However, for the moment we will chiefly concern for construction of the garden shed.) product. ourselves with the needs of the design to be assembled in terms of the items listed above. that specify how the final product is n design product itself. But as with specifying the form of the These are all concerned task may also involve producing process- was observed above, the overall design n n n system being developed. Clearly, in a large project employing many programmers programmers many employing project in a large Clearly, developed. being system needed will be factors than range of wider a much to capture will need plans the design too. may well be the programmer the designer project, where by the one-person n SDC01 9/18/07 10:34 AM Page 17 AM Page 10:34 9/18/07 SDC01 can also help Representations plays a very important part, since to abstraction can provide strategies that will help to determine which can provide strategies that will help patterns and Examples of design viewpoints. methods The concept of abstraction is enormously important for all branches of engineer- The concept of abstraction is enormously important for all branches of The designer has a number of tools to help with the task of problem-solving. The designer has a number of tools Throughout all of this, the designer needs to keep in mind that the ultimate Throughout all of this, the designer The purpose of design is simply to produce a solution to a problem. The problem The purpose of design is simply to produce ing. Essentially, abstraction is concerned with the removal of detail from a description ing. Essentially, abstraction is concerned with the removal of detail from In our first of a problem, while still retaining the essential properties of its structure. behaviour. In combination with these, abstracting build manageable models of large and complex systems we need ways of the designer their critical features for use in forming our models. Abstraction enables into to concentrate effort on building a logical model of a system, which is translated a physical model at a relatively late stage in the design process. but simply that they are subordinate to the need to produce a system that does the but simply that they are subordinate elegant or efficient a system may be, it will be required job. However well structured, its purpose. assessed ultimately on how well it achieves Design a given situation. choice may be most appropriate in of the intended system and with evaluating its with the process of building models complex and may involve trade-offs between factors such as size, speed and ease of complex and may involve trade-offs factors. adaptation, as well as other problem-specific However elegant or efficient the final solu- requirement is one of fitness for purpose. work and that it should do the required job tion, the basic two needs are that it should that other factors and qualities are not important, as well as possible. This is not to say and reminding ourselves of the ultimate purpose of design. and reminding ourselves of the ultimate of some form of requirements specification, and will typically be summarized by means description of how that requirement is to be met. it is the designer’s task to provide a task, and the examples given show Design is therefore essentially a problem-solving process of design involves the designer in evalu- that it is not an analytical process. The choices using decision criteria that may be ating different options, and in making 1.3 process problem-solving a as Design having examined its role and the nature of the design process, and Having considered it is worth stepping back for a moment objectives in terms of software development, Figure 1.8

18 The nature of the design process SDC01 9/18/07 10:34 AM Page 18 AM Page 10:34 9/18/07 SDC01 19 Design as a ‘wicked’ problem Social planning has many examples of such ‘wicked’ problems. One of the better- Social planning has many examples of such ‘wicked’ problems. One of the A ‘wicked’ problem demonstrates some interesting properties. It can be charac- A ‘wicked’ problem demonstrates some Abstraction therefore plays a key role in this book, corresponding to its central Abstraction therefore plays a key role This concept of abstraction is a very important one, and it is one that novice soft- is a very important one, and This concept of abstraction people who previously lived in substandard housing may have improved living condi- people who previously lived in substandard housing may have improved In some tions, but at the cost of destroying communities and other social frameworks. terized as a problem whose form is such that a solution for one of its aspects simply terized as a problem whose form is such that a solution for one of its aspects and arose changes the problem. The term was coined by Rittel and Webber (1984), design issues from their analysis of the nature of social planning problems and of the that were involved in these. blocks of known is evident in many large in the UK, where rehousing in tower lytical form, with one important consequence being that there may well be a number lytical form, with one important consequence Because of this, the process of design will of acceptable solutions to any given problem. being able to direct the designer towards a single rarely be ‘convergent’, in the sense of of the ‘wicked’ (as opposed to ‘benign’) prob- preferred solution. Indeed, the notion a process such as that of design, suggests that lem, which is sometimes used to describe it is potentially unstable. 1.4 problem a ‘wicked’ as Design of the nature of the design process, we should Before concluding this general review that the issues discussed in the previous sections briefly consider some of the effects to draw is that the design process lacks any ana- have upon it. The major conclusion role in design. In considering the forms of design representation that can be used for role in design. In considering the forms at ways of modelling a system using different different purposes, we will be looking methods, we will be seeing how the practices abstract viewpoints. In looking at design the designer to think about a system in an that they involve are intended to encourage is a key skill that any designer needs to abstract way. The effective use of abstraction learn and practise. gramming language structures when thinking about design. The designer needs to structures when thinking about gramming language of events, entities, objects, a system in an abstract way – in terms learn to think about questions of detail, such as key items are appropriate – and to leave or whatever other , until a relat- of loop construct to be used in a particular the specific forms design process. ively late stage in the this would be a very incomplete description of the whole structure, but it would retain incomplete description of the whole this would be a very purpose. that was essential for the particular the basic information (Adelson and Soloway, apt to find difficult to employ effectively ware designers are a wonderfully pliable medium, are accustomed to working with 1985). Programmers detailed features of pro- easy to be over-influenced by relatively and so it is all too case study, the outline plan on squared paper provided an abstraction of the idea of a of the abstraction an provided paper plan on squared outline study, the case the for solving needed that were of information those forms only It retained house. information about areas – together with two-dimensional problem – namely particular a house is a highly and so on. Clearly power outlets of doors, windows, positioning is abstraction that is the particular plan object, and the two-dimensional complex a quite different of rewiring the house, For the task this specific occasion. needed on diagram. Again, of some form of circuit based on the use would be needed, abstraction SDC01 9/18/07 10:34 AM Page 19 AM Page 10:34 9/18/07 SDC01 solution to a prob- the Rittel and Webber identified ten distinguishing properties of wicked problems, properties of ten distinguishing Webber identified Rittel and the conclusions there (that better is the answer) are simplistic, the conclusions there (that better project management is the answer) are ones! and, indeed, reflect a failure to really understand that the problems are wicked particularly true for large-scale software systems such as those dealing with major particularly true for large-scale software systems such as those dealing with resources national activities, for example paying pensions, collecting taxes, etc. The pos- needed to explore different options are simply not available, and it is rarely sible to ‘unpick’ changes to operational practices once these have been implemented of in order to meet the needs of such systems. Some good examples of the problems although creating and installing large public systems are illustrated in PAC (1999), simple exercise such as a comparison of the features of (say) a number of web simple exercise such as a comparison way in which their features need to be browsers can demonstrate the multi-faceted of any one criterion that can be used to estab- classified and compared, and the lack lish which one is ‘best’ in any sense. is a ‘one-shot operation’, because there is no Every solution to a every attempt counts significantly. This is opportunity to learn by trial-and-error, there are usually no right or wrong solutions or structures. (This point will be there are usually no right or wrong cause to mark a set of student programming evident to anyone who has ever had assignments.) test of a solution to a wicked problem. The There is no immediate and no ultimate system evaluation process adequately demon- difficulties inherent in any form of of software. Indeed, even an apparently strate that this is very much a characteristic lem has been found, such that any further work will not be able to improve upon lem has been found, such that any further by our lack of any quality measures that can it. For software, this is demonstrated design is the ‘best’ one possible. be used to establish that any one system true or false, but good or bad. For many sci- Solutions to wicked problems are not we may be able to identify whether a entific and classical engineering problems, usually come in ‘shades of grey’, in that solution is correct or false. Software designs also make the point that the specification and understanding of such a problem is that the specification and understanding also make the point it – which is why the sim- ideas that we may have about solving bound up with the followed neatly by that of in which the task of specification is ple life-cycle model description of actual practices. design is rarely a realistic Essentially this property implies that there Wicked problems have no stopping rule. to establish when is a lack of any criteria that can be used There is no definitive formulation of a wicked problem. The difficulties of specify- formulation of a wicked problem. There is no definitive known, and the tasks of software-based systems are well ing the needs of clearly. Rittel and Webber are often difficult to separate specification and design n n n n most of which can be seen as applying equally well to software design (Peters and be seen as applying equally well most of which can list, are particularly relevant. following properties, taken from their Tripp, 1976). The n cases, the living conditions may also be little better or even worse, owing to architec- to worse, owing or even better also be little may conditions the living cases, untried materials. with relatively blocks the tower construct to design decisions tural less ones that are even or created new has revealed the original problem So removing of software systems; maintenance a similar effect during There is sometimes tractable. of massive redesign require feature may subsequently relatively innocuous adding one subprograms. reorganization of structures and internal data

20 The nature of the design process SDC01 9/18/07 10:34 AM Page 20 AM Page 10:34 9/18/07 SDC01 21 Design as a ‘wicked’ problem which assist with exploiting similarities which assist with exploiting design patterns by the designer in order to apply them to a given problem, which, order to apply them to a given problem, by the designer in interpretation Unfortunately the process of producing a design is not like that at all. In working Unfortunately the process of producing These ideas are somewhat at variance with the ideas that are generally encoun- These ideas are somewhat at variance Every wicked problem can be considered to be a symptom of another problem. can be considered to be a symptom Every wicked problem pose another problem in or inconsistency in a design may Resolving a discrepancy of data structure that helps a computer program, a choice its turn. Again, in writing of an entirely new difficulty problem may in turn be the source with resolving one later. Every wicked problem is essentially unique. Of course, there are similarities is essentially unique. Of course, Every wicked problem at ideas about reuse and systems, and in later chapters we look between software such as about mechanisms require some degree experience. However, all such techniques to aid reuse of design of why design activities cannot be automated. of course, is precisely Wicked problems do not have an enumerable (or an exhaustively describable) set describable) an exhaustively (or enumerable have an do not problems Wicked for software. true this as being readily recognize We can solutions. of potential may implement programmers design plan, different there is an agreed Even where the characteristics this is one of structures. Indeed, quite widely differing this using solutions to ‘sci- solutions and the between ‘design’ differentiates that strongly entific’ problems. need to handle one adequately might lead to the occasional exclusion of know- need to handle one event adequately might lead to the occasional exclusion ledge about some other event that can occur independently. adequate. An example of just such a ‘wicked’ problem feature is often encountered in adequate. An example of just such a ‘wicked’ problem feature is often encountered so that it can designing real-time systems. It may be possible to organize the system the way that produce a response to one type of event within some required interval, but that it will this is achieved may place such constraints upon the operation of the system (since the then be unable to meet some other demand in an adequate time. Worse still the new problem might well be overcome by increasing the computer power available), this fails to work, we can always try another criterion for separation, such as using a this fails to work, we can always try try adopting polar coordinates rather than different coordinate system (we might cartesian coordinates). makes various choices, and the consequences back from the initial model, the designer such as to make further choices much more com- of any of these choices may well be the overall design itself may be shown to be in- plicated to resolve. In the extreme, expect that some form of convergence will occur, leading us to a single solution to a expect that some form of convergence typically aims to reduce a problem in such a problem. The use of ‘scientific’ methods developing a solution leads to a set of simpler way that each step in the process of the description of the motion of a system into problems. As an example, separating coordinates may result in the formulation of descriptions of motion in each of three be solved independently, or nearly so. And if three separate equations that can then A slightly different but related view of design problems is that of Herbert Simon A slightly different but related view of well-structured and ill-structured problems (1984). He has introduced the idea here to elaborate further on these ideas but, as (WSPs and ISPs). There is no space design emerges as having the properties of one might expect, the task of software an ISP. approach to problem-solving, where we might tered in the ‘classical’ or ‘scientific’ n n n SDC01 9/18/07 10:34 AM Page 21 AM Page 10:34 9/18/07 SDC01 physical and logical Wiley International Wiley a requirement is to be met by the design a requirement is to be how Design Methods: Seeds of Human Futures. Design Methods: Seeds of Human Futures. forms provide means of modelling ideas about a design, and also of of modelling ideas about a design, and forms provide means Developments in Design Methodology. Butterworth is used in problem-solving, and is used to help separate the is used in problem-solving, and is used to representation Problems like these can be hard to resolve, since concentrating upon solving one solving upon concentrating since to resolve, be hard these can like Problems Airline A is cheap, but involves flying to Chicago, waiting there for three hours and then flying Airline A is cheap, but involves flying to Chicago, waiting there for three hours and aspects of the design process; one and this imposes constraints upon the way in the software design problem is a ‘wicked’ and managed. which the process of design can be organized the design process is concerned with describing the design process is product; design presenting the design plans to the programmer; abstraction Exercises Further reading Summary This journal of the Society provides an insight into design issues affecting a This journal of the provides an insight into design issues wide range of fields of application for design techniques. 1.1 to plan a journey by air from Manchester in England to Pittsburgh in the USA. You are asked Cross N. (ed.) (1984). contains some significant contributions from authors This collected set of articles and papers is a strong and valuable input from a number of such as Horst Rittel and Herb Simon. There science to the study of design and designing. authors who bring the ideas of cognitive . Jones J. Christopher (1970). an excellent degree of insight into the nature of the The opening chapters of this book provide directly relevant to the issues of software design. design process. The later chapters are less n n n n This chapter has sought to examine the nature of the design process in fairly general terms. It has to examine the nature of the design process This chapter has sought later, and will be described in of concepts, many of which will reappear introduced a number ideas presented in this chapter are: Some particularly important greater detail where appropriate. aspect in isolation (such as handling the single event) may eventually result in an result eventually event) may single the as handling (such in isolation aspect our problem becomes all. In such cases for the second at produce a solution inability to a them out is not needs, since separating to the combined a solution one of producing valid option.

22 The nature of the design process SDC01 9/18/07 10:34 AM Page 22 AM Page 10:34 9/18/07 SDC01 23 Exercises storage. lem criteria? The need is for a portable timepiece, to be carried in a pocket, or even (if possible) worn timepiece, to be carried in a pocket, The need is for a portable equal-sized portions, num- have a circular dial, divided into twelve on one’s wrist. It will centre of the dial: one (the will be fixed to a spindle in the bered 1 to 12. Two pointers pointer will rotate once once per hour, while the second (shorter) longer one) will rotate of running unattended for at least 24 hours every 12 hours. The device should be capable position in order to work correctly. and should not need to be kept in a fixed in planning a new garden that is to have a lawn, patio, path and vegetable plot. Draw a dia- in planning a new garden that is to have a lawn, patio, path and vegetable plot. Draw gram showing the different abstractions used as the plan develops. detailed plans to help someone make this item? detailed plans to help someone make this of instructions for making tea with a teapot and actions. Sketch out a design for a set that might arise (no water in the kettle, burst teabags. Try to consider the major problems you organize the instructions for these exceptional teabag, no kettle and so on). How would original design? situations so that they do not obscure the (b) a wooden storage rack for audio cassettes (c) height and taken apart for carrying and a metal music stand that can be adjusted for design, and what changes you made to it as your Then think about how you reached your do you think might occur if you had to produce thinking developed. What further changes This problem is a good demonstration of why the simplistic approach sometimes advocated This problem is a good demonstration of requirements specification as a means of pro- in favour of stepwise refinement of a formal for most real systems. ducing a design is unrealistic and impractical (a) a rocking chair (to be made from timber) are sundials and large pendulum clocks. Given the following requirements specification, pendulum clocks. Given the following are sundials and large it by creating a suitable design begin exploring the ways of meeting suggest how you might solution: on to Pittsburgh. Airline B is the most expensive, but offers a direct flight. Airline C has a Airline C flight. a direct but offers expensive, is the most Airline B Pittsburgh. on to from Manchester to which involves flying of airline A, but is cheaper than that package that airport in the USA. via yet another then on to Pittsburgh near London, and Gatwick Airport (a) your choice of airline? price might affect What factors besides (b) prob- meet the ‘wicked’ and route to choose about which airline How does the decision 1.5 new garden is an example of design. Think about the abstractions that might arise Planning a 1.4 we are designing for a sequence of Designing software is made more complex because 1.3 Sketch out a design for one or more of the following: 1.2 the time of day in which the only available means for telling Imagine that you live in a world SDC01 9/18/07 10:34 AM Page 23 AM Page 10:34 9/18/07 SDC01 SDC01 9/18/07 10:34 AM Page 24 SDC02 9/18/07 10:36 AM Page 25

chapter 2 25 The Software Design Process

2.1 What is software? 2.4 Constraints upon the design 2.2 Building models process and product 2.3 Transferring design knowledge 2.5 Recording design decisions 2.6 Designing with others

This chapter begins by reviewing some ideas about what might constitute ‘software’ and then takes the ideas about design that were introduced in Chapter 1 and considers how they can be interpreted for the problem of designing software. It examines some of the conclusions that have been drawn from observation of software designers at work, and uses these to identify the forms of support that are required to help with transferring design experience and knowledge. Some of the other factors influencing software design are surveyed, and their influence upon the evolution of software design practices is considered. software have helped with classifying architectural style The one factor that these developments have particularly highlighted, and the one The one factor that these developments have particularly highlighted, and In some ways, the effect of these developments upon design thinking has probably In some ways, the effect of these developments This process of variation in the forms of implementation has continued apace, This process of variation in the forms By the 1970s the idea that computing tasks could be distributed across multiple By the 1970s the idea that computing When people first began to develop computer-based applications that were recog- began to develop computer-based applications When people first that existing design practices (including many described in this book) have been least that existing design practices (including many described in this book) have While successful in addressing, is the continuing demand for faster delivery of systems. been less than might be expected (and arguably, somewhat less than might be desir- been less than might be expected (and arguably, somewhat less than might able). At one level, such concepts as a matter of the wealth of implementation forms. However, in some ways this is more process having the question of implementation form considered earlier in the design rather than being a radical change in the nature of the design process itself. parameters. Ideas about distribution have further extended the potential for employ- parameters. Ideas about distribution final structure of a system, as well as extending ing run-time binding to determine the as ‘client–server’ are now widespread, if not par- ideas about distribution (terms such time, the addition of ‘scripting’ forms to static ticularly well-defined). At the same and XML has further extended our ideas about description notations such as HTML the forms that ‘software’ might take. one, the designers now had to incorporate additional factors into their decision- one, the designers now had to incorporate data were to be partitioned or shared between making, such as how functionality and mechanisms to employ, and the likely perform- machines, the form of communication ance effects of these choices. of the Internet has added many new and in the 1990s in particular, the development resulting binary code, the close link between these generally rendered the distinction resulting binary code, the close link unimportant. further possibility of changing the links between computers had been added, with the could largely be considered to be a variation these at run-time. While this development of course influence the thinking of the designers in the details of implementation, it did system was to be implemented as a distributed of such systems. Where the eventual table binary code’ that was intended for execution on a single machine. Indeed, this that was intended for execution on table binary code’ about software design. The implicit in all early thinking assumption was effectively was compiled (which can be was largely fixed when the code structure of such systems of the designer(s) were directed binding’) and so the ideas described as ‘compile-time code. Indeed, while the term a single monolithic unit of binary towards producing times to describe both ‘source code’ and the ‘software’ might be used at different begun the previous chapter by asking the question ‘what is design?’, it is appropriate chapter by asking the question ‘what begun the previous is software?’. by considering the question ‘what to begin this chapter this question was one that enough to merit an explicit design phase, nized as being large at least, software was been asked by anyone. Until the mid-1970s was unlikely to have with generating ‘execu- all of the forms that were concerned considered to encompass 2.1software? is What and process of design of the general the characteristics chapter we examined In the first this a creative task. In it as being design that characterize those features of identified the design of the ways in which with examining will be concerned chapter we the task of designing any ways in which and identifying general pattern, fits into this of artifact. So having any other forms that of designing might differ from software

26 The software design process SDC02 9/18/07 10:36 AM Page 26 AM Page 10:36 9/18/07 SDC02 27 Building models , et al. they are to do they are how do, than develop solutions that describe develop solutions do, than . This is seen as being an essential property of software, in which no . Software, being ‘pliable’, is expected to conform to the standards should However, since the main theme of this book is one of ‘software design’, for much However, since the main theme of this One way of achieving faster delivery of systems to their users is to employ a higher faster delivery of systems to their One way of achieving imposed by other components, such as hardware, or by external bodies, or by exist- imposed by other components, such as hardware, or by external bodies, or ing software. Complexity execution. two parts are alike and a system may possess very many states during than This complexity is also arbitrary, being dependent upon the designer rather the problem. Conformity n n and size, software development techniques seem to have inched along in a series of rel- and size, software development techniques are cited for this, and in his widely acclaimed atively small steps. Various reasons accidents of software engineering’, Fred Brooks paper ‘No silver bullet: Essence and causes of this relatively slow progress (Brooks, has pointed out some of the principal following properties of software as major factors 1987). In particular, Brooks cites the affecting its development. 2.2 models Building systems have long been recognized. The difficulties involved in creating software-based such as hardware design and production has While apparently-related technology in performance, and similarly reducing price raced along gaining orders of magnitude of the time we take a very general and abstract view of what might constitute ‘soft- of the time we take a very general and to the effects of choosing specific forms of imple- ware’, although we do pay attention affect design decisions. Indeed, our thesis here mentation where this may significantly argued that whatever the form(s) of software that is one of unification, in that it can be design should still reflect a set of consistent con- are used to implement a system, its cepts and principles. to writing them in ‘high-order languages’. This freed them from dependence on one ‘high-order languages’. This freed to writing them in faster production of code. An type of computer and also enabled particular make and design stage is to place greater the potential for a similar step at the approach offering rather than designing existing ‘objects’ and ‘components’ emphasis on manipulating chapters. be discussing these ideas in our later new ones. We will is unlikely to be achieved without expenditure of considerable effort. Whether this will without expenditure of considerable is unlikely to be achieved open question (Brereton many ‘web-based’ systems is an prove achievable for 1998). In the 1970s such a step in terms of what we think of as ‘software’. level of abstraction assembler code from writing programs using machine-specific was achieved by moving this has always been a problem, the concept of ‘internet time’ is one which probably which is one time’ of ‘internet the concept problem, been a always this has To a considerable process. design a reflective need for with the strongly most conflicts our ideas about adapt and extend can much more quickly arises because we extent this what systems a its structure, due care to preserve design is that, given of good it. One characteristic as characteristics harming such other modified without be extended and system can that is one However, this characteristic and consistency. time, response SDC02 9/18/07 10:36 AM Page 27 AM Page 10:36 9/18/07 SDC02 . In later chapters we will scale link that can provide an easily link that of a system within a given context or of the designer’s intentions. Models of of the designer’s intentions. Models visual behaviour (reduced to only the properties of direct interest), (reduced to only the properties of direct representation abstract . Software suffers constant need for change, partly because of the because partly for change, need constant suffers . Software . Because software is ‘invisible’, any forms of representation that are of representation any forms software is ‘invisible’, . Because (Larousse) Constructing a model for a proposed solution allows the designer to explore the Constructing a model for a proposed solution allows the designer to explore In developing software, we need models that are often less precise than the math- In developing software, we need models The idea of using some form of ‘model’ to help with exploring design ideas is some form of ‘model’ to help with The idea of using This not only constrains our ability to conceptualize the characteristics of software, our ability to conceptualize the This not only constrains its development. among those involved with it also hinders communication Changeability costing them). for techniques poor (and relatively changes of making ease apparent Invisibility any form of it will lack used to describe for example, and the system – unlike, the representation between grasped relationship of the building. the visible features be easily linked to plan which can a building ‘A three-dimensional representation, usually in miniature, of a thing to be con- ‘A three-dimensional representation, structed.’ the process of software design. In this section we will try to identify some of the main the process of software design. In this section we will try to identify some features and characteristics of the models that are used in software design. be examining some of the forms that such a model can take. structure. potential limitations of the solution as well as to assess its behaviour and required the However, the examples used in the first two case studies (Chapter 1) the ‘solution designer to construct only relatively simple models in order to explore assist with space’. Simple, that is, as compared with the models that are needed to designer. more abstract than those used by the ship-builder, ematician’s models, while also being in the physical sense! However, their role and that are certainly not three-dimensional is still to provide some form of software will usually be of how we handle which also helps to address the issues may be concerned with more than just construction. An example of such an abstract may be concerned with more than just which may be employed for such tasks as pre- form is that of the mathematical model, of a metal bridge; describing the life expectancies dicting the stress in the components traffic flow at road junctions. Models of this of policyholders; and describing type can also be used to predict the much more closely to the needs of the software , a role which corresponds reads something like the following: and models may well be more abstract and However, this is a rather physical view, ter by considering the key design factor of model-building, used by a designer to posit the key design factor of model-building, ter by considering a solution. magnificent scale models shipbuilders constructed hardly new. The seventeenth-century also (equally important) as a as an aid to their own planning and of sailing ships, both shipyard workers who were to be tasked with means of conveying those plans to the is a model? A typical dictionary definition constructing the vessel. So what exactly For these reasons (and especially the last one), while the act of designing software (and especially the last one), while For these reasons design activity in Chapter 1, it general characteristics identified for usually shares the We therefore begin this chap- additional problems for the designer. incorporates many n n

28 The software design process SDC02 9/18/07 10:36 AM Page 28 AM Page 10:36 9/18/07 SDC02 29 Building models A general model of the software design process. A general model of the In practice, and especially when developing larger systems, the process of design is In practice, and especially when developing Figure 2.1 shows a (very general) ‘model’ of the software design process itself. The Figure 2.1 shows a (very general) ‘model’ strongly influenced by the eventual form that will be adopted for its solution. strongly influenced by the eventual form units (the ‘detailed’ or ‘phys- first phase are mapped on to technologically-based box into a white box. Where design and ical’ design), hence turning the black it is the output from this phase that implementation are separate responsibilities, provides the specifications for the programmers. ‘architectural’ or ‘logical’ design) in which only the external properties of the ‘architectural’ or ‘logical’ design) in black-box partitioning of the problem is model elements are included. This initial nature and form of the problem itself, and less therefore largely concerned with the Figure 2.1 design, rather than upon the exact forms that the models and transformations will take design, rather than upon the exact forms that the models and transformations for specific design strategies. Again, this is a rather idealistic description, but conceptually useful, even where it is Again, this is a rather idealistic description, but conceptually useful, even when not practical to keep the activities of the two phases separate (as, for example, we come to seeking to reuse existing components). So it is one that we will use when for the review different approaches to software design in the later chapters. However, during moment we will concentrate chiefly upon the general role of model-building 2. that were identified in the In the second phase, the abstract ‘chunks’ of the problem apt to be divided into two distinct phases, as illustrated in Figure 2.2. apt to be divided into two distinct phases, 1. model of a solution (the In the first phase, the designer develops a highly abstract input to this process is provided by the Requirements Specification , while input to this process is provided by consist of a set of detailed specifications that the outputs produced from it should components. (Of course, we know from our describe the form of the eventual program wicked problems that this is a highly idealized discussion of the characteristics of account!) SDC02 9/18/07 10:36 AM Page 29 AM Page 10:36 9/18/07 SDC02 The major phases of the software design process. The major phases of the software design The initial ‘’ that is used to describe the intended form that a The initial ‘architectural model’ that The use of abstract ‘mental models’ by the designer to simulate the dynamic The use of abstract ‘mental models’ by the designer to simulate the behaviour of the eventual system that will be derived from the design. a familiar problem; but taken from a familiar domain; and a problem that was unfamiliar in detail, senses. a problem that was unfamiliar in all n The study was limited in scope, in that they looked at only a small number of subjects, The study was limited in scope, in that they looked at only a small number for prac- and concentrated their study to a single specialized problem domain. Also, their tical reasons, the problems themselves were relatively small in scale. However, process. findings do seem to reflect more general experience with the software design Some key observations that were produced from this research included: posed: n n n system will take is generally highly abstract in its nature. The way that this is devel- system will take is generally highly was examined in an interesting study of the ways oped during the process of designing by Adelson and Soloway (1985). In their experi- that software designers work, made both experienced and inexperienced designers ments, they studied the ways in which models when they were faced with a range of set about the task of forming their were based upon situations where a designer was different problems. The experiments Figure 2.2

30 The software design process SDC02 9/18/07 10:36 AM Page 30 AM Page 10:36 9/18/07 SDC02 31 Building models , programming , rather than on design , 1988; Visser and Hoc, 1990). While this work con- , 1988; Visser and Hoc, 1990). While et al. The models formed during the early stages of design are mainly concerned with The models formed during the early stages of design are mainly concerned Returning to the large-scale issues of design (such as arise for the type of problem Returning to the large-scale issues of There have been relatively few empirical studies of software designers conducted There have been relatively few empirical by using a previously developed design object or structure. Where this occurs, developed design object or structure. by using a previously describing it in detail at a ‘label’ to identify the plan, rather than designers may use that point. aid to systematic expansion future (detailed) intentions, as an Making notes about of a design. Expanding the detail of a model in a systematic manner by keeping all elements of all elements keeping by manner in a systematic a model detail of the Expanding task aids the This then are developed. as they level of detail same at the the design of . as possible when design as explicit affecting the to make any constraints The need an unfamiliar problem. handling can be solved part of a problem This arises when previous design plans. Reuse of that was given on page 5, based upon the quotation from the work of J. Christopher that was given on page 5, based upon the quotation from the work of J. with the idea Jones, we can see that this use of an initial abstract model corresponds system for different scenarios. In addition, the models can be used to aid a systematic system for different scenarios. In addition, the models can be used to aid of a detailed expansion of the initial ideas of the designer towards the production design description. since they assisting either the analysis or the specification of the problem (or with both, process are often entwined). If we return briefly to the more general view of the design that we term ‘programming in the large’), we will see when we come to examine dif- that we term ‘programming in the large’), many of these provide quite extensive forms of ferent software design methods that abstract models in order to explore ideas. The support for a designer in building initial as in the case of ‘systematic’ methods, or forms used for the models may be graphical, the more ‘formal’ methods. In each case, the use mathematically-based, in the case of the designer to predict the likely behaviour of a of an abstract model generally allows small’. For instance, many programmers probably perform by executing small’. For instance, many programmers when coding conditional loop structures: mental models for sections of their programs that occur when the loop is first executed, and modelling the entry/exit conditions terminate in the intended manner. In that sense, checking to ensure that the loop will one, and it is clearly rather important at all the idea of simulation is a fairly familiar levels of abstraction. within a controlled experimental environment that have examined the activities within a controlled experimental viewpoint of the actions of the designer. How- involved in software design from the studies of design activity in more ‘normal’ ever, others have conducted some similar working situations (Curtis software centrated on studying the process of some of the observed techniques are also used many programmers will recognize that that they undertake when ‘programming in the for the more detailed design tasks The last point is less directly concerned with the manner in which a model is developed directly concerned with the manner The last point is less designer avoids the pitfall of the way in which an experienced and used, but it reflects the details of one aspect of a design in too much detail. (Fixing following one thread later constrain the early a stage may severely, and inappropriately, of a design at too for the other aspects.) designer’s choices n n n n SDC02 9/18/07 10:36 AM Page 31 AM Page 10:36 9/18/07 SDC02 , 1988). et al. , enabling them to map between problem design knowledge design , (1988), the exceptional designers were observed to possess three , (1988), the exceptional designers were et al. The characteristics of an exceptional designer. In Curtis Experimental study of software designers and their practices suggests that, as Experimental study of software designers So in many ways, the various approaches to supporting and structuring the soft- supporting and structuring approaches to ways, the various So in many Familiarity with the application domain ease. (A domain in this sense may be one structures and solution structures with systems, and so on.) such as data processing, real-time, telecommunication 1. might be expected, some people are better designers than others (Curtis might be expected, some people are great designers is very small, we need to seek However, since the number of truly skills to a wider group in as effective a manner ways of providing appropriate design as possible. in Figure 2.3, these are: significant characteristics. As illustrated Chapter 1 examined the nature of the general design process and showed that it is quite the nature of the general design process Chapter 1 examined act of designing is not based approach to problem-solving. The unlike the ‘scientific’ true solution to a problem, as aimed at identifying the one upon an analytic strategy, process, and certainly very laws. Instead, it is a highly creative determined by physical to any given problem. the identification of a single solution unlikely to lead to examine this issue of knowledge transfer more fully and identify some of the other of knowledge transfer more fully examine this issue involved in it. factors that may be 2.3 Transferring that a designer needs to ‘predict a future state’ and so needs to assume the outcome of the outcome to assume so needs state’ and a future ‘predict needs to a designer that process. that to begin in order process the design the concerned with this book are largely will examine in process that we ware design models. Indeed, and elaborating describing, constructing practices used for different as can be considered assess such models to develop and that is needed the knowledge we section, therefore, In the next designer’s portfolio. element in the an important Figure 2.3

32 The software design process SDC02 9/18/07 10:36 AM Page 32 AM Page 10:36 9/18/07 SDC02 33 Transferring design knowledge . This was . This is one that has offered a , to the extent that they could be found that they could , to the extent experienced, and have extensive domain know- experienced, and have extensive domain are of further developments in the design. . The idea of design methods emerged in the 1970s in order to a decision, if the information required is not yet available at this design a decision, if the information required anticipation design methods postpone Design methods are not the only means of formalizing the transfer of domain Design methods are not the only means of formalizing the transfer of Domain knowledge can be acquired partly through experience, and also, to some Domain knowledge can be acquired Even if rigorous procedures for performing the transformations between the stages Even if rigorous procedures for performing When we look at how successful designers work, there are other factors to con- how successful designers work, there When we look at Others too have identified the importance of the domain knowledge of the identified the importance of the domain Others too have Skill in communicating technical vision to other project members project to other vision technical in communicating Skill often was work of the design much factor that a so significant to be observed with others. while interacting accomplished performance with project Identification progress. for ensuring technical responsibilities significant management taking on to level; or to hand, and which can be used for defining to process information that is readily modules in knowledge, and more recently the idea of the key characteristics of the domain. One way of learning such practices is through the key characteristics of the domain. One way of learning such practices is use of use do seem meet this need for knowledge transfer, and in some ways their forms and regard to be something that is peculiar to software development. We can, therefore, that will the purpose of a software design method as being to provide the framework enable a designer to develop and elaborate a design in a systematic manner. design strategies in some way. Experienced designers can make use of opportunistic design strategies in some way. Experienced techniques precisely because they such techniques are clearly inadequate where ledge to guide their actions. However, the question of how are they to be acquired? these characteristics are lacking, leaving practices that may be related to a particular degree, through learning a set of design upon making decisions that are based upon the domain. Such practices place emphasis Such opportunistic design activity is not unstructured; instead, it is more likely to Such opportunistic design activity is domain knowledge. One important consequence reflect the designer’s experience and support tools should not give them an inter- is that the developers of software design on the part of the designer. face form that impedes this behaviour there may still be benefits in seeking to codify of a designer’s model cannot be devised, n n accelerated and improved. section. Visser and Hoc those that were outlined in the previous sider, apart from of software design term ‘opportunistic’ to describe observations (1990) have used the such as ‘top-down’ (systematic- designers aim to follow a strategy activity. Even where into ever smaller actions), they may deviate ally refining the description of the solution from this plan, either: Interestingly, though, the exceptional designers studied often did not possess particu- the exceptional designers studied Interestingly, though, skills. larly good programming Soloway, 1985), and clearly successful designs (Adelson and designer for producing in a particular problem come from the accumulation of experience this aspect can only such knowledge can be be, though, that the process of acquiring domain. It may well 2. 3. SDC02 9/18/07 10:36 AM Page 33 AM Page 10:36 9/18/07 SDC02 , 1995). However, since the use of , 1995). However, et al. provides a set of descriptive forms that the designer can provides a set of descriptive forms that that can be used to provide guidelines on the ways in which the that can be used to provide guidelines is concerned with describing how the necessary transformations is concerned with describing how the heuristics The two major components of a software design method. The two major components representation part process part So representation forms generally reflect the properties of the objects in the design. So representation forms generally reflect the properties of the objects in the The representation part of a design method will usually include forms that can be The representation part of a design method For our purposes, a software design method can be considered as providing a a software design method can be For our purposes, ideas for its solution, and for describing the structural features of the solution to ideas for its solution, and for describing the eventual implementors. to be organized, as well as with any elabor- between the representation forms are ation of their detail that might be required. use for building both black box and white box models of the problem and their use for building both black box and A set of can be organized for specific classes of prob- activities defined in the process part experience of past use of the method within a lem. These are generally based upon form of structure. particular domain or for a particular properties such as the calling hierarchy, complex data structures, number of parameters properties such as the calling hierarchy, complex data structures, number will be and so on. On the other hand, the forms that are used for problem modelling which showed how key joints were to be assembled. In describing software, one will which showed how key joints were to be assembled. In describing software, sub- typically use detailed design forms that describe the structures of the program that units, the relationships that these have with one another, and the relationships they have with the other entities in the system. concrete Those forms that describe the detailed design may be concerned with fairly While these do not necessarily provide the domain knowledge that a designer needs, While these do not necessarily provide knowledge. they may well aid in developing this as forms that reflect the significant structures used for modelling the problem, as well example of the latter form: in describing a garden of the implementation media. As an described its plan, elevation and end view, and shed, one would use drawings that A further component is provided in most design methods: A further component is provided in n 2. The returning to the concept of the pattern at a later point. returning to the concept (shown schematically in that consists of two major components supportive framework Figure 2.4). 1. The less ‘procedural’ mechanism for this (Gamma less ‘procedural’ mechanism domain and hence in thinking deeply engrained in the software design methods is role in knowledge transfer, we will focus here upon their about software design, Figure 2.4

34 The software design process SDC02 9/18/07 10:36 AM Page 34 AM Page 10:36 9/18/07 SDC02 35 Transferring design knowledge , we will design pattern about how such problems are best step, in which a change of viewpoint that is used to step, in which a change of viewpoint , sometimes termed the ‘Aha!’ response. This is a skill in which , sometimes termed the ‘Aha!’ response. development of procedural knowledge problem restructuring recognition step Akin (1990) has suggested that there are three ‘classic’ conditions that are Akin (1990) has suggested that there The process part of design is rather more difficult to quantify and classify. Its to quantify is rather more difficult part of design The process (Again, Akin notes that there are many fields of human endeavour where this can (Again, Akin notes that there are many fields of human endeavour where be seen to apply.) example, in solving a given problem, the designer may decide to store the data in example, in solving a given problem, the designer may decide to store the an array. This choice may subsequently require a highly complex set of algorithms, array will and the designer may later realize that using a linked list in place of the result in much simpler algorithms. domain. solved, allowing the designer to perform many creative acts within a the designer recognizes a solution that has been there all along. (This form of cre- the designer recognizes a solution that scientific progress than of design progress ative act is perhaps more typical of the concept of the although when we later come to study depend upon a form of recognition step.) see that effective use of patterns does to a major breakthrough in solving it. As an describe or model a problem leads identification of particular constraints to be considered; identification of particular constraints verification/validation operations. identification of the design actions to be performed; identification of the forms; use of the representation transformations between representations; procedures for making quality measures to aid in making choices; 3. The 2. The designer to identify the choices available, and to evaluate these in terms of their likely designer to identify the choices available, consequences. These are: observed in creative acts such as design. 1. The n n guidance for the designer, rather than detailed Most design methods provide strategic this is driven by the problem-oriented nature of solutions to issues. To a large extent has to make: the role of the method is to help the many of the choices that a designer n n n n heuristics (‘it worked well when we did it this way before’). Most likely, it will reflect well when we did it this way before’). heuristics (‘it worked theoretical underpinnings these. In general there is a lack of strong a mix of all three of principles may themselves be methods, and even the underlying for existing design some of the expectations in nature. However, we can still identify relatively empirical which will include providing the process part of a design method, that we have from for the following tasks: some degree of guidance concerned with more abstract properties of the problem objects and any relationships and objects of the problem properties more abstract with concerned abstract relatively upon be based will usually model these. This between may exist that pro- comes closest to flow, and as such, and information such as operations concepts by placing emphasis by a designer element needed ‘domain knowledge’ viding the significance. to be of the greatest are considered domain features that upon the ‘principles’, or from from specific fairly general theory, may be derived from structure SDC02 9/18/07 10:36 AM Page 35 AM Page 10:36 9/18/07 SDC02 , 1984; Friel and Budgen, 1997). et al. , which may involve a change of representation ) of structures, in which the input and output forms ) of structures, in which the input and elaboration that, again, can have any of these forms; that may be described by using a suitable ‘representation’ (which that may be described by using a suitable (or through which the designer adds information to the model. through which the designer adds information Transformation model of design activity. Transformation model transformation of viewpoint refinement input model output model The view of design as being a series of transformations is one that has been The view of design as being a series of transformations is one that If we explore further the transformation steps themselves, we find that for each If we explore further the transformation of the model are the same, but extra detail is added; of the model are the same, but extra the of the representation form. form or introduce a different interpretation design inputs the an may be graphical, textual or mathematical); an As a general model it provides a useful summary of design method structuring, and it As a general model it provides a useful summary of design method structuring, methods. will be used for this purpose in the chapters that describe specific design add both decisions and a change of the structure of the design model. In the former add both decisions and a change of the structure of the design model. space’ by case, the designer is chiefly concerned with reducing the eventual ‘solution be adding making additional choices and decisions; whereas in the latter he or she may information about new relationships between design objects. explored and used in a number of ways (Lehman n involve refinement are apt to preserve the repres- In general, the transformations that while those that involve a change of viewpoint entation form while adding more detail; n forms of design transformation, which In addition, we can identify two principal respectively involve: n step we can identify a general structure of the form shown in Figure 2.5. Each trans- step we can identify a general structure formation involves: n n A major component of the process part of a design method is the structuring of the of the process part of a design method A major component in the ‘process diagram’ used The sequence that is expressed design transformations. omits any detail about the iter- course, still a fairly abstract one, and in Figure 2.2 is, of evaluates the design options. occur as a designer explores and ations that will normally since the nature of these is too of the heuristics is also omitted, Any ‘formal’ inclusion strongly method-specific. Figure 2.5

36 The software design process SDC02 9/18/07 10:36 AM Page 36 AM Page 10:36 9/18/07 SDC02 37 Constraints upon the design process and product that particle-wave design pattern (Shaw and Garlan, 1996) (Shaw and Garlan, , 1995) has focused upon categorizing solution , 1995) has focused et al. exhibited by light, in which it can have the characteristics of one form or the other in any given situation, Similarly, for the case of software design, we can readily identify many of the con- Similarly, for the case of software design, We will return to look at both of these approaches in later chapters. In many We will return to look at both of Of course, as always occurs when considering design issues, there are trade-offs occurs when considering design Of course, as always As indicated earlier, design methods have formed part of the software designer’s software part of the formed have methods design earlier, As indicated reasons, two as well as for other this problem, the need to address Partly through duality but not both. senses, their key contribution to the task of transferring design and domain knowledge senses, their key contribution to the task are complementary to those employed in design is through providing strategies that so often occurs in software development, finding methods. Unfortunately though, as approaches is apt to prove elusive.* ways to combine the strengths of different involved in their application. While both of these approaches offer much better scope While both of these approaches involved in their application. design methods do, the lack of ideas than ‘traditional’ software for reusing successful to the novice and, in the can make them less readily accessible a procedural element well the concept will scale up there are questions about how case of design patterns, in a given context?). are likely to be both useful and accessible (how many patterns was mentioned earlier (Gamma was mentioned earlier be reused for different problems. structures that can straints imposed upon the form of the product. Some may be determined by the even- straints imposed upon the form of the product. Some may be determined of the user tual run-time environment (organization of file structures; the ‘look and feel’ required interface), while others may relate to the need to conform to the conventions between by a chosen architectural style (JavaBeans; forms of remote access; choice * that resemble the physicists’ dilemma with the Software often seems to possess characteristics were concerned both with functional issues (blocking power outlets or windows) and were concerned both with functional colour, or putting a bed in the dining room etc.). with aesthetic ones (clashes of style or the form of the solution (or product in These considerations largely act to constrain garden sheds, the main constraints were again this case). For the example of designing driven by the need to provide a way of con- on the form of the product, and were units. structing sheds from easily prefabricated In practice, there are very few opportunities to design a system with a totally free hand, In practice, there are very few opportunities a particular context, and this will provide since each design task takes place within of the design itself and possibly on the way that particular constraints upon the form this in the case studies of developing designs for it is produced. We have already seen In the example of moving house, the constraints moving house and for a garden shed. 2.4 and product process upon the design Constraints developed in the 1990s. The concept of developed in the 1990s. procedural approach to think- as taking a more structural and less can be considered idea of the can be developed. Similarly, the ing about how a design support base since the 1970s. However, in providing this support, their form and their form support, this in providing However, 1970s. since the base support 1999) and there creativity (Budgen, influence upon also be a constraining nature can to support, that they are ill-equipped design behaviour of ‘conventional’ are aspects used successfully. have previously been that the reuse of part-solutions most notably knowledge were of design and domain with the transfer to assisting other approaches SDC02 9/18/07 10:36 AM Page 37 AM Page 10:36 9/18/07 SDC02 , which can design reviews appear here), although this will not necessarily be true for those that appear here), although this will not necessarily , Modula-2, Java and scripting languages such as Javascript etc.) have and scripting languages such as Javascript , Modula-2, Java should ++ , 1995) as well as upon the task of allocating functionality between components. functionality between task of allocating well as upon the , 1995) as Many constraints will be identified in the initial specification documents (or at Many constraints will be identified Constraints on the process of design are more difficult to identify. They may be Constraints on the process of design can be considered as forming a set of bounds Whatever form they take, constraints The imperative forms of programming language (COBOL, ALGOL, FORTRAN, of programming language (COBOL, The imperative forms Perhaps one of the most important constraints on the design task and the form task and the form on the design constraints of the most important Perhaps one The need to record the decisions of the designer (or, for larger projects, of the design The need to record the decisions of the designer (or, for larger projects, more so from team) is important, from the viewpoint of the design task itself, and even identify and track constraints is through the use of regular be given the role of ensuring that an audit trail is maintained. 2.5 decisions design Recording limit the overall solution space by limiting the range of choices available to the limit the overall solution space by course, that inconsistencies in specification may designer. (There is also the risk, of solution!) Some constraints are problem-specific actually make it impossible to find a should be assumed for a new application), while (such as the level of user skills that as architectural style). While problem-specific others are more solution-specific (such into any formal design process (such as a constraints cannot readily be incorporated need to be considered at every step. One way to design method), their influence does upon the ‘solution space’. Even if the process of design will not necessarily converge upon the ‘solution space’. Even if the the effects of the constraints may be to limit upon one solution for a given problem, will be acceptable in particular circumstances. the amount of possible divergence that least, they Whatever their source, constraints effectively are related to any expectations of reuse. concerned with designer skills and knowledge (experience with a particular method), concerned with designer skills and knowledge ‘architectural style’ of design, in order to aid or with a need to conform to a particular constraint upon the product leads to a constraint future maintenance. In some cases, a form needs to be consistent with that gener- upon the process – where, say, the output strategy. ally produced from a particular design Ada, C, C the use of imperative lan- tool in software production. Indeed, remained the dominant currently available, and so implicit in almost all design methods guage constructs is use of imperative forms is not this book. However, the will be assumed throughout studied here are certainly process, and the principles of design essential to the design alone. not restricted to the imperative paradigm hardware and select the major software facilities (, programming the major software facilities (operating hardware and select While enlightenment may be beginning on the design task itself. language) before even language is still more likely to the choice of the programming (very slowly) dawning, skills and knowledge than by external factors such as programmer be determined by problem itself. the features of the processes or objects; etc.). Where it is also intended that the eventual system will be con- will system that the eventual intended it is also Where etc.). or objects; processes constraints lead to further this may components, software existing by reusing structed may possess (Garlan the components styles that ‘acceptable’ architectural upon the et al. For many years of implementation. of the eventual form itself is that of the design the been to purchase projects has software development used by most the approach

38 The software design process SDC02 9/18/07 10:36 AM Page 38 AM Page 10:36 9/18/07 SDC02 39 Recording design decisions . Such an audit may . Such an design audit , 1987). Possessing some record of , 1987). Possessing et al. The principal benefits of such an approach are that new members of a design team The principal benefits of such an approach are that new members of a design An important issue in terms of recording decisions about a design has been raised An important issue in terms of recording The way in which design decisions are recorded is obviously somewhat dependent The way in which design decisions are So a major motivation for recording the reasoning behind any design decisions is one So a major motivation for recording the methods generally provide good forms of Unfortunately, while software design There is an even stronger need on the part of the system maintenance task (which need on the part of the system There is an even stronger Beginning with the original task of design, the recording of rationale is likely to be recording of rationale task of design, the with the original Beginning the eventual task of maintaining the system will also be made easier. Parnas and the eventual task of maintaining the system will also be made easier. proof, the Clements observe that even for a scientific document such as a mathematical documentation should be written as though the ‘ideal’ design process was the one that documentation should be written as though the ‘ideal’ design process was process (as was followed. Indeed, they argue that since design will never be a rational documen- we have been observing throughout this and the preceding chapter), any tation produced will always need to ‘fake’ this appearance of rationality. and also that should be able to absorb knowledge about the project much more easily, modelling this process of design deliberation – the ‘Potts and Bruns model’ (Potts and modelling this process of design deliberation been demonstrated for the JSD method. As yet, Bruns, 1988; Lee, 1991) – and it has support that can be used for this task. though, there is little or no general tool have observed that, even if the design process by Parnas and Clements (1986). They not a rational one, the documentation that is actually used to produce a design is appear as though it were. In other words, the finally produced should still make it other notation, they are generally weaker on process matters, such as recording the other notation, they are generally weaker of decisions and their reasons can fairly reasons for the decision. While the recording it is relatively hard to enforce it unless there is easily be made a part of design practice, a strong quality control system in operation. work has been performed to look at ways of upon the design process adopted. Some complete history of the system design. stage and also much later, during maintenance. of quality control, both at the design we hope to fully understand a design, and this Only if we have a complete picture can good, reliable design. is an essential factor in producing a product issues, usually through diagrams or support for recording decisions about the reasons for the existing structure can help both with recreating this model and with existing structure can help both with the reasons for the for the change need to be of any changes. In turn, the reasons evaluating the effects in order to maintain a consistent and added to the records kept by the maintainers, ture the original models that were used by the designers of a system. Only when they that were used by the designers ture the original models decide how to implement their complete model can they reliably have a reasonably effective manner (Littman changes in the most consist of peer review of the designer’s ideas, or may be something more formal that is of the designer’s ideas, or may be consist of peer review if audits are held, they will be manager. Whatever the form, conducted by the project for decisions are recorded. and usefully performed if the reasons more systematically and designer effort). In around 50–80 per cent of programmer is thought to involve need to be able to recap- extend a design, the maintenance designers order to modify or the viewpoint of the maintenance team who may later need to extend and modify the and modify to extend later need may team who of the maintenance the viewpoint it is decisions, the actual record diligently may while designers Unfortunately, design. choice. (Experience the basis for the final that forms to record the rationale much rarer it engineering alone: to software that is confined this is not a problem suggests that practice too.) branches of engineering occur in many other seems to form of includes any if the design process encouraged SDC02 9/18/07 10:36 AM Page 39 AM Page 10:36 9/18/07 SDC02 operating system is prob- operating system is Linux . Such software is made freely available and is usu- . Such software is open source software Many of the very successful and ‘exciting’ software systems have been the work Many of the very successful and ‘exciting’ designing a system through the use of a team In the absence of any great designers, We will return to the issue of design documentation in later chapters. It is certainly We will return to the issue of design documentation Before concluding this section, we should also briefly refer to one of the more briefly refer to we should also this section, Before concluding how to integrate the individual contributions to the design, which may well involve how to integrate the individual contributions to the design, which may well a process of negotiation between the members of the team. how to split the design task among the team, and to determine the interfaces how to split the design task among the team, and to determine the between the parts; n brings two major additional issues that need to be handled within the chosen design brings two major additional issues that need to be handled within the chosen strategy. These are: n modules should be equal to the number of members of the design team!) modules should be equal to the number (1987) contrasts the ‘excitement’ of Unix, of one or a few ‘great designers’. Brooks systems with the ‘blandness’ of COBOL, PL/1, Pascal, Modula, and similar that support this point. (A more recent contrast MVS/370 and MS-DOS as examples might be Linux versus Windows XX!) of any scale, it is essential for any form of programming in the large, where a project of any scale, it is essential for any form than a single designer. Given the nature of the is likely to involve a design team rather that designing as a team adds further compli- design process, it is hardly surprising added constraints upon the process, and hence cations, many of them in the form of medium-sized systems it sometimes appears as upon the form of the product. (For of design that specified that the number of design though there were an invariant ‘law’ one where software’s characteristic of ‘invisibility’, and the complexity of its nature, one where software’s characteristic are made very evident! 2.6 others with Designing is important for software development tasks While the development of a both version control and documentation are essential elements in managing the efforts and documentation are essential elements both version control at time of writing, there (Wu and Lin, 2001). Curiously though, of so many volunteers that are involved in developing study into how the processes has been little academic the more ‘traditional’ forms of differ from those employed in open source software in the preceding paragraphs. development described emergence of basis. While there are developers, contributed on a voluntary ally the work of many this type of software product, the many examples of for preparing this revised (and has been used as the platform ably the best known of such software is be returning to look at how the development edition). We will section we should note that chapter, but in the context of this organized in the next form published is rarely the form of the initial derivation, since, as understanding since, derivation, initial of the the form is rarely published form they proof, since simpler need the Readers be found. usually can simplifications grows, discovery. In the same the process of its the theorem, not in the truth of are interested member or the main- to the new team design that matters the structure of a way, it is developed. not the way it was tainer, and the 1990s, namely of the 1980s and developments social and technical interesting

40 The software design process SDC02 9/18/07 10:36 AM Page 40 AM Page 10:36 9/18/07 SDC02 41 Designing with others The Psychology ., 1988) et al ., 1988; Curtis and Walz, (Curtis et al (Weinberg, 1971). In this he observed the effects of differ- (Weinberg, 1971). Researchers have also sought to understand and model the psychological factors Researchers have also sought to understand In practice, few design teams seem to act along such lines, perhaps because there In practice, few design teams seem to The more hierarchical approach was at one time advocated by the exponents of approach was at one time advocated The more hierarchical Some of the original research studying how programming (and hence designing) is research studying how programming Some of the original Bringing the elements of a design together, along with the accompanying negoti- with the accompanying design together, along the elements of a Bringing the large impact that may be exerted by a small subset of the members of the team the large impact that may be exerted knowledge; who possess superior application domain within a company (and particularly the need the influence of organizational issues and the customer). to maintain a bridge between the developers the size of a team (there seem to be pointers that a size of 10–12the size of a team (there seem to be pointers members is prob- ably an upper limit for productive working); ‘Designers needed operational scenarios of system use to understand the appli- ‘Designers needed operational scenarios of system use to understand were too cation’s behaviour and its environment. Unfortunately, these scenarios generated seldom passed from the customer to the developer. Customers often them and many such scenarios in determining their requirements, but did not record abstracted them out of the requirements document.’ n n in that: This last point raises an important issue that influence team behaviour in designing (Curtis that influence team behaviour in designing references include: 1990). The factors discussed in these n support his or her activity. The parallel usually drawn has been with the surgical team support his or her activity. The parallel the very different purpose of the latter. Members – which rather begs the question of themselves, such as librarian, administrator or of the team might have specialized roles back-up who acts as the technical deputy to the documentation expert, and there is a chief programmer. on the very exacting central role it demands. are few great designers who can take of peers (in which different members of the group might take the lead for specific different members of the group might of peers (in which had a highly hierarchical form. tasks), to those that Set in the design context, school (Baker, 1972; Brooks, 1975). the ‘chief programmer’ in a highly centralized role, functions as a chief designer, acting the chief programmer performing functions that are solely intended to with the other members of the team ation may be right and necessary, it should not be allowed to reduce the integrity of and necessary, it should not be allowed ation may be right the overall design. classic book was described in Gerald Weinberg’s performed by teams of that worked as an ‘egoless’ set organization, ranging from groups ent forms of group The first of these problems is at least partly aided by the increasing trend towards towards trend increasing by the aided least partly is at problems first of these The it is the moment, For a later point. at be examined that will an issue designs, modular the of subdividing with the problem strategy does help to note that this sufficient ensure a fair balance is still necessary to team, although it among a design operations where appropriate. of effort, a process of negoti- issues. While and managerial again a mix of technical ations, is This point is an interesting one, for it is relevant not only to the use of design teams, This point is an interesting one, for it is relevant not only to the use of the full set but addresses a much wider organizational issue in itself. (Figure 2.6 shows SDC02 9/18/07 10:36 AM Page 41 AM Page 10:36 9/18/07 SDC02 , 1988.) We will return later to examine more recent , 1988.) We will return later to examine et al. ., (1988) ) Factors influencing the software design process. Factors influencing the et al For the present, however, the key issues of design team operation seem to lie more For the present, however, the key issues the need for domain knowledge on the part of the designer; the widening interpretation of what consists ‘software’; to con- the complexity of the model-building processes for software systems, with their need sider static forms as well as the dynamic behaviour of the eventual system; the influence of the invisible nature of software upon any attempts to describe it; ‘Programming in the large is, in part, a learning, negotiation, and communication ‘Programming in the large is, in part, process.’ Summary n n n n This chapter has enlarged upon the issues that were raised in Chapter 1 by considering how they This chapter has enlarged upon the issues design. Major points from this chapter are: apply to the particular domain of software (1990): has gone into technical research than into invest- Unfortunately, to date far more effort igating team and organizational factors. thinking about the roles of scenarios and ‘use cases’ in software development. thinking about the roles of scenarios in that of . Certainly few, if in the domain of group psychology than methods offer any significant guidance on how any, of the more widely used design team as opposed to an individual, and it would they should be adapted for use by a avoid doing so. To quote from Curtis and Walz seem that they are probably correct to Figure 2.6 (After Curtis of factors identified in Curtis

42 The software design process SDC02 9/18/07 10:36 AM Page 42 AM Page 10:36 9/18/07 SDC02 43 Exercises IEEE . Springer Practitioner Series ISBN (11), 1268–87 31 , Software Design – Cognitive Aspects , 10–19 Comm. ACM (b) real-time process control for chemical plants (c) writing compilers for imperative programming languages. oped it, are you aware of any way in which you might have reused experience from previous oped it, are you aware of any way in which you might have reused experience from programs in deciding upon particular structures or algorithms? of domains. Consider what particular forms of experience might be useful in the domains (a) processing financial transactions how to go about recording the results of the design process, presenting an ideal view of the results of the design process, how to go about recording by ‘faking’ an ideal development process; design development and how this differs from indi- affect the operation of design teams, some of the factors that vidual design practices. how the observed practices of software designers relate to the model of the general design of the to the model relate designers of software practices observed how the design practices by use of opportunistic in particular, the was presented, and process that designers; the representation major components: and its three form of a design method, the general heuristics; part, and the part, the process 1-85233-253-0 systems. Computer Exercises Further reading 2.2of domain knowledge is clearly a feature that will take different forms in particular The reuse oriented view of software design issues. 2.1 written. Thinking about how you devel- Consider a recent item of software that you may have large projects. A particular feature is the consideration of the influence of various factors within large projects. A particular feature is the the organization. Détienne F. (2002). view of software design, reviewing both the- A very scholarly text which takes a psychological Useful reading for anyone wanting a more cognitively- oretical ideas and also empirical studies. by a number of emerging . A good summary of the issues that make progress with by a number of emerging technologies. A software development so difficult. A field study of the software design process for large Curtis B., Krasner H. and Iscoe N. (1988). on data gathered by interviewing personnel from 17 This paper describes an analysis performed Brooks F.P. Jr (1987). No silver bullet: Essence and accidents of software engineering. No silver bullet: Essence and accidents Brooks F.P. Jr (1987). of experience gained by Professor Brooks, and com- This paper brings together the many years the development processes for software that are offered ments upon the prospects for improving n n n n SDC02 9/18/07 10:36 AM Page 43 AM Page 10:36 9/18/07 SDC02 Write down a list of the information about the development of a system that would be useful of a system about the development a list of the information Write down features. in order to add new a major revision of it had to undertake to you if you a collective exercise, a ‘design’ as that successfully produced of a committee last a member this possible. the factors that made and identify 2.3 of a system. structure the final merely details all, often available at if documentation, Design 2.4 you were Think back to when some circumstances. of design team in Committees are a form

44 The software design process SDC02 9/18/07 10:36 AM Page 44 AM Page 10:36 9/18/07 SDC02 SDC03 9/18/07 10:38 AM Page 45

chapter 3 45 Design in the Software Development Process

3.1 A context for design 3.4 Economic factors 3.2 Linear development processes 3.5 The longer term 3.3 Incremental development processes

The development of any large computer-based system (sometimes referred to as ‘programming in the large’) is one that involves many activities – of which software design is but one – even if a very central one. In this chapter we examine some of the ways in which systems are developed, and consider how the organization of the development process can influence the design task. We conclude by considering a longer-term view of systems and their evolution and maintenance, and consider what effect this might have upon design choices. creativity rather than to Open source software of all kinds is generally developed in this way, as are many websites. Typical domains Many ‘made to measure’ systems are developed in this way. This approach is one that has been used very widely and is still appropriate for systems that need to demonstrate any form of high integrity. Widely used for ‘shrink wrap’ software of all sorts, such as office packages, games, operating systems. Also, where there is a need to interact closely with the end-users during development. constrain , 1988). It is also important to recognize that one of the , 1988). It is also important to recognize which emerged as a description of how the necessary which emerged as a description of how et al. Where there may be a need to demonstrate feasibility of an idea; establish a market position rapidly; or explore whether a market might exist. Providing a rapid time to market is often an important factor for adopting such an approach. Where evolution of a system is largely in response to what the developers perceive as being needed. Reasons for adoption Where the needs are reasonably well determined and a ‘longer’ delivery time is acceptable. software life-cycle Some examples of software development processes Ideas about how the software development process might be best organized have Ideas about how the software development For many years, almost all systems were of course ‘made to measure’, and the con- all systems were of course ‘made For many years, almost There are many ways in which a ‘large software system’ can be developed to meet in which a ‘large software system’ There are many ways Reactive Linear (e.g. ‘waterfall’) Incremental Development process have evolved. (A good overview of this evolution of thinking about life-cycle models is have evolved. (A good overview of this valuable – provided we accept that it encompasses many forms and variations (Royce, valuable – provided we accept that it 1970; Boehm 1988; Davis concept is that its very usefulness might result risks involved in employing such a useful then used to in it becoming institutionalized, and 1982; Gladden, 1982). support it (McCracken and Jackson, is similar to the way in which ideas about design undergone a process of evolution that brief overview of some of the forms of development that are commonly adopted, the of the forms of development that brief overview of some examples of the domains form might be used, and some reasons why a particular be most appropriate. where its use might cept of the organized has been widely recognized to be very development activities were usually place in isolation, and in this chapter we examine some of the other factors that can other factors that some of the chapter we examine and in this place in isolation, the overall task of software process, by virtue of its context within influence the design development. generally involves perform- perceived markets. While each of these particular needs or upon each one, and the ways in set of activities, the emphasis put ing largely the same different. Table 3.1 provides a and interwoven, will be very which they are ordered 3.1 design for context A much for the purpose has been very two chapters of the preceding The discussion of the book, in terms subject matter constitutes the our views of what of clarifying the is influenced by ways in which this in general, and the design process of both the something that takes of design is not However, the task of software. characteristics Table 3.1

46 Design in the software development process SDC03 9/18/07 10:38 AM Page 46 AM Page 10:38 9/18/07 SDC03 47 A context for design (Royce, 1970), a maintenance Operation and testing Integration Unit testing Coding design Detailed design Architectural analysis elicitation and Requirements study The waterfall model of the software life-cycle. Feasibility However formulated, most development processes tend to be couched in terms of However formulated, most development processes tend to be couched in Boehm (1988) has pointed out that a software process model of this form Boehm (1988) has pointed out that Figure 3.1 in some way, regardless of their sequencing. The specific processes described in in some way, regardless of their sequencing. The specific processes rest of this Table 3.1 are discussed more fully in the following two sections, and in the However, as we will see with the case of design methods in later chapters, its role is However, as we will see with the case of design methods in later chapters, asked than much more concerned with identifying where these questions should be with answering them! 3.1, and one the phases identified in the original waterfall structure shown in Figure be addressed might well argue that these encompass a set of tasks that always need to addresses the following software project questions. addresses the following software project 1. What should we do next? 2. How long should we continue to do it? given in Boehm (1988).) Royce’s formulation of the given in Boehm (1988).) Royce’s formulation 3.1, was a particularly influential refinement of version of which is shown in Figure the presence of ‘feedback loops’ between the earlier thinking that explicitly recognized ways, this corresponds to recognizing that the various stages of development. (In many of a ‘wicked problem’.) task of development is yet another example SDC03 9/18/07 10:38 AM Page 47 AM Page 10:38 9/18/07 SDC03 prob- . Operation can sometimes resemble an extended test- . Essentially these phases involve validating the imple- . This may involve devising data and communication . This may involve devising data and . Here the objective is to identify what ‘end-user’ needs is to identify what ‘end-user’ needs . Here the objective . Concerned with the overall form of solution to be adopted . Concerned with the overall form of . The role of such a study (where performed) is essentially to a study (where performed) is essentially . The role of such . Developing descriptions of the elements identified in the previous . Developing descriptions of the elements . Traditionally this is usually seen as a more formal modelling of the . Traditionally this is usually seen as (that is, of the needs identified in the documents produced from the require- (that is, of the needs identified in the As with processes, so it is with tasks. While the terminology used in different so it is with tasks. While the terminology As with processes, different issue – it may involve repeating all the tasks of the preceding phases and, different issue – it may involve repeating all the tasks of the preceding phases of its indeed, preserving the integrity of the system (in other words, the consistency Unit and from mented system against the original requirements, the specification produced the Analysis phase, and the design itself. Operation and maintenance is a rather ing phase, providing feedback from users in many ways. Maintenance tion is to meet the requirements. Coding (implementation) of code or, increasingly, involve writing ‘glue’ structures and writing large amounts Effectively, though, it involves ‘trans- code to join existing components together. some form of realised system and therefore lating’ the abstract design plans into takes its inputs from the design phase. Architectural design system, what the major elements will be (for example, whether to use a distributed and how they will interact). Detailed design with this. There are also clear feedback phase, and obviously involving interaction are to ensure that the behaviour of their solu- loops to earlier phases if the designers the reuse of existing software is encouraged. Analysis lem forms a major input to the design process, ments elicitation stage). Obviously this solution-based assumptions. and can very easily drift into making the architectural level (what form of solution might be most practical). (what form of solution might be the architectural level Requirements elicitation suggested that an ideal is required to meet. It is sometimes the intended system of any considerations is for it to be completely independent approach to this task However, this is increasingly less appro- of eventual design and implementation. need to interact with others, and also where priate, especially where one system will Feasibility study set of constraints. So such solution is attainable within the given explore whether a design issues, even if only at give some preliminary thought to a study will at least n n n n n n n sources may differ a little, the following are a practical set for our purposes: a little, the following are a practical sources may differ n section we briefly review the roles of the different development phases. In keeping with In keeping phases. development of the different the roles review we briefly section of how in terms be mainly will discussion our however, main theme, of our the spirit and process models fuller discussion of phases; for a relate to the design these tasks on Software Engin- a more general text should consult tasks the reader development (2001) and Van Vliet Sommerville Pressman (2000), as Pfleeger (2001), eering such the all discuss between these sources, differs slightly terminology (2000). Although approach. and the prototyping waterfall model forms, namely the main two

48 Design in the software development process SDC03 9/18/07 10:38 AM Page 48 AM Page 10:38 9/18/07 SDC03 49 A context for design -oriented, while that from ana- user will be concerned with identifying the needs of the library will be concerned with -oriented. Indeed, the role of analysis is an important one, since it forms will create a model of how the library works and hence produce a list of will create a model of how the library solution , 1996). The task classified in the study as ‘detailed design’ was particularly stable, design’ was particularly the study as ‘detailed task classified in , 1996). The So the output from requirements elicitation is The specification for this system may also need to describe the way in which the The specification for this system may Analysis Requirements elicitation As might be expected, regardless of how these tasks are organized, the design task regardless of how these tasks are As might be expected, design plan) could well be an important constraint upon the task of maintenance. task of upon the constraint be an important well plan) could design very long. also be phases can last two for these timescale The lysis is form their tasks will be strongly affected by the ease with which they can interact with form their tasks will be strongly affected by the ease with which they can own the information presented to them. (In some ways, this relates to the designer’s with a struc- use of ‘mental models’, since the interface should provide the librarians involved. We ture that matches their own mental models of the processes that are objects’ might reasonably also expect that this will be expressed in terms of ‘library rather than ‘computing objects’.) ling paper-based records. One of the roles of the analysis task should, therefore, be to ling paper-based records. One of the appropriate.) identify where such changes might be are to be organized (the ‘look and feel’ users’ interactions with the final system interfaces is still a relatively specialized and aspects). The design of human–computer flavour. In this example it will be a very difficult art, with a strong multi-disciplinary with which the librarians will be able to per- important element, since the efficiency number of books that a borrower has on loan or requested is exceeded – and even what number of books that a borrower has has the book being requested! (One prob- is to happen when the borrower already appropriate to ‘freeze’ particular organizational lem for analysis is that it may not be the likely effects of introducing the new system. models of practice without considering library might be better advised also to change It may well be that in our example the originally formulated for the purpose of hand- some of the practices or rules that were lists, so that the library staff can consider whether to order additional copies. Such an lists, so that the library staff can consider interactions and organizational relationships analysis will usually also consider the of the users of the system. that may exist between the various needs to provide, and the behaviour it should exhibit functions that the system will need given conditions. As an example, the book when performing these functions under effects of adding a request when the maximum reservation function should specify the little more, therefore, we shall examine the simple example of a computer system that we shall examine the simple example little more, therefore, CDs and videos for a local issue, reservation and recall of books, is to support the briefly, these are as follows. library branch. Very An example of such a need terms of the purposes of the library. staff and users, in books that have particularly long reservation might be the facility for identifying those taking around 20 per cent of total effort and 20 per cent of total time. Interestingly, per cent of total effort and 20 per cent taking around 20 were classified as being regardless of whether the organizations this seemed to be true of over 25 per cent during the in development speed ‘fast’ (showing improvements or less). or ‘slow’ (improvement of 25 per cent previous five years) list. To clarify their roles a to the tasks that precede it in the above is strongly linked The proportion of effort allocated to these tasks is one that depends upon many factors. is one that depends to these tasks of effort allocated The proportion set upon a global developers that drew of software a study of the practices However, expected (Blackburn great as might be are not as that the variations of data suggests et al. SDC03 9/18/07 10:38 AM Page 49 AM Page 10:38 9/18/07 SDC03 to be done. is (and hence the form) of the software design process (and hence the form) of the software design organization While process models are an important element in Software Engineering as a While process models are an important element in Software Engineering Such a form is, therefore, also attractive to the purchasers of such systems, since it Such a form is, therefore, also attractive the main effect of production models of any One thing we can conclude is that One of the attractions in such a form (and, indeed, one of the motivations for One of the attractions in such a form This last point is particularly true where there is no established ‘market’ for a new true where there is no established This last point is particularly As the discussion of the following sections will show, the processes involved are show, the processes sections will of the following As the discussion been done than for assisting in the planning of what been done than for assisting in the planning to look at other, non-linear, forms of model, we should very briefly mention one other to look at other, non-linear, forms of model, we should very briefly mention linear form. itself. Since linear forms usually provide a stronger framework for management, it will itself. Since linear forms usually provide a stronger framework for management, that these not, therefore, be surprising when we come to look at design methods to find particular. largely assume the use of a linear life-cycle, and of the waterfall model in our only whole, it is inappropriate to pursue the topic too deeply in this book, since moving on real concern here is how they affect the process of design. However, before allows for long-term budgetary planning, as well as providing the basis for legal con- allows for long-term budgetary planning, inappropriate for a creative process may tracts. The fact that this is almost certainly of software by government agencies has well explain why the history of procurement catalogue! tended to form something of a dismal form is to influence the planning developments as well as for monitoring and controlling them. Within such a planning developments as well as for that can be used to record progress against form, the planning can identify ‘milestones’ as already observed, such an approach can some general plan of production. However, a straitjacket (Gladden, 1982; McCracken easily result in the framework becoming employed for providing a description of what and Jackson, 1982), and it is far better has 3.2 processes development Linear process is that based upon the waterfall The most familiar form of linear development in Table 3.1, this has traditionally been the model shown in Figure 3.1. As indicated to measure’ systems. development process used to create ‘made it provides a strong management framework for developing life-cycle models) is that develop its potential. One of the characteristics of developing software artifacts One of the characteristics of develop its potential. may well devise new and ima- forms of artifact too), is that users (indeed, many other different from those that the for an item of software that are very ginative applications had envisaged! original developers ing the ‘real’ needs of the user may involve some development of prototypes in order of the user may involve some development ing the ‘real’ needs work to take advantage of and better ways of organizing their to help them see new system can do for them. what a computer-based needs to be demonstrated at case, the usefulness of the application application. In that well be essential for it to fully and user feedback may an early stage of development, the ‘watershed’ at which thinking moves from stating the problem or need, to begin- or need, problem the from stating moves thinking at which the ‘watershed’ met. it can be about how to think ning paragraphs. Even in the preceding have been implied sequential as might rarely as and revision some backtracking development is pursued, process of where a sequential or some inconsistency each time phases will be needed from earlier to the outputs will see later, elicit- tasks. Also, as we the later is revealed while performing omission

50 Design in the software development process SDC03 9/18/07 10:38 AM Page 50 AM Page 10:38 9/18/07 SDC03 51 Incremental development processes , 1984). The goal, there- , 1984). The et al. the product in due course, and there is the product in due course, and there be which can be used to investigate both problem and which can be used to investigate both of a might be different for the case of soft- of a prototype might be different for form is one that periodically attracts attention. In many ways, the In many attracts attention. that periodically is one for building prototypes remain much the same as in other for building prototypes remain much prototype . This is the form that is closest to the idea of the ‘incremental develop- reasons transform model transform One benefit of this strategy is that it may be possible to issue a release of the One benefit of this strategy is that it may be possible to issue a release of A useful categorization of the different roles that prototyping can play in software A useful categorization of the different In the case of software, where the end product is simply a matter In the case of software, where manufacturing In other engineering domains, such a situation is often resolved by the construc- domains, such a situation is often In other engineering The product while it is still technically incomplete, although usable. (Of course, many product while it is still technically incomplete, although usable. (Of course, never software products such as word processors, operating systems, etc. are really Evolutionary changing ment’ of a solution. The software for a system is adapted gradually, by the the requirements step by step as these become clearer with use, and changing and the system to fit these. In this form, prototyping is used to develop a product prototype gradually evolves into the end product. 1. forms of engineering: prototypes are constructed in order to explore an idea more forms of engineering: prototypes are other means. completely than would be possible by Floyd (1984). Her analysis recognizes three prin- development has been produced by cipal roles for software prototypes. ware, the basic really no concept equivalent to that of the scale model. (In that sense, there are really really no concept equivalent to that although sometimes more abstract toolkits can no short-cuts to writing software, help.) However, while the of making copies, these analogies do not really apply. In software production it is quite of making copies, these analogies do possible that the prototype will actually solution. However, where software is concerned, the concept of the ‘prototype’ is a solution. However, where software For more traditional forms of engineering, a bit harder to define with any exactitude. a ‘first of its kind’, or some form of model that prototype is generally regarded as being with the idea of a prototype of a new model is produced to scale. We are all familiar or ships. (On a somewhat larger scale, the of a car, and with scale models of buildings Barrage down-river from London built a scale civil engineers constructing the Thames model of it in the nearby marshes.) what is required of the eventual system has to be addressed right from the start. In the eventual system has to be addressed what is required of many more where, despite con- impractical, and there are some cases this is effectively requirements, there may in techniques for determining the eventual siderable advances and possible omissions. be many uncertainties tion of some form of 3.3 processes development Incremental the need to identify exactly of a linear development process is that A major limitation aim is to extend the idea of the compiler (which automatically generates machine- generates automatically (which compiler of the the idea is to extend aim (Lehman of abstraction to a higher level specific code) scope for progress (Friel and Budgen, 1997). scope for progress fore, is to achieve automatic conversion of a formal specification of a system into a of a system into formal specification conversion of a achieve automatic fore, is to this has been made in practical progress Little that satisfies that specification. program why good reasons chapters suggest some the preceding two the arguments of area, and do seem to offer more of the model more limited versions be so. However, this might SDC03 9/18/07 10:38 AM Page 51 AM Page 10:38 9/18/07 SDC03 require- are listed and explored; , while in many ways a rather ‘visionary’ one when pub- , while in many ways a rather ‘visionary’ to a problem, by developing it in advance of large-scale imple- it in advance of large-scale to a problem, by developing constraints of the stage are identified; . This role is distinguished by the use of the prototype for evaluating by the use of the prototype . This role is distinguished . In this role a prototype is used to help with clarifying user is used to help with clarifying . In this role a prototype and solution spiral model involved in choosing between options are evaluated; and possibly with identifying how the introduction of the system might lead identifying how the introduction of the and possibly with for how to proceed to the next stage is determined, which may require the for how to proceed to the next stage is determined, which may require Used in this role, the prototype provides something in the nature of a feasibil- Used in this role, the prototype provides objectives options risks plan Boehm’s the data collected to help with making a final evaluation. the data collected to help with making likely to be a ‘throw-away’ item, and it can be considered as enhancing the informa- likely to be a ‘throw-away’ item, and analysis and the functional specification tion that is provided from the requirements activities. ity be incomplete, since the purpose may be focused on study. Much of it may functionality. Some form of monitoring resolving only limited aspects of system in this kind of prototype, its aim being to use facility is likely to be a useful feature mented in a form quite different to that which will be used for the final system itself. different to that which will be used mented in a form quite Exploratory ments organization. One purpose the wider work practices of an to the need to modify analysis of users’ needs by providing a set of might be to help with developing an Essentially this form of prototype is also possible models for them to use and assess. Experimental a possible including the assessment for doing this may be manifold, mentation. The reasons effectiveness of a particular resource needs, evaluation of the of performance and so on. This form of proto- assessment of an algorithm and form of , and might well be imple- intended to be a ‘throw-away’ item, type is essentially complete, since their roles are effectively unbounded.) Later releases can then pro- can then releases Later unbounded.) are effectively their roles since complete, this While functionality. in product increase gradual with a the users vide it does have for all purposes, not be appropriate to development may approach also where it is of ‘pioneering’, and involve a degree in areas that some attractions (Cusumano and the marketplace of a system into to get an early release important Selby, 1997). development of a prototype, or may more closely approximate to a traditional waterfall step, according to the conclusions of the risk analysis. the the the a n n n n lished, is probably the most effective approach to combining experience in using the lished, is probably the most effective of how software projects have actually been waterfall model with greater knowledge it explicitly assumes the use of prototyping developed (Boehm, 1988). As such, purpose). An outline of this is shown in Figure (although not of a particular form or following activities should occur: 3.2, and at each stage of the spiral the Of course, any actual use of a prototyping approach may span these forms, since there Of course, any actual use of a prototyping a prototype. However, going back to the may be many different reasons for developing purpose, the processes of prototyping are (not theme of this chapter, regardless of within a process model. surprisingly) relatively difficult to describe 3. 2.

52 Design in the software development process SDC03 9/18/07 10:38 AM Page 52 AM Page 10:38 9/18/07 SDC03 53 Incremental development processes , is reactive software is prob- open source , since this links back to the very (http://www.fsf.org/fsf/fsf.html) and the risk evaluation Free Software Foundation The spiral model of the software life-cycle. While the roots of the open source movement lie back in the pioneering work of While the roots of the open source movement lie back in the pioneering The third form of development cycle that was identified in Table 3.1, the The third form of development cycle Figure 3.2 (After Boehm (1981) © 1981 IEEE) of the concept did not emerge until the 1990s, when the Linux operating system kernel of the concept did not emerge until the 1990s, when the Linux operating for PCs. came together with GNU to provide a widely distributed free operating system ably the best-known example of this approach, we will discuss it largely in this context. ably the best-known example of this approach, we will discuss it largely in Richard Stallman’s awareness GNU project (a recursive definition of GNU is ‘GNU’s Not Unix’!), wider one that it is also appropriate to consider in this section, since it can be seen as a variation one that it is also appropriate to consider in this section, since it can be seen upon the incremental approach. Since the development of Within the context of a prototyping strategy, perhaps the most important element Within the context of a prototyping to highlight from this list is that of need to be adopted. In particular, given that one reasons why such an approach might itself is that the sense of ‘direction’ may of the risks implicit in the use of prototyping a particularly valuable means of monitoring and become lost, the spiral model offers controlling the development process. SDC03 9/18/07 10:38 AM Page 53 AM Page 10:38 9/18/07 SDC03 Join that project Vote for a license model Vote Do little document writing CVS version control Release official version in the foreseeable future No Yes Accept patches and modifications (vote or dictatorship) A personal itch A Initiate a project Decide a license model Use mailing list for announcement and bug tracking: use OpenPGP Use mailing list for announcement Look for any similar projects Look for any Write documents and manuals Write The general open source system development cycle. The general open source system development The open source movement provides an interesting (and increasingly important) In many ways the development life-cycle of open source software is totally differ- In many ways the development life-cycle Figure 3.3 (Taken from Wu and Lin (2001) © 2001 IEEE) context for design activity. However, in terms of the subject matter of this book, it context for design activity. However, in terms of the subject matter of can largely does not actually introduce many new issues of a technical nature, and so be regarded as an example of a particular form of prototyping. ordinators drawing together the ideas of many participants. Figure 3.3 shows a model ordinators drawing together the ideas of many participants. Figure 3.3 shows is not wholly of this process, taken from Wu and Lin (2001). However, even this model and it is consistent. Many projects have begun with a single developer (as did Linux), return to this the extension and evolution that is then influenced by the many. (We will issue of evolution in Section 3.5.) ent to those considered so far, even though it is incremental in form (Wu and Lin, ent to those considered so far, even organization, rather than in the steps themselves. 2001). The key difference lies in its number of decision-makers (designers) directing Instead of the ideas from a small source model involves a small number of co- the efforts of many developers, the open

54 Design in the software development process SDC03 9/18/07 10:38 AM Page 54 AM Page 10:38 9/18/07 SDC03 55 Economic factors is struggling to emerge in order is struggling Web Engineering Web Engineering in any sense, and that it involves navigating through in any sense, and that analytic Inconsistency between the design and the specification is more likely to be detected Inconsistency between the design and the specification is more likely to be A consequence of this is that, with so large and ill-defined a solution space, the A consequence of this is that, with Again, from the viewpoint of this book, while interesting in itself, this domain of this book, while interesting Again, from the viewpoint The second example of reactive development is that of the ‘website’. Respons- ‘website’. that of the is development reactive of second example The while the design is being implemented (transformed into programming structures); logical while the implementation of the system is being tested, since this may reveal inconsistencies in its behaviour. when the design is being refined, perhaps arising from structural inconsistencies when the design is being refined, perhaps that is obtained from different view- that emerge when comparing information seeking out such errors is that of the design points – a widely used technique for Weiss, 1987); review (Yourdon, 1979; Parnas and the design is not self-consistent, so that it cannot be successfully or efficiently imple- the design is not self-consistent, so that mented as it stands; consistent; the design and the specification are not not consistent. the design and the requirements are lar form and type of error. it may well during testing (although if prototypes are constructed during development, n n the particu- The degree to which the design will need to be changed depends solely on Inconsistency in the form of the design itself may be revealed at various stages in its Inconsistency in the form of the design development. It may appear: n n n n 3.4 factors Economic in Chapter 1, a key point that the design process was examined When the nature of is not emerged was that it ibility for the development and maintenance of the elements of these is often widely is often of these elements of the maintenance and development for the ibility much more concerned manager’ being with the ‘site within an organization, devolved of The growing use of content. than with management of style with co-ordination ‘active’ comes development increasingly also means that site such as scripts, site elements, a co-ordinated form. not necessarily of although evolutionary prototyping, to resemble of of this, a discipline In recognition of the abstract nature of software, which makes it difficult to identify and specify all of the abstract nature of software, which makes it possible to identify many solutions to a needs, and also because the medium given problem. design that contains ‘errors’. These might be of design process can easily lead to a ones are: many kinds, but some particularly significant a ‘solution space’ that may be very – indeed, extremely – large. This is partly because a ‘solution space’ that may be very – to address the challenges presented by both the rapid rate of technological change and presented by both the rapid rate to address the challenges of development. also the devolved nature technology for us to study, any particular example of design does not (so far) provide needs. this may be one of its most urgent although arguably, SDC03 9/18/07 10:38 AM Page 55 AM Page 10:38 9/18/07 SDC03 : are we building the product right? : are we building the right product? The cost of fixing ‘bugs’ at each stage of development. The cost of fixing ‘bugs’ at each stage of Unfortunately, since the main error-detecting tasks are performed later on in the Unfortunately, since the main error-detecting tasks are performed later Boehm has provided a very useful way to distinguish clearly between the actions Boehm has provided a very useful way Inconsistency between the design and the actual needs of the user (the require- Inconsistency between the design and Verification Validation life-cycle, errors in specification and design can prove costly to fix when compared life-cycle, errors in specification and design can prove costly to fix when designs with errors in coding. Ideally, therefore, we need to find ways of evaluating results of a study by Boehm, shown in Figure 3.4, suggest that the cost of error detec- results of a study by Boehm, shown in Figure 3.4, suggest that the cost of development tion and correction goes up by an order of magnitude at each stage in error in the (Boehm, 1981), a ratio still widely considered to be the case. That is, an as it would design costs ten times as much to fix if it is detected during the testing phase if it were detected during the implementation phase. Any inconsistencies in a design, whatever their form, need to be detected and identified Any inconsistencies in a design, whatever a decision can be made about what to do. The at as early a stage as possible, so that the larger a task it willlater in development they are detected, them right. The be to put ments) is a much more difficult issue, although again it may be assisted by the use of ments) is a much more difficult issue, for such inconsistencies is normally termed prototypes. The procedure of checking ‘validation’. combined together and referred to as ‘V & V’ – of verification and validation (often the distinction!): possibly to duck the question of making Figure 3.4 (After Boehm (1981) © 1981 IEEE) is usually used for this task of checking a be detected earlier). The term ‘verification’ system. design against the specification for the

56 Design in the software development process SDC03 9/18/07 10:38 AM Page 56 AM Page 10:38 9/18/07 SDC03 57 The longer term changes proceeding to implement them. Prototyping offers one such offers Prototyping them. implement to proceeding before before maintenance is performed to fix any ‘bugs’ that may be detected in the to fix any ‘bugs’ that may be maintenance is performed maintenance is concerned with extending and improving a system once it with extending and improving maintenance is concerned maintenance is performed in order to meet needs for change that are in order to meet needs for maintenance is performed Of course, this concept is familiar enough when applied to manufactured items Of course, this concept is familiar enough when applied to manufactured This reinforces the earlier point that the structure of a system should allow it to be This reinforces the earlier point that Another economic issue that needs to be considered is the cost of making is the cost of needs to be considered issue that Another economic imposed from outside (examples of these might be changes in legislation affecting (examples of these might be changes imposed from outside similar type of change that change of operating systems, or any a financial package, factors). arises from external Corrective operational system. Perfective requested by users. by providing new forms of functionality is operational, typically Adaptive current version of a given model may be very different to those of the same model current version of a given model may be very different to those of the when it was first launched on to the market. ated, the form of the product may itself then need to evolve and change over time. ated, the form of the product may itself then need to evolve and change car, the gen- such as motor cars, washing-machines, cameras, etc. For a given model of manufacturer eral characteristics might not change greatly from year to year, but the As these will almost certainly introduce annual changes to styling, features, choices. form of the accumulate over a number of years, the result is that the appearance and 3.5 term The longer centred upon the notion that the design process Most of our discussion so far has been form of plan that can be used for developing a is completed once it has delivered some sections of this chapter have indicated, once cre- product. However, as the preceding and finding errors errors and finding ponents undergoing frequent revision can often be found in the design of cars and elec- ponents undergoing frequent revision practices may create constraints that limit the tronic goods.) As already observed, such so increasing the initial cost while decreasing ‘solution space’ available to the designer, way in which most organizations budget for the long-term cost. Unfortunately, the for such practices to be adopted as effectively as software production is too short term might be desired. In practice, the first of these is generally dominant, and it has been estimated that In practice, the first of these is generally work falls into this category. around 65 per cent of all maintenance adapted to cope with likely changes (or, at least, modified fairly easily, so that it can be it would be difficult to make much useful with perfective and adaptive changes; This is a principle that has been common in allowance for likely corrective changes!). for a long time. (Examples of the design of com- many other branches of engineering 3. maintenance activity that occur in practice, and identified three main forms. that occur in practice, and identified maintenance activity 1. 2. approach, although there are some possible side-effects to this approach that can to this approach side-effects possible are some there although approach, cost-effectiveness. reduce its enhancements with time, undergoing systems evolve Most software-based to a system. per- and faults in environment alters, the users alter, the as the needs of and changes the types of software (1980) studied and Swanson are identified. Lientz formance SDC03 9/18/07 10:38 AM Page 57 AM Page 10:38 9/18/07 SDC03 utility E-type cp it is essentially it is essentially usually exhibits perfective mainten- perfective releases evolution program or system is one which is only required to program or system is one which is only S-type that was described in the last section (Lientz and Swanson, 1980). While strictly, 1980). While and Swanson, (Lientz last section in the was described that If we continue to concentrate on E-type systems, then for our purposes this If we continue to concentrate on E-type systems, then for our purposes The evolution of E-type systems through a series of The evolution of E-type systems through A useful distinction between systems that do evolve and those that are essentially A useful distinction between systems There are of course many reasons why designers might fail to anticipate the future many reasons why designers might There are of course For software, the equivalent to this process is the concept of concept is the this process to the equivalent For software, needs for change, anticipate future or been unable to have failed When designers development process needs to be modified to describe its effects, while the second is development process needs to be modified to describe its effects, while how is the design process itself affected? certain characteristics when viewed over a period of time, requiring both anticipation certain characteristics when viewed over a period of time, requiring both that and planning for change. The nature of this process of evolution is not something review of we have space to discuss here but, for those interested, a very comprehensive the issues involved is provided in Lehman and Ramil (2002). the overall concept of system evolution introduces two questions. The first is how meet a ‘formal’ specification. One example of such a program might be the meet a ‘formal’ specification. One example systems. The specification for this is simply that used in the Unix and Linux operating and hence the program, is something it should make a copy of a file. This specification, and such changes as might occur, such as (say) which does not really change over time, are ones that will not change its basic extending it to handle distributed filestores, functionality. system is one that is used to ‘mechanise a human or societal activity’, and so it must system is one that is used to ‘mechanise in order to remain satisfactory. There are many evolve and change with its context systems need to support new activities and to examples of such systems: operating need to support new tasks or new ways of make use of new devices; office packages need to incorporate legislative changes, and so doing business; pay-roll packages may on. In contrast to this, an changes. Another is that designers themselves may also lack vision about the future, changes. Another is that designers themselves deep knowledge about the domain in which the especially where they lack any very may find themselves with inadequate or system is to operate. Similarly, maintainers hard to ensure that their changes are consistent inaccurate documentation, making it with the original plans. and Ramil, 2002). Very simply, an ‘static’ has been made by Lehman (Lehman system may well not have lasted so long; however, the failure lay in not anticipating have lasted so long; however, the system may well not from the original one. at least in part, in systems that evolved that it would survive, of regarding system develop- common one arises from the practice adequately. A very budget headings, which can as coming under quite different ment and maintenance have no incentive to consider future easily lead to a situation where developers scope for problems to arise within this process of evolution. Probably the best known to arise within this process of evolution. scope for problems revise many systems at the start the need that arose to extensively example of this was to handle dates that began with Y2K problem) in order to be able of the year 2000 (the because the original developers ‘1’. In many cases, this was simply a ‘2’ rather than a such a long period of time. that their software would be used for had not expected expectation, in that the original this was probably a reasonable Indeed, in many cases ance in physical product be used with a as the term would ‘maintenance’ this is not a process of engineering, as such as motor car a domain identical. there is ample design structures, have failed to preserve maintenance teams and when

58 Design in the software development process SDC03 9/18/07 10:38 AM Page 58 AM Page 10:38 9/18/07 SDC03 59 Summary without to be used in a , 1995) is much more if ‘it can be used, et al. easily changed general (Gamma ‘if it is flexible design pattern forms tend to be unsuited to encouraging reuse, other than in a forms tend to be unsuited to encouraging procedural , in a variety of situations’, and , in a variety of situations’, Following from the discussion of the two preceding chapters, this should perhaps Following from the discussion of the Planning for reuse in this way has not generally been one of the more effective Planning for reuse in this way has In contrast, the concept of the Software development technology has been extensively influenced by this and by technology has been extensively Software development The effect upon the design process is less readily characterized. The need to design process is less readily characterized. The effect upon the At its most simple, the effect upon the life-cycle is to extend it to recognize the recognize it to is to extend the life-cycle effect upon the most simple, At its design in the context of particular life-cycle models, most notably the linear (waterfall) and design in the context of particular life-cycle models, most notably the linear (waterfall) incremental models; Summary come as no surprise. If the act of designing is essentially a process of postulating solu- come as no surprise. If the act of designing for postulating how the problem itself might tions to a problem, then adding the need simplify that process! However, it is a very real change over time is hardly likely to later. need, and one that we will return to readily related to the ideas about generality and flexibility that Parnas put forward, readily related to the ideas about generality However, the pattern concept is more largely because the idea of reuse is encouraged. instances of such ideas, or identifying how they strongly oriented towards recording ways to create the opportunity. In that sense, might be organized, than to finding the basic problem remains. although they extend the ideas of Parnas, seek opportunities to reuse design ideas or structures. seek opportunities to reuse design ideas which have generally been formulated on the elements of software design methods, as a new and unique one. Indeed, as we will see basis of treating each design problem later, their fairly general way. change variety of situations’. are more readily achievable Parnas, and in some ways these goals other ideas of David they may be technically re- he first stated them. However, while than they were when the design process to encourage the designer to alizable, achieving this still requires n An understanding of software design requires an appreciation of its role in the software develop- An understanding of software design requires an appreciation of its role in the software approach ment process, since the context that this provides influences the form of design needed. In this chapter we have examined: address this problem of evolution was recognized by in 1979 (Parnas, of evolution was recognized by address this problem and identified the need that ‘flexibility cannot be an afterthought’ 1979), who argued for a system. Parnas also when formulating the requirements to plan for extensions and flexibility, where conscious design decisions about generality argued for making could be considered as being the design of software process of evolution right through to the eventual ‘retirement’ of a system (Rajlich and (Rajlich of a system ‘retirement’ eventual to the through right of evolution process that more closely development forms more evolutionary 2000). Indeed for Bennett, least from a technical natural step, at this is a fairly Boehm’s spiral model, resemble pro- totally different maintenance as development and Rather than seeing viewpoint. in the evolutionary the initial step the former is simply view argues that cesses, this on this basis. planned and financed that it should be process and SDC03 9/18/07 10:38 AM Page 59 AM Page 10:38 9/18/07 SDC03 IEEE Com- (1), 15–44 can play in supporting aspects of the design process; supporting aspects can play in 11 phase, and upon the design of E-type systems in particular. phase, and upon the , prototyping maintenance : are we building the product right? : are we building : are we building the right product? : are we building the Annals of Software Eng. (5), 61–72 21 , verification validation (a) an interactive word processor; (b) a web-based e-commerce site dedicated to selling sheet music of all types; (c) a bank auto-teller network for dispensing cash and providing receipts. that In each case, which group of people would be involved with reviewing any prototypes were produced, and what forms might a prototype usefully take? (a) verification (b) validation purposes? and how might they be improved for these of the following software systems: the cost of fixing errors in design at a later stage of development; the cost of fixing errors the influence of the the associated role of requirements elicitation in setting the context for the various design for the the context in setting elicitation role of requirements the associated activities; software the roles that of: needs, and the roles meets the users’ of how well a design the question agement. puter Exercises Further reading 3.2 could perform (if any) in the development Consider the roles that different forms of prototype 3.1 conform to the objectives of How do your techniques for testing an item of software adopted for the spiral model. and tools for software evolution planning and man- Lehman M.M. and Ramil J.F. (2002). Rules evolution that considers the ways in which soft- A comprehensive review of the laws of software time. Includes a useful discussion of the characteristics ware elements and systems evolve over of E-type systems. Boehm B.W. (1988). A spiral model of software development and enhancement. A spiral model of software development Boehm B.W. (1988). and roles of software life-cycle models from the pen This is a very clear exposition of the forms introduction and then the rationale for the form of the guru himself. It provides a historical n n n n n

60 Design in the software development process SDC03 9/18/07 10:38 AM Page 60 AM Page 10:38 9/18/07 SDC03 61 Exercises system that is used to manage the airspace for a number of busy airports. manage the airspace for a number of busy system that is used to as such, whether they might be classified as being E-type or S-type. Identify the relevant form or S-type. Identify classified as being E-type they might be as such, whether for each case: likely to be employed of maintenance (a) supports multiple languages; processor that used with a word a spell-checking program (b) in an operating system; directory (folder) used list the contents of a a program used to (c) in an air traffic control information about the position of aircraft a system used to display 3.3 and, future in the ‘maintenance’ may require systems following each of the why List reasons SDC03 9/18/07 10:38 AM Page 61 AM Page 10:38 9/18/07 SDC03 SDC03 9/18/07 10:38 AM Page 62 SDC04 9/18/07 10:43 AM Page 63

chapter 4 63 Design Qualities

4.1 The quality concept 4.3 Quality attributes of the 4.2 Assessing design quality design product 4.4 Assessing the design process

Since one of the objectives of the software design process is to produce as ‘good’ a design as possible, this chapter is concerned with examining some of the ideas about what exactly constitutes a ‘good’ software design. It begins by examining some ideas about the properties asso- ciated with good quality in software, and then proceeds to consider how it is possible to make measurements at the design stage that might identify these properties and how the design process can be involved in meeting quality objectives. better the one is than the other. better the one is than , one needs to seek high standards of quality in , one needs to seek how much products . process We also encounter once again the dual nature of software in thinking about how We also encounter once again the dual nature of software in thinking about For software, as for other artifacts, it is also difficult to separate ideas about design For software, as for other artifacts, it Since software is such an abstract product, it is perhaps less apt to be influenced Since software is such an abstract product, When it comes to assessing design, rather than construction, the problem is, if assessing design, rather than construction, When it comes to Unfortunately, quality is a concept that can rarely be related to any absolutes, and is a concept that can rarely be related Unfortunately, quality any set of measures that we can develop should seek to assess both of these, and should any set of measures that we can develop should seek to assess both of these, the specified recognize the potential for conflict between them. (A program may meet that it real-time needs very well, but its internal structure may be so poorly organized amount of good craftsmanship applied to its construction will be able to disguise its amount of good craftsmanship applied to its construction will be able to if it is posi- fundamental failings. (The door may be well made and may close well, but still find it tioned so that we graze our knuckles each time it is opened, then we will inconvenient to use.) and so we can identify its quality. Software has both static and dynamic attributes, quality from one’s thinking about implementation quality. To return for a moment to quality from one’s thinking about implementation introduced in Chapter 1: no matter how good the example of the garden shed that was efficient use of materials and ease of construc- the design is, in terms of proportions, its quality will still be very largely influenced by tion and modification, our ideas about assembled, then, regardless of how good its design the actual construction. If it is badly of good quality. Equally, if the design is poor, no may be, we will not consider it to be by (a debatable point, perhaps, especially in relation to ), by fashion (a debatable point, perhaps, of quality is equally difficult to define for but it is hardly surprising that the concept be quantified in any way, and those measures that software. Few quality attributes can the idea of quality as applied to soft- we do possess are of uneven value. Furthermore, in nature, so it is certainly not guaranteed by the ware is at least partly problem-related process. use of some particular form for the design we appraise the quality of typefaces, furniture and clothes. We associate with we appraise the quality of typefaces, our thinking and, even worse, is likely good design, yet it offers no help in quantifying strongly influenced by our ideas about fashion – to have ephemeral aspects: it may be an example, a 1930s radio set might look quite so creating a context for quality. (As in 1930s style, but would be most unsuited to a in place in a room that is furnished of the 1980s.) room that was furnished in the style on any absolute scale. The best that we can usually do is to rank items on an ordinal The best that we can usually do on any absolute scale. this coffee table is better than that we believe the construction of scale, as when we say it exhibits. However, terms of materials used and the workmanship that of another, in of defining we lack any means often associated with visual properties, as when anything, worse. Quality in design is rather than of design, yet quality in construction depends upon good design: to achieve yet quality in construction depends rather than of design, and in order to achieve high high standards are needed in both, a high-quality product in design standards of quality the design cannot be usefully measured items ideas about quality usually even for manufactured 4.1 concept The quality it with proper- we tend to associate familar one, although of quality is a The concept of design. Asked rather than with those of construction from the tasks ties that arise as such examples are likely to identify many people of ‘good’ quality, for examples on an expensive of the paintwork of furniture, the quality joints on an item well-made of construction are examples of quality fabric. All these texture of a woven car, or the

64 Design qualities SDC04 9/18/07 10:43 AM Page 64 AM Page 10:43 9/18/07 SDC04 65 Assessing design quality scales physical ratio , be capable of perform- product must since the end fitness for purpose fitness for The next section begins by looking at a framework that enables us to identify some The next section begins by looking at This concept is related to the ideas of verification and validation that were intro- This concept is related to the ideas of This acts as a reminder that we should not seek to achieve elegance of form at the that we should not seek to achieve This acts as a reminder While our ideas of quality measures are perhaps essentially determined by the essentially determined measures are perhaps ideas of quality While our ‘When you can measure what you are speaking about, and express it in numbers, ‘When you can measure what you are you cannot measure it, when you cannot you know something about it, but when is of a meagre and unsatisfactory kind.’ express it in numbers, your knowledge (Lord Kelvin.) (they possess well-defined intervals and a zero point), so we can be sure that when (they possess well-defined intervals and a zero point), so we can be sure has a length measuring the property of length in units of centimetres, something which value of 8 will be twice as long as something with a length value of 4. 4.2.1 for assessment A framework within While Lord Kelvin’s dictum is widely quoted, it is easy to overlook the context a com- which it was made. Ideas about measurement originally emerged largely within munity of scientists and engineers who were seeking to capture ideas about could be properties such as mass, length, velocity, etc., where measurement scales more readily developed and shared. The scales used for such properties are ines some of the system attributes that relate to these properties, and briefly considers ines some of the system attributes that the influence of the design process itself in help- how these might be assessed. Finally, is considered. ing to produce the desired design properties 4.2 quality design Assessing duced in the last chapter, since comparisons are being made with expectations as duced in the last chapter, since comparisons As a measure for practical use, however, expressed in the requirements specification. So it may be better to consider fitness for it can be assessed only by indirect means. look for ways of assessing it by finding a set of purpose as an ultimate goal, and to system attributes that provide measures of these. associated properties and then some general ideas about quality. Section 4.3 exam- of the system properties that reflect our expense of function. So for software systems, we can reasonably expect to find that the So for software systems, we can reasonably expense of function. in all the required situations. system works, and works correctly final implemented manner, and within the perform the required tasks in the specified That is, it should can only measure the ultimate specified resources. (Once again, we constraints of the through its implementation.) success of a design ing the task assigned to it. As an example, however elegant the design of a chair may to it. As an example, however elegant ing the task assigned be able to sit on it, and the basic requirement that we should be, it must still meet used for assessing this will be Therefore the quality factors to be preferably in comfort. of the system that is being by considering the role (purpose) selected and weighted designed. is virtually impossible to modify it in any way. Equally, the structure of a program may of a program structure the way. Equally, it in any modify to impossible is virtually is awful!) performance run-time while its good, be very very general measures to find some itself, it is still possible the design object nature of of software. In terms can be applied to and which that are fairly universal, of quality quality should norm- measure of any system the ultimate for these, for the objectives of ally be that SDC04 9/18/07 10:43 AM Page 65 AM Page 10:43 9/18/07 SDC04 ). ’, so at this point it is useful to identify ’, so at this point it metric attributes of entities scale (where elements can be ranked, but where the sizes of the ranked, but where elements can be scale (where provide a set of measurable (or at least, identifiable) character- provide a set of measurable (or at least, are the abstract ideas that we have about what constitutes ‘good’ that we have about what constitutes are the abstract ideas ordinal are concerned with realizing the design attributes, and so involve identify- are concerned with realizing the design Mapping quality concepts to measurements. Fenton and Pfleeger (1997) have observed that ‘measurement is concerned with (1997) have observed that ‘measurement Fenton and Pfleeger an initial set ofFigure 4.1 shows these that can be constructed to link mappings Once we move away from this context, while the idea of measurement is still a valu- of measurement the idea while this context, away from we move Once istics of the design entities and so provide mappings between the abstract idea of a istics of the design entities and so provide of an actual design (and therefore effectively property and the countable features a correspond to the general concept of Counts that will need to be counted in order to ing the lexical features of a representation obtain some form of values for the metrics. Quality concepts be assessed by the designer of a system, and which will need to and ‘bad’ properties choices. when making decisions about design Design attributes Figure 4.1 As an example of a widely used metric that fits into this framework, the quality of As an example of a widely used metric to be related to its structural complexity. One program code is often considered n ideas. The key terms used in the figure can be interpreted as follows. used in the figure can be interpreted ideas. The key terms n n quality, we will need to treat them with care. The act of assigning a numerical value to to treat them with care. The act of quality, we will need using a ratio scale.) necessarily mean that it has been measured a property does not about capturing information to ideas about measurement. our ideas about quality can be tied more carefully how able one, we often have to accept a more limited type of knowledge than that which Lord type of knowledge a more limited we often have to accept able one, likely to be ‘meas- to us are more the properties of interest to. Many of Kelvin aspired an ured’ using particularly true when and this is cannot be specified), between the elements intervals design qualities. (Even an assessment of of making to consider the problem we come to ideas about design that relate values for properties do obtain numerical when we

66 Design qualities SDC04 9/18/07 10:43 AM Page 66 AM Page 10:43 9/18/07 SDC04 67 Assessing design quality (This point tends interpretation. A fuller mapping from concepts of quality to countable attributes of a design/ The mapping from a measurable characteristic to a set of good and unambiguous to a set of good characteristic from a measurable The mapping Figure 4.2 implementation. of transformation. However, the mapping from a quality concept to a set of measur- However, the mapping from a quality of transformation. is much more a case of making an able characteristics measurable characteristic that can be used to assess this complexity is the number of is the number this complexity to assess be used that can characteristic measurable by McCabe’s as measured unit, a program within that exist paths control possible by counting lexical This is derived (McCabe, 1976). Complexity measure Cyclomatic of tokens used being code, with the set in the source as IF and WHILE tokens such language. a particular implementation specific to one is essentially language a particular implementation rules to be used with counting three.) To help with this interpretation, we need a fuller model to help identify the this interpretation, we need a fuller three.) To help with provided in Figure 4.1 is An expanded form of the framework mappings required. has been expanded into three here the idea of a quality concept shown in Figure 4.2: further levels in which: to be glossed over in much of the literature on code metrics! McCabe’s metric is also a in much of the literature on code metrics! to be glossed over value does not necessarily the point made above that a numerical good illustration of an item with a Cyclomatic Few would be likely to argue that imply a ratio scale. of an item with a value of of six was exactly twice the complexity Complexity value SDC04 9/18/07 10:43 AM Page 67 AM Page 10:43 9/18/07 SDC04 relate the requirements-oriented properties of the intended system properties of requirements-oriented relate the determine the quality concepts that are associated with the purpose that are associated the quality concepts determine , 1986; Fenton and Pfleeger, 1997). For design description forms, the , 1986; Fenton and Pfleeger, 1997). et al. identifies the purpose of making measurements (and hence strongly differen- strongly hence (and measurements of making purpose the identifies So the automatic processing of design notations in order to extract measure- So the automatic processing of design Even for program code, which at least possesses well-defined syntax and semantics, Even for program code, which at least When we come to make use of these ideas, we find that the needs of the designer When we come to make use of these In the previous section it was observed that any assessment incorporating the ulti- it was observed that any assessment In the previous section An example of the mappings M1 and M2 from Figure 4.2 is shown in Figure 4.3, mappings M1 and M2 from Figure An example of the (the ‘ilities’) to the solution-oriented properties of the design itself, and these are solution-oriented properties of the (the ‘ilities’) to the a chosen set of metrics. then mapped onto use dynamic measuring design and of a properties static measuring between tiates qualities); behavioural quality factors to as the ‘ilities’); are often referred (these items quality criteria needing careful interpretation of any textual components, remain problems for most needing careful interpretation of any textual components, remain problems notations. ments of particular attributes has not made a very significant impact to date, although ments of particular attributes has not made a very significant impact to date, from sys- a number of experiments have been conducted to extract various counts Budgen tematic design notations (Troy and Zweben, 1981; Hall and Preiser, 1984; tools and Marashi, 1988). The use of CASE (Computer-Aided Software Engineering) code gener- as an aid to documenting designs and, in some cases, assisting with semantics, ation, offers a useful means for gathering such data, but weak syntax and ficult exercise requiring the careful specification of any counting rules to be used ficult exercise requiring the careful (Conte poor syntax of most abstract design nota- problem is compounded by the relatively that are unambiguous, and almost all tions. (There are very few design notations the free-text component to make their purpose graphical forms require careful use of clear.) reasoning at any given stage in the design process, and will avoid descending into detail reasoning at any given stage in the design of this reasoning. However, it is difficult to at too early a stage in the development analysis schemes seek to have available to them measure abstractions, and so metrics as much detail as possible about a design. making measurements of these can be a dif- the process of defining attributes and its domain. For example, efficiency may be of greater importance for an embedded its domain. For example, efficiency for an aircraft autopilot reliability might reason- control system than , while factor. ably be regarded as by far the most important unfortunately tend to create forces and the needs of any system of measurement observed in Chapter 2, experienced designers that pull in opposing directions. As was consistent level of abstraction in their will frequently seek to maintain a reasonably and is based on an example of the needs identified as being significant for a real-time example of the needs identified as and is based on an as significant for a compiler. those that are considered system, and, for comparison, and its to recognize the nature of the problem goal of fitness for purpose needed mate we give to the uses, and hence is reflected in the weightings that domain. This balance is strongly related to both the problem itself and the choice of weightings for the ‘ilities’ While this does not reduce the degree of interpretation involved, it does provide a reduce the degree of interpretation While this does not and the forms used. the need for quality assessments clearer path between n n n

68 Design qualities SDC04 9/18/07 10:43 AM Page 68 AM Page 10:43 9/18/07 SDC04 69 Assessing design quality Mapping quality factors to quality criteria. Unfortunately, as Figure 4.3 demonstrates, the factors that the designer considers Unfortunately, as Figure 4.3 demonstrates, the factors that the designer A further problem with metrics analysis procedures is that they have so far been A further problem with metrics analysis to be particularly important may well relate most closely to dynamic attributes, and so to be particularly important may well relate most closely to dynamic attributes, almost entirely concerned with assessing static attributes of a design, since these can almost entirely concerned with assessing static attributes of a design, since form of pro- at least be directly extracted from any forms of notation through some require perty counting. Attempts to extract information about the dynamic attributes (Friel making some behavioural interpretations from the static information provided character- and Budgen, 1997), as well as making assumptions about the performance istics of any eventual implementation. Figure 4.3 SDC04 9/18/07 10:43 AM Page 69 AM Page 10:43 9/18/07 SDC04 Example of musical score notation. The section of a musical score in Figure 4.4 shows that it should be possible to The section of a musical score in Figure section is limited to the group that can be considered as being the most widely applic- section is limited to the group that can be considered as being the most widely able, namely: likely to ‘play’ the score in his or her head in order to assess its qualities!) 4.2.2 The ‘ilities’ making The ‘ilities’ form a group of quality factors that need to be considered when in this any attempt to assess design quality. Since there are many ilities, our discussion specify some form of analysis rules for checking basic properties such as the number of specify some form of analysis rules for rules to check chords and sequences, to identify beats in a bar. We might also devise hence to check for particular dissonances. Given the intervals between the notes and then tell us quite a lot about the piece of music enough musical knowledge, this might test is to hear it played. Only then can we it represents – but of course, the ultimate whether it will be suitable for some particular be sure whether or not we like it, and here, too, as anyone with sufficient knowledge is purpose. (The ‘mental’ model applies with musical notation. Music has some similar properties to software, in that a static with musical notation. Music has some that needs to be ‘executed’, and which therefore notation is used to describe something dynamic attributes. (Again, it is relatively easy to possesses a similar mix of static and and poor quality in music, but very hard to make a broad distinction between good quantify that distinction.) Figure 4.4 when seeking to assess the ultimate criteria assessing the static attributes is insufficient why this is so by using an analogy of fitness for purpose. We can demonstrate

70 Design qualities SDC04 9/18/07 10:43 AM Page 70 AM Page 10:43 9/18/07 SDC04 71 Assessing design quality , in that its behaviour will be as expected, and will be repeatable, regard- , in that its behaviour will be as expected, , in the sense of being able to handle all combinations of events and system able to handle all combinations of , in the sense of being when faced with component failure or some similar conflict (for example, if when faced with component failure or In the early days of computers, when programs were small and computer time was In the early days of computers, when programs were small and computer For safety-critical systems, where this factor is paramount, various techniques For safety-critical systems, where this less of the overall system loading at any time; less of the overall system loading at robust chemical process-control plant fails for some the printer used for logging data in a the whole system, but should be handled reason, this should not be able to ‘hang’ up in the term ‘graceful degradation’). according to the philosophy summed complete states; consistent reliability efficiency usability relatively expensive, efficiency was considered a prime criterion, and was measured relatively expensive, efficiency was considered a prime criterion, and was implemented chiefly in terms of memory use and processor use. So systems that were The efficiency of a system can be measured through its use of resources such as The efficiency of a system can be measured through its use of resources so on. It is a processor time, memory, network access, system facilities, disk space and more efficient relative and multi-variate concept, in that one system can be identified as is no single than another in terms of some parameter such as processor use, but there scale on which to specify an optimum efficiency. the implementation will be by means of multiple computers, each programmed by a the implementation will be by means independently. Any operational request to the separate development team and tested by all the computers, and only if they con- control system is then processed in parallel cur will the requested operation be performed. Efficiency As systems get larger and more complex, so the problems of ensuring reliability will As systems get larger and more complex, also escalate. limitations in design and implementation tech- have been developed to help overcome in a ‘fly-by-wire’ aircraft, in which the con- niques. For example, in a system used links rather than direct hydraulic controls, trol surfaces are managed by computer n In particular, for the purpose of design we are concerned with ways of determining purpose of design we are concerned In particular, for the system will be: whether the eventual n n (The other ilities, such as testability, portability, and so on are rather more reusability and portability, ilities, such as testability, (The other specialized in purpose.) Reliability characteristics of the eventual concerned with the dynamic This factor is essentially about behavioural issues. the designer in making predictions system, and so involves n n n n SDC04 9/18/07 10:43 AM Page 71 AM Page 10:43 9/18/07 SDC04 framework Cognitive Dimensions (2002) provides a good introduction to the (2002) provides a good introduction , 1987). Some of the factors that affect this in , 1987). Some of the factors that affect et al. et al. A useful review of the issues that need to be considered in designing for ‘ease of A useful review of the issues that need Many of the factors that affect maintainability are related to implementation that affect maintainability are Many of the factors As a design factor, efficiency is a difficult property to handle, since it involves since it involves to handle, is a difficult property factor, efficiency As a design sort of thing that is needed for evaluating quality concepts which are themselves often sort of thing that is needed for evaluating quality concepts which are themselves ill-formed and imprecise. The ‘ilities’ are by no means the only framework that we can employ for thinking The ‘ilities’ are by no means the only framework that we can employ that origin- about system properties within a quality context. A useful set of concepts ated in the field of HCI is provided by Green’s repre- (Green, 1989; Green and Petre, 1996). The focus of this is upon ‘information and the sentation’ (which can of course include the description of a design solution), is just the purpose of the dimensions is to provide a set of ‘discussion tools’, which for the designer to provide the user with a consistent ‘mental model’ of system for the designer to provide the user design choices are fairly specialized and largely behaviour. The techniques affecting the outside the scope of this book. Preece wider aspects of this field of design. 4.2.3 dimensions Cognitive important component, and will influence other design decisions about such features as important component, and will influence module boundaries and data structures. (1984), where the authors observe that the use’ is provided in Branscomb and Thomas since ‘people communicate via, not with, use of the term HCI is perhaps misleading, cognitive element involved in this task, and a need computer systems’. There is a strong ginal ‘mental models’ (Littman in the next section. terms of design structure will be discussed Usability usability, but for many systems the design of the There are many issues that can affect Interaction, or HCI) will form an user interface (usually termed the Human–Computer development and evolution discussed in Chapter 3. development and evolution of these are the choice to very detailed design issues. Examples factors or, at least, standards. How- structuring practices, and documentation of identifiers, comment , the an important factor since, by careful ever, design is also to gain a clear understanding of their ori- designers can help the future maintainers Maintainability this by ensuring a long life- and more costly, the need to offset As systems get larger this, designs must allow for in parallel. To help to achieve time in service increases back to the idea of incremental To some extent, this also relates future modification. in machine code or assembler were generally considered to be highly efficient, but of efficient, be highly to considered generally were or assembler code in machine portability. and maintainability low on rank very would course of choices upon to estimate the effects design in order from the making projections of in terms of considerable importance as these are needs. However, eventual resource to make at least crude is often necessary system, it of the eventual the implementation of needs. predictions

72 Design qualities SDC04 9/18/07 10:43 AM Page 72 AM Page 10:43 9/18/07 SDC04 73 Assessing design quality , process , although obviously the consequences are likely to be product The cognitive dimensions The cognitive Although intended as a ‘measure’ that can be applied to HCI designs, for our Although intended as a ‘measure’ that can be applied to HCI designs, Table 4.1 summarizes the cognitive dimensions and their meanings. (For a fuller Table 4.1 summarizes the cognitive rather different insight into the issue of how As concepts, many of these provide a While the ideas concerned have been couched largely in the terminology of HCI have been couched largely While the ideas concerned ProvisionalityRole-expressiveness a component is readily inferred The purpose of Degree of commitment to actions or marks ViscosityVisibilityCloseness of mappingConsistencyDiffusenessError-pronenessHard mental operationsProgressive evaluation Closeness of representation to domain Resistance to change High demand on cognitive resources easily to view components Ability Similar semantics are expressed in similar syntactic forms time Work-to-date can be checked at any Notation invites mistakes Verbosity of language DimensionAbstractionHidden dependenciesPremature commitmentSecondary notation not visible Important links between entities are on the order of doing things Constraints Interpretation Types and availability of abstraction mechanisms provided via means other than formal syntax Extra information help, as will a design process which recognizes the need to make several iterations help, as will a design process which recognizes the need to make several through the decision-making steps. acteristic. Each set of choices is presented in turn and the user must make a decision acteristic. Each set of choices is presented in turn and the user must make while lacking a full knowledge of what other choices will be available later.) purposes, this concept can provide a ‘measure’ of the quality of the design rather than of the design revisited may exhibited in the latter. A life-cycle which allows design decisions to be This arises when an early design decision which was made before proper information This arises when an early design decision later ones. It may be unavoidable (informa- was available has the effect of constraining timescale), but it may also arise through tion may not be available within a practical such as design methods that encourage a parti- the use of procedural design practices process. (As a simple example, a spoken telephone cular ordering in the decision-making hierarchy of menus, tends to encourage this char- menu system, especially one using a we might think about and assess a design, although clearly not all are directly relevant we might think about and assess a design, how these might help with thinking about design to the current discussion. To explain to consider some small examples that illustrate quality and attributes, it may be useful some of the more relevant dimensions. lookahead) Premature commitment (and enforced offer to the more general process of design. In this section, therefore, we briefly review offer to the more general process of design. and suggest where they may be able to some of the more directly relevant dimensions offer some particularly useful insight. readers should consult the above references and discussion of the complete framework, also the website at http://www.cl.cam.ac.uk/~afb21/CognitiveDimensions/.) and of the more visual aspects of systems, they have nevertheless something useful to and of the more visual aspects of systems, Table 4.1 Table SDC04 9/18/07 10:43 AM Page 73 AM Page 10:43 9/18/07 SDC04 (1987). (This (1999), which et al. et al. ; at the start of the program, is only too typical an illustration of this ; at the start of the program, is only too 17.5 = at various points in the code, rather than declaring a constant value such as at various points in the code, rather Viscosity is a readily recognizable property at many levels of abstraction, even if Viscosity is a readily recognizable property at many levels of abstraction, process. (An interesting illustration of this is provided in Bowman operating analyses the ‘architectural structure’ of the software making up the Linux for the constant. Even worse, since 17.5 might occur within a program for other reasons for the constant. Even worse, since 17.5 might occur within a program for (for example, within 217.53), some values may even get changed in error!) represent it is not one that is easily quantified in design terms. For a design it may exist between the extent to which modules are interdependent, and the differences that the design the ‘conceptual’ form of a solution and the one that actually emerges from cially at the more detailed levels of implementation. (As an example of this dimension cially at the more detailed levels of implementation. we can consider the practice of using embedded within the context of program code, symbolic forms. Using the specific value numerical constants rather than declaring 17.5 VatRate later to adjust the value of the VAT rate, then each practice. When it becomes necessary rather than simply changing the value defined instance has to be located and modified, Viscosity to change’. During design development, this This describes the concept of ‘resistance commitment, and during maintenance it may well arise as a consequence of premature resulting design ‘quality’. Both conventional soft- may be a significant reflection of the that can easily result in high viscosity, espe- ware and websites have many mechanisms in the following chapters but, in brief, a good example of this problem is where desig- in the following chapters but, in brief, when using particular design notations. ners make use of local layout conventions of the design, they may not be so evid- While these may be familiar to the originators to those who later need to maintain the resulting ent to others who join the team, or system. trated particularly effectively in the study reported in Littman effectively in the study reported in trated particularly and their maintenance.) that is particularly relevant for websites dimension is also one Secondary notation information that is conveyed by means other than This dimension describes additional on it briefly here, as we will return to this issue the ‘official syntax’. We will only touch encies that exist between them (A and B share knowledge about certain data types them (A and B share knowledge encies that exist between the designer will need to in thinking about their solution, and structures). However, becomes potentially much relationships. Indeed, the problem consider all of these maintenance: changing a a design is being modified during more significant when has only a part of the neces- be much more difficult if the designer design is likely to to them, a point that is illus- dependencies directly available sary knowledge about Hidden dependencies Hidden is such that while one two components, between describes a relationship This concept From a design stand- not fully visible. the relationship is upon the other dependent addressing later when that we will be of the problems touches upon one point, this (for of dependency capture one type Notations often design notations. examining about other depend- B) but say nothing invokes component that component A example,

74 Design qualities SDC04 9/18/07 10:43 AM Page 74 AM Page 10:43 9/18/07 SDC04 75 Quality attributes of the design product to be able to assess in making their deci- to assess in making to be able like . A number of these, which measure different complexity While simplicity cannot easily be assessed, one can at least seek measures for its While simplicity cannot easily be assessed, one can at least seek measures The often-quoted saying ‘a solution should be as simple as possible, but no The often-quoted saying ‘a solution The cognitive dimensions offer some interesting ideas to employ in thinking about ideas to employ some interesting dimensions offer The cognitive forms of design document. to identify a set of design attributes that are related to these properties; design attributes that are related to to identify a set of about these attributes from the available to find ways of extracting information converse characteristic of forms of complexity, have been developed for use with software, including: seem at first. This is the opposite of the argument against unnecessary embellishment: that will it argues against attempting to oversimplify, since the result will be a product abstraction, not be able to do its job. One important aid to achieving simplification is if it is to but it is necessary to use an abstraction that preserves the relevant attributes be of any help in solving the problem. dual-purpose artifacts fail to achieve either of their objectives clearly and well. One dual-purpose artifacts fail to achieve that expanded to become a tent, but was example that comes to mind is a rucksack convenient to have a good rucksack and a unsuccessful because it was much more us can probably think of similar examples of mis- good tent as separate items. Most of placed ingenuity.) to Albert Einstein, is more profound than it might simpler’, which is usually attributed 4.3.1 attributes Some design Simplicity in whatever sphere of activity they are Characteristic of almost all good designs, design meets its objectives and has no addi- produced, is a basic simplicity. A good its main purpose. (Perhaps this is why so many tional embellishments that detract from In the first part of this section some of the attributes and criteria that are widely used In the first part of this section some and this is followed by a brief discussion of one of for design assessment are described, the ways in which these might be extracted. Now that a number of ideas about design quality concepts have been examined, it is of ideas about design quality concepts Now that a number for measurement are: principal problems that they present clear that the two n n to us at the design stage. We can then consider how well these are able to provide help stage. We can then consider how well to us at the design that have been described extent to which a design meets the factors with assessing the above. 4.3 Quality attributes of the system. The results of this study undoubtedly provide of several of the of the of several illustrations provide undoubtedly this study of The results system. dimensions!) cognitive later to make We will be returning mean for software. and what it can design quality of examined some However, having that they embody. of some of the ideas further use would factors that designers the quality have available of quality we actually what measures now go on to consider sions, we SDC04 9/18/07 10:43 AM Page 75 AM Page 10:43 9/18/07 SDC04 , 1990; Shepperd and Ince, 1993); and Ince, , 1990; Shepperd . Simply defining interfaces is not enough: a designer . Simply defining interfaces is not enough: et al. , 2000). et al. separation of concerns (1999) for an illustration of this). (1999) for an illustration Viewed generally, and also from a software perspective, finding a suitable scheme Viewed generally, and also from a software perspective, finding a suitable To make good use of a modular structure, one needs to adopt a design practice To make good use of a modular structure, This is generally only possible where a well-defined set of interface standards is in This is generally only possible where In terms of the design quality concepts, simplicity is clearly related to maintain- In terms of the design quality concepts, and operators (Halstead, 1977); and operators system elements (prim- in terms of relationships between complexity of structure in Chidamber and Kemerer forms), with the measures proposed arily object-oriented means the only candidates widely cited, although by no (1994) being particularly (Briand complexity of control flow (McCabe, 1976), concerned with the number of pos- of the number with concerned 1976), flow (McCabe, control of complexity unit; a program of execution control during paths of sible system (Henry and flow around the of information of structure in terms complexity Kitchenham Kafura, 1984; different identifiers the number of as measured by of comprehension, complexity benefits: needs to group functions within modules in such a way that their interdependence is needs to group functions within modules in such a way that their interdependence in the minimized. Such a grouping results in a less complex interface to the module: for soft- case of hardware, it may simply be that fewer interconnections are required; ware, we need to find other criteria in order to measure this factor. following of modularity to apply in solving a given problem provides at least the ‘backplane’ providing a data highway, together with the necessary signal lines. While ‘backplane’ providing a data highway, possible with software (as is evident from the this form of module connectivity is also the standardization of the interfaces involved is existence of libraries of subprograms), the concept of the software component is much more limited. Despite this, however, this more fully in Chapter 17. an important one, and we will review based on a lished in other forms of engineering. In electronics in particular, the idea of replacing lished in other forms of engineering. one and plugging in the other has made one unit with another simply by unplugging and electronic equipment into a relatively the maintenance and upgrading of electrical straightforward task. this is generally achieved with some form of existence. For electronic components Modularity structuring makes it possible for a given The use of an appropriate form of modular a set of smaller components. Once again, modu- problem to be considered in terms of to software: this principle has long been estab- larity is not a concept that relates only Unfortunately only the last of these readily scales up for use in design, although all the last of these readily scales up Unfortunately only forms. There are no ready to detailed design documentation could possibly be applied architectural complexity of currently be used to help assess the measures that can tools can help – see Bowman for object-oriented forms (although a design other than et al. and possibly efficiency. ability and testability as well as reliability n n n n

76 Design qualities SDC04 9/18/07 10:43 AM Page 76 AM Page 10:43 9/18/07 SDC04 77 Quality attributes of the design product Desirability High Moderate Necessary Undesirable Undesirable , 1974; Yourdon and Constantine, , 1974; Yourdon and et al. as by means of a procedure call A passes a parameter to B that is used in B to ‘flag’) determine the actions of B (typically a boolean A and B contain references to some shared data area that incorporate knowledge about its structure and organization. Any change to the format of the block requires that all of the modules using it must also be modified Features or Modules A and B communicate by parameters data items that have no control element data Modules A and B make use of some common type (although they might perform very different functions and have no other connections) such A transfers control to B in a structured manner is a measure of intermodule connectivity, and is concerned with identi- connectivity, and is concerned is a measure of intermodule Forms of module coupling. In general, the forms of coupling listed are somewhat biased towards modules In general, the forms of coupling listed Coupling Two useful quality measures that have long been used for the purpose of assessing measures that have long been used Two useful quality : The forms of coupling that can exist between modules A and B have been ranked in decreasing modules are easy to replace; are easy modules (and so aiding comprehension feature of a problem, captures one each module as a team; for designing as providing a framework as well hence maintenance), for another problem. easily be reused module can a well-structured Common-environment coupling Control coupling (i) Activating (ii) Coordinating Form Data coupling Stamp coupling connections. Table 4.2 summarizes the principal forms of coupling that are generally connections. Table 4.2 summarizes of design features. regarded as being significant in terms rather than on such forms as the class. The based on the procedure, or subprogram, to the different ways of invoking procedures, measures of coupling are generally related and were used to identify the complexity of a system in terms of the form and inter- identify the complexity of a system and were used to the basic unit of modular- component modules. In the original work, dependence of the are still valid for such be the subprogram unit, but the concepts ity was assumed to and the Java ‘class’. the Ada ‘package’, the Modula-2 ‘module’ modular forms as between modules and the ‘strength’ of these fying the forms of connection that exist 1979), based upon observations of the problems arising when developing large systems, observations of the problems arising 1979), based upon order of desirability. Note Table 4.2 larity should be related to such quality concepts as maintainability, testability and to such quality concepts as larity should be related and reliability too. (possibly) to usability and ‘cohesion’. These structuring in software are ‘coupling’ the extent of modular in the early 1970s (Stevens terms were defined n n n use of modu- are seeking, the successful that we of the design properties So in terms SDC04 9/18/07 10:43 AM Page 77 AM Page 10:43 9/18/07 SDC04 is rarely extent ., 1974) and was added later in Yourdon and , rather than procedural ones, such as the sub- et al class during design, and determining their during design, and presence is the basis of modular structuring, an example of functional is the basis of modular structuring, , is that our ideas about the ranking order of the more desirable class , turn, provides a measure of the extent to which the components in its method Table 4.3 lists the main forms of cohesion (sometimes termed ‘associations’) that Table 4.3 lists the main forms of cohesion Cohesion This form of coupling is therefore likely to arise from a failure to perform the This form of coupling is therefore This form typically arises when one of the parameters of a procedure is used to arises when one of the parameters This form typically As an example of the point about the extent of coupling being less critical in design point about the extent of coupling As an example of the A problem with the basic concepts involved in coupling and cohesion is the in coupling and concepts involved with the basic A problem forms may then need some revision. (The overall distinction between desirable and forms may then need some revision. (The overall distinction between now consider undesirable is unaltered though.) The main issue is whether we should to this is procedural association, which is very much concerned with sequencing of to this is procedural association, which is very much concerned with sequencing form was not operations, and hence fits less easily with the packaging concept. (This included in the original list (Stevens within a con- Constantine (1979).) However, one consequence of re-interpreting these text of packaging units such as the program or relatedness might be a stack class that contains only a set of public methods for access- relatedness might be a stack class that structure for the stack itself. Such a class can be ing the stack, together with the data cohesion, since all its components are present considered as exhibiting functional stack facility. solely for the purpose of providing a cohesion is quite easily related to packaging are generally recognized. As can be seen, to procedural units. Perhaps the main exception forms of modular structure, as well as therefore to identify its presence. Any notion of its ‘extent’ is harder to determine, and therefore to identify its presence. Any of doubtful value if achieved. ‘functionally related’. The ideal module is one in of a module can be considered to be as being solely present for one purpose. which all the components can be considered Where the Java ing routine to indicate which variant of the task needs to be performed. In other words, ing routine to indicate which variant classic example of a situation in which this may it acts as a ‘fix’ for a design error! (A program, such as an assembler, compiler or occur is in writing any form of multi-pass of fairly low-level tasks that need to be repeated, link-editor. These all have a number differ slightly on each pass.) but which on inspection are seen to any form of design assessment the need is detailed design tasks adequately. In making ordinating control coupling, sometimes termed ‘switch coupling’. coupling, sometimes termed ‘switch ordinating control task. This in turn may arise that the procedure is to perform its determine the way sections of a program, and is invoked from a number of different where a procedure task it performs may differ late stage, it may be realized that the where, at a fairly parameter is then added to enable the invok- slightly according to section. The ‘switch’ scope to identify their scope to identify their of performing such oper- coupling, there is at least the possibility practicable. With exchanged and so on, but even links, using sizes of data structures ations as counting such measures is somewhat limited. then the value of any can consider the case of co- presence of particular forms, we assessment than the and to the use of different parameter-passing mechanisms. However, the concept can the concept However, mechanisms. parameter-passing of different the use and to of the packaging with concerned 1979), (Parnas, hierarchy to the ‘uses’ be applied also of at a number making design decisions used as a guide in and so can be information, levels of abstraction. different this is less of an issue However, measures systematically. of quantifying these difficulty there is only really structures, since for assessing program process than for the design

78 Design qualities SDC04 9/18/07 10:43 AM Page 78 AM Page 10:43 9/18/07 SDC04 79 Quality attributes of the design product Definitely not Desirability High Quite high Fairly Not very Not very Definitely not association since it sequential mechanism. The point is relatively minor, class The elements of the module are related by the order in which The elements of the module their operations must occur that are related by the time at The elements involve operations being linked to some event such as which they occur, usually ‘system initialization’ that are logically similar, but The elements perform operations actions internally which involve very different by any conceptual link (such The elements are not linked coding tasks) modules may be created to avoid having to repeat Features of a single problem- contribute to the execution All the elements related task to module form the inputs from one element of the The outputs another element with operations that use the same All elements are concerned input or output data association to be ranked higher than association to be ranked higher than The principal forms of cohesion. forms The principal Where this principle is applied, knowledge about the detailed form of any data Where this principle is applied, knowledge about the detailed form of While almost any general textbook on software engineering will contain a discus- While almost any general textbook on Cohesion is probably even more difficult to quantify than coupling; however, it Cohesion is probably even more difficult Logical Coincidental Communicational Procedural Temporal Form Functional Sequential communicational Table 4.3 Table structures within a module is kept concealed from any other software components that structures within a module is kept concealed from any other software components be provided may use the module. In many cases, a number of ‘access procedures’ may designer to keep information about the detailed forms of such objects as data struc- designer to keep information about the detailed forms of such objects as informa- tures and device interfaces local to a module, or unit, and to ensure that such like the tion should not be made ‘visible’ outside that unit (Parnas, 1972). Again, (Parnas, preceding concepts, it was first recognized through a process of observation 1999). ‘structured design’ school of textbooks. Probably two of the most thorough ones are ‘structured design’ school of textbooks. (1979) and Page-Jones (1988). those provided in Yourdon and Constantine Information-hiding modularity, but it also incorporates additional This concept is related to that of in a system. The basic concept encourages the notions about managing information does provide a measure that can be used to help the designer with assessing the relat- does provide a measure that can be of finding ways of measuring its presence ive merits of possible options. The challenge therefore been one of considerable interest to in an acceptably objective way has 1998). metrics researchers (Bieman and Kang, detailed discussions are usually to be found in the sion of coupling and cohesion, more more fully exploits the facilities of the more fully exploits the facilities of the about quality may change with the evolution of but it does illustrate how our ideas implementational forms. SDC04 9/18/07 10:43 AM Page 79 AM Page 10:43 9/18/07 SDC04 ‘Scope wall’ prevents ‘Scope wall’ any direct references to the being made the data elements in contains structure that the stack. 10 55 101 stack integer pop():integer); push(x:integer); Example of information-hiding used with a module that provides an integer stack. used with a module that provides Example of information-hiding The detailed forms in which these attributes manifest themselves in software sys- The detailed forms in which these attributes manifest themselves in software Powerful though the concept is, it is difficult to make use of it in any procedural Powerful though the concept is, it is This interface then conceals the detailed design decisions about how the stack is to This interface then conceals the detailed As an example, this principle might be used in designing a module to provide an As an example, this principle might push an integer onto the stack pop an integer from the stack test for an empty stack Procedures (methods) provide the means of using the stack, but convey no details about how it is organized. expected to make it difficult to read and understand the designer’s intentions and to expected to make it difficult to read and understand the designer’s intentions make the resulting system difficult to modify. tems are somewhat elusive, although the concepts involved are generally quite tract- tems are somewhat elusive, although the concepts involved are generally is to examine able. A useful aid to considering the extent of their presence in a design This it for signs of those features that indicate that a design may lack these qualities. that are the involves identifying a suitable set of features corresponding to attributes can be inverse of those mentioned above. The presence of any of these features stack. to devise a set of tests to identify its use. In practices for design, and equally difficult clearly related to both reliability and maintain- terms of system quality factors it is memory use, it is apt to conflict with ideas of ability. In terms of processor time and of a hierarchy of access procedures may lead to efficiency on occasion, since the use reduced run-time performance. as is shown schematically in Figure 4.5. its integrity by preventing ‘short-cut’ access be implemented, which helps to ensure also makes it possible to change the detailed form directly from other program units. It changes in any of the units that make use of this of implementation without requiring integer stack facility to support a set of reverse Polish calculations using integers. Using integer stack facility to support a set one would seek to conceal the form adopted for the principle of information-hiding, a set of procedures for accessing it, such as: implementing the stack, and provide to give controlled forms of access to the ‘clients’ of the module. The effect is to provide of access to the ‘clients’ of the to give controlled forms to it. information, preventing direct access a ‘scope wall’ around Figure 4.5

80 Design qualities SDC04 9/18/07 10:43 AM Page 80 AM Page 10:43 9/18/07 SDC04 81 Quality attributes of the design product , which is concerned with issues such as project , which is concerned with issues such , which is concerned with assessing the quality of a , which is concerned with assessing the technical review management review While a cannot provide any well-quantified measures of ‘quality’ (if While a design review cannot provide any well-quantified measures of ‘quality’ Technical reviews can include the use of forms of ‘mental execution’ of the design Technical reviews can include the use Identifying attributes that are the direct inverses of those described above is a above described of those inverses direct are the that attributes Identifying well focused in terms of their purpose, and may well be parametrized for use on dif- well focused in terms of their purpose, ferent tasks. ules where the designer has chosen unsuitable interfaces and data structures. has chosen unsuitable interfaces ules where the designer in module interfaces: of information. This can also be reflected Needless replication a parameter, when only one may pass a complete record as for example, procedures is relevant to their operation. field of the record strength’. Program units of this type are not Using modules that lack ‘functional Using interfaces that are too complex. In programming terms these are usually are too complex. In programming Using interfaces that some of which may that have too many parameters, characterized by procedures likely to be identified by the In design terms, they are more not even be necessary. flow associated with them. degree of information may indicate design mod- complex control structures. This The use of excessively Having many copies of ‘state’ information spread around the system. This com- around the information spread copies of ‘state’ Having many in system lead to inconsistencies and may updating of information, plicates the behaviour. been assembled from experience (Yourdon, 1979; Weinberg and Freedman, 1984; been assembled from experience (Yourdon, a technique, though, it is essential to distin- Parnas and Weiss, 1987). In using such guish between the design, and the 4.3.2 quality design Assessing useful in assessing design structure and likely A technique that has proved itself (also sometimes termed an inspection). The behaviour is the review, or walkthrough well established, and a set of basic rules has use of reviews for this purpose is quite These characteristics have been expressed largely in terms of implementation features, These characteristics have been expressed are more readily quantified. However, they can since these are more familiar and although extracting the information is equally well be assessed for design descriptions, of automatic analysis (Rising and Callis, 1994). less easily achieved through any form n n n n significant problem. However, the following undesirable characteristics of a design can of a design characteristics undesirable following the However, problem. significant inverse properties. the presence of the to stem from be considered n such a thing is even possible), it can help to identify weaknesses in a design, or poten- such a thing is even possible), it can help to identify weaknesses in a design, a means tial weaknesses that might arise as details are elaborated. It therefore provides model, and so can help with assessing dynamic attributes as well as static ones. The model, and so can help with assessing dynamic attributes as well as static need to references cited above provide some valuable guidelines on how such reviews that are be conducted in order to meet their aims and not to become diverted to issues that the re- more properly the province of the management review. It is also essential design itself. view does not become an assessment of the design team, rather than of the deadlines and schedule. This section and the next are concerned only with the role per- deadlines and schedule. This section review. formed by the first of these forms of SDC04 9/18/07 10:43 AM Page 81 AM Page 10:43 9/18/07 SDC04 reviews is design inspections does not necessarily support inspections does not code This section ends with a summary of those properties of a design that Parnas and a summary of those properties This section ends with for a good design are that it should be: The eight requirements that they identify Reviews and inspections have undoubtedly proved to be a successful mechanism, have undoubtedly proved to Reviews and inspections standardized: using well-defined and familiar notation for any documentation. standardized: using well-defined and flexible: able to accommodate likely changes in the requirements, however these flexible: able to accommodate likely might arise; the required facilities, neither more nor practical: module interfaces should provide less; software and hardware technology; implementable: using current and available well structured: consistent with chosen properties such as information-hiding; well structured: consistent with chosen as possible, but no simpler’; simple: to the extent of being ‘as simple be computed using the available resources; efficient: providing functions that can adequate: meeting the stated requirements; design process is obviously an important factor that needs to be considered when seek- design process is obviously an important factor that needs to be considered ing to understand design quality issues. 4.4 process the design Assessing struc- Any design product emerges as a result of some form of design process, however process can tured or unstructured this might be. So while no degree of quality in the of the actually ensure some particular degree of quality in the product, the quality n significance in the context of a review, since the The last point obviously has special comprehend the ‘mental models’ developed by reviewers must be able to capture and this much harder if the notation used is unfamil- the designers. They are likely to find iar and itself undocumented. n n n n n n n unclear, but certainly the size of these is an issue to consider with care. the size of these is an issue to consider unclear, but certainly hence should be studied in a should be the designer’s goals and Weiss (1987) believe we have met already in this Most of them are properties that technical design review. repeating at this point. book, but they bear although as Glass (1999) paraphrases rather neatly: ‘inspection is a very bad form of (1999) paraphrases rather neatly: ‘inspection although as Glass However, as Glass has also all the others are much worse’. error removal – but of research on observed, an examination of meetings with more than review meetings, and certainly not the use of ‘traditional’ apply to Whether the same conditions two or three participants. of answering the second question posed at the start of this section: ‘How can informa- can ‘How of this section: the start posed at question second the of answering state the present In documents?’ design from be extracted attributes about these tion of both extract- offers the best means review probably the technical design of the art, In particular, if care- quality of a design. relating to the information ing and assessing have both the domain those people who it brings together and organized, fully planned realistic projections is needed to make knowledge that and the technical knowledge available design information. from the

82 Design qualities SDC04 9/18/07 10:43 AM Page 82 AM Page 10:43 9/18/07 SDC04 83 Assessing the design process Managing the , and occasionally even , and occasionally ad hoc (Humphrey, 1991), has drawn together a valuable Watts Humphrey has drawn together (Humphrey, 1991), . Continuous process improvement is enabled by quantitative feedback . Continuous process improvement is . Basic project management processes are established and used to track . Basic project management processes . Detailed measures of the software process and product quality are col- . Detailed measures of the software . The software process for both management and engineering activities . The software process for both management . The software process is characterized as . The software process To improve the quality of the design process it is particularly necessary to find To improve the quality of the design process it is particularly necessary The material of the preceding sections and chapters will have made it clear why The material of the preceding sections Experience seems to suggest that this is so, and that even for the more quantifi- to suggest that this is so, and that even Experience seems Our study of the nature of the design process so far has shown that it typically that far has shown so design process of the the nature study of Our experience from similar projects, wherever available. domain knowledge about the type of problem involved, and about important domain knowledge about the type of problem involved, and about aspects of any implementation features; used; method knowledge that helps with understanding any design techniques being Managed the products are quantitatively understood lected. Both the software process and and controlled using detailed measures. Optimizing ideas and technologies. from the process and from testing innovative cost, schedule and functionality. The necessary process discipline is in place to cost, schedule and functionality. The similar applications. repeat earlier successes on projects with Defined into an organization-wide software is documented, standardized and integrated and approved version of the organization’s process. All projects use a documented software. process for developing and maintaining Initial depends upon individ- are defined, and success in a project chaotic. Few processes ual effort. Repeatable n ways of including input to design activities that can provide: n n the design solution developed for a system will be much more strongly problem- the design solution developed for that might be adopted for coding, or the oriented than (say) the structuring practices This is most certainly not an argument against testing strategies that might be used. the design process, but it does indicate why, seeking to find quality measures for by the overall development process, it is regardless of the levels that may be achieved the point of being repeatable. hard to get the design phase even to n n n occur in the processes that an organization uses for producing software systems. that an organization uses for producing occur in the processes n n able tasks involved in software development, such as coding and testing, the existing in software development, such as able tasks involved In his book and of quality are rather limited. measures of productivity Software Process processes. In particular, issues applied to software development survey of quality five levels of maturity that Process Maturity Model’, he identifies within his ‘Software involves the designer in building a ‘model’ of the end system, and then exploring ways exploring and then system, of the end a ‘model’ building in the designer involves opportunistic design also seen that 1970). We have that model (Jones, of realizing even where struc- and Hoc, 1990), for these tasks (Visser are widely used techniques that the creative reasonably expect in use. So we might practices are also tured design not readily lend itself development does of software this phase in the process nature of quality. measures of to any rigorous SDC04 9/18/07 10:43 AM Page 83 AM Page 10:43 9/18/07 SDC04 the means of gaining both domain knowledge and some both domain knowledge and the means of gaining are primarily concerned with developing and refining estim- are primarily concerned quality in either the design product or the design process, it quality in either the design product were outlined in the previous section; their use allows the design section; their use in the previous were outlined ensure Once again the quality of design documentation (and in larger projects the quality Once again the quality of design documentation for design, and of specific forms of design While the use of standard notations Of these three, it is the management review that is most likely to involve making Of these three, it is the management Prototyping provides context, prototyping may about a particular problem. (In this forms of experience ‘exploratory’ or ‘experi- what Floyd (1984) has termed the be considered to play therefore be possible to suitable prototypes, it may mental’ role.) By constructing available to both management and the supplement the knowledge and experience design team. might be applicable to a particular problem. might be applicable Management reviews with gathering any data for the project as a whole, and ates of effort and deadlines is one that draws for such estimates. The task of estimation that might be needed since it requires the use of domain knowledge and experience, heavily upon both projections needed. these to make the Technical reviews Technical from any of others, and particularly the experiences knowledge from team to gain this form of input possess. While that they might method knowledge domain and have a significant it can also the design product, aimed at improving is largely or notations that useful techniques by identifying the design process impact upon While the use of abstraction is an important tool for the designer, it makes it difficult to make While the use of abstraction is an important tool for the designer, it makes it difficult any direct product measurements during the design process. concepts are concerned with assessing both the static structure and the Software quality concepts are concerned with assessing both the static structure dynamic behaviour of the eventual system. for deter- The ultimate goal of quality must be that of fitness for purpose, although the criteria whether this is achieved will be both problem-dependent and domain-dependent. Summary n n n the more technical issues affecting software design. the more technical issues affecting software the following points are particularly significant. In examining ideas about ‘good’ design, of any configuration and control procedures used for organizing this documentation) of any configuration and control procedures a high-quality process by reusing experience. plays an important role in establishing practice, cannot is likely to be highly influential. We are therefore should be clear by now that their use to begin examining their roles in terms of now in a good position, in the next chapter, some form of assessment of the way that a design is being developed, and which may some form of assessment of the way two forms. The use of reporting and tracking provide a framework for using the other role in monitoring quality issues, and with ensur- mechanisms will play an important during a review. ing that these issues are actually addressed 3. 2. There are three widely adopted ways of providing these inputs to the design process. design to the these inputs ways of providing adopted widely are three There 1.

84 Design qualities SDC04 9/18/07 10:43 AM Page 84 AM Page 10:43 9/18/07 SDC04 85 Exercises in terms J. Systems efficiency consider how you Addison-Wesley reliability, usability, maintainability, reusability, reliability, usability, maintainability, reusability, Managing the Software Process. Managing the Software , 259–65 7 , sells electrical goods. preted and applied. Do they help with identifying any changes that would be desirable? and system facilities (such as windows). Consider how you would measure and system facilities (such as windows). Consider two programs that you have written most recently. of these and identify your priorities for the that might help to ensure that these are met. organization and suggest some basic rules would rank them in order of importance for each of the following systems: would rank them in order of importance for (a) a process control system for a that produces toxic insecticides; (b) accounts; a bank autoteller network used to issue cash and short statements describing (c) at each branch of a chain of stores that an interactive database used for stock control Technical design reviews can provide a valuable means of obtaining and using domain know- domain and using obtaining means of a valuable can provide reviews design Technical to aid with well as method knowledge design product as with assessing the ledge to aid the design process. assessing tutorial. Posted at www.cl.cam.ac.uk/~afb21/CognitiveDimensions & Software Exercises Further reading 4.4 simple) website, consider how the ideas in Table 4.2 would need to be inter- For a (relatively 4.3 planning a design review in your own List the criteria that you would expect to be used in 4.2 processor time, memory, devices A computer program uses a number of resources, including dimensions, supported by some illuminating illustrations. dimensions, supported by some illuminating 4.1 Given the four ‘ilities’ One of the very few books to examine the context within which software is produced, and to books to examine the context within which One of the very few development process. study the nature of the of Information Artefacts: a A.F. (1998). Cognitive Dimensions Green T.R.G. and Blackwell survey of the concepts involved in cognitive A tutorial document that provides a comprehensive Parnas D.L. and Weiss D.M. (1987). Active design reviews: Principles and practices. D.M. (1987). Active design reviews: Parnas D.L. and Weiss process and identifies (from experi- on the use of reviews in the design A short paper that focuses as possible. with making design reviews as effective ence) some rules to assist Humphrey W.S. (1989). n SDC04 9/18/07 10:43 AM Page 85 AM Page 10:43 9/18/07 SDC04 SDC04 9/18/07 10:43 AM Page 86 SDC05 9/18/07 10:45 AM Page 87

part 2 Transferring Design Knowledge

Chapter 5 Describing a Design Solution 89

Chapter 6 Transferring Design Knowledge 105

Chapter 7 Some Design Representations 127

Chapter 8 The Rationale for Method 175

Chapter 9 Design Processes and Design Strategies 193

Chapter 10 Design Patterns 213 SDC05 9/18/07 10:45 AM Page 88 SDC05 9/18/07 10:45 AM Page 89

chapter 5 89 Describing a Design Solution

5.1 Representing abstract ideas 5.3 Forms of notation 5.2 Design viewpoints for software

Much of the discussion of the book has so far concentrated on examining the actions that are involved in the process of design, and the con- straints that affect these. The preceding chapter began to consider the attributes possessed by the particular design medium of software; now this chapter starts to examine some of the ways in which these different attributes can be described and modelled by the designer. notations to provide visual box and line is used to provide a particular abstraction of the characteristics is used to provide representation Software designers similarly use a range of levels of abstraction, although the Software designers similarly use a Representations can also be employed across a wide range of levels of abstraction. Representations can also be employed A explaining the designer’s ideas to others (such as customers, fellow designers, ideas to others (such as customers, explaining the designer’s implementors, managers); and completeness in a solution. checking for consistency capturing the designer’s ideas for a solution; capturing the designer’s chapters. * by the use of abstract notations, as we will see in later Of course, the design process can itself be represented between representation and implementation. We will examine this further in Section between representation and implementation. We will examine this further tend to 5.3. For the moment, we should simply note that software design techniques make extensive use of various forms of descriptions that are intended to represent the various properties of software. ‘white box’ description, it is still an abstraction from the final physical realization of ‘white box’ description, it is still an will be used in the circuits. the cables, switches and sockets which a particular problem in terms of how to describe invisible nature of software provides representation used in Figure 5.1 is fairly self- the properties involved. Whereas the 5.2 has a fairly distinct link to the physical explanatory, and even that used in Figure for software does create a conceptual gap realization, the lack of any ‘visual’ properties For example, in Figure 5.1 we provide a ‘sketch’ of a building, which might be con- For example, in Figure 5.1 we provide a ‘black box’ description, providing only a (par- sidered to provide a good example of of the building. Figure 5.2 provides a very tial) description of the external appearance property of the same building, in the form of a different representation of a specific electrical circuitry. While this is clearly a description of a small part of the internal attention upon the issue that is most important to them at any particular stage of attention upon the issue that is most aids the designer by providing a mechanism for the design process.* In particular, it overload’. Indeed, as Vessey and Conger (1994) reducing the problem of ‘information resort to various ways of effectively increasing have observed: ‘human problem-solvers as well as using external memory devices and/or the capacity of short-term memory In this context, therefore, a representation techniques to support working memory’. an ‘external memory device’. can also be considered as providing n n can help the designer to concentrate his or her A representation, whatever its form, the various relationships that will exist between these. While this is a general design these. While this will exist between relationships that the various nature of software adds specific to software design, the ‘invisible’ requirement, and not its own. some problems of as: typically needed for such purposes of a system, and is n 5.1 ideas abstract Representing allowing the designer design process, by role in the performs an essential Abstraction are the most import- or its solution that of a problem on those features to concentrate the designer of the design. Therefore in the development particular stage ant at any objects, and about problem and design ideas about to represent abstract needs ways

90 Describing a design solution SDC05 9/18/07 10:45 AM Page 90 AM Page 10:45 9/18/07 SDC05 91 Representing abstract ideas Example of a ‘physical’ description of a building. Example of a ‘physical’ Example of a part-description of the electrical distribution for the building. Example of a part-description of the electrical However, this should not constrain one’s thinking about how design represen- However, this should not constrain one’s thinking about how design Historically, a major use for representations has been to provide support for par- Historically, a major use for representations Figure 5.1 to describe their ideas. Representations can be associated with problem models and to describe their ideas. Representations can be associated with problem process. solution (program) forms, quite independently of any particular form of design representations to form the inputs and outputs for the various transformations it uses. representations to form the inputs and outputs for the various transformations can any form tations should be used. Although design methods use representations, so not. Indeed, of design activity, whether it be graced with the name of a ‘method’ or defined it is likely that most software is designed without the use of a particular ‘method’, but that is not to imply that designers do not use any form of representation Figure 5.2 design method makes use of a particular set of ticular steps in a design method: each SDC05 9/18/07 10:45 AM Page 91 AM Page 10:45 9/18/07 SDC05 . Many of us are familiar with the type of . Many of us are familiar viewpoint The four principal viewpoints as projections from the design model. We should note here that the use of the term ‘viewpoint’ in this book does differ We should note here that the use of The notion of a viewpoint puts a particular emphasis upon the role of a repre- The notion of a viewpoint puts a particular Because representations provide particular abstractions of a system, they are provide particular abstractions Because representations Nor should the association between methods and representations be regarded as regarded be representations and methods between association should the Nor Figure 5.3 1992). (There may, of course, be more than one representation that can be used to 1992). (There may, of course, be more to a particular viewpoint, a point that will be describe the properties corresponding examined further later in this chapter.) to be used in , where the somewhat from the way that it is apt sentation. A representation is the means that we use to capture certain properties of a sentation. A representation is the means as being the design itself. This concept of the design, and it should not be regarded model is illustrated in Figure 5.3. When using this viewpoint as a projection of a design the different viewpoints as encompassing parti- conceptual framework, we can regard model, and the representations are then the means cular sets of properties of the design attributes or characteristics (Brough, that are used to describe the corresponding drawing can be considered as describing the ‘physical’ appearance of the object. as describing the ‘physical’ drawing can be considered will also provide an abstract in Figure 5.2, the wiring plan However, as demonstrated different from the physical building, although it may look very representation of the ways, they need to be kept con- are very different in many plan. While these viewpoints through references to common attributes of sistent at the points where they ‘intersect’ design objects. reason the discussions of representations and methods have been separated in this of representations and methods reason the discussions representations can be power of abstraction provided by different book, so that the than that of a particular method. seen in a wider context concept of a closely linked to the other physical objects. Such a is used for describing buildings and plan drawing that particularly rigid, so that the adoption of a method precludes in some way the use of some way the use precludes in adoption of a method rigid, so that the particularly is to of design with it. The objective normally associated that is not any representation this (To some extent in its use of a form! correct’ not to be ‘politically solve problems, of consequence is a natural enough representation forms of method with association considering particu- the designer into the method guides method, since using a design that these.) For notations to support so into using specific in sequence, and lar issues

92 Describing a design solution SDC05 9/18/07 10:45 AM Page 92 AM Page 10:45 9/18/07 SDC05 93 Representing abstract ideas , 1992). So, , 1992). et al. of the model. Conceptually the two are not very different, in the two are not Conceptually of the model. of the properties of the model outwards to the users, its use in outwards to the of the model of the properties Examples of representations as realizations of viewpoints. perceptions projections The next section examines more closely the ways in which these concepts can be The next section examines more closely Of course, these projections need to be kept consistent with one another, in order Of course, these projections need to Returning for a moment to the description of a building that was used in the earl- to the description of a building Returning for a moment a wiring diagram captures the attributes that are concerned with the logical organ- the attributes that are concerned a wiring diagram captures of electrical power and its control. ization of the distribution ‘plan’ diagrams capture the attributes that are concerned with spatial dimensions, the attributes that are concerned ‘plan’ diagrams capture like; accessibility, and the can only check for consistency between forms, and so cannot use the model itself to can only check for consistency between in any absolute sense. check that the representations are ‘correct’ In particular, it considers the principal features used in the domain of software design. to maintain a consistent design model. Since each representation describes a set of to maintain a consistent design model. some intersection between the different sets of design properties, there is frequently of checking for consistency between the corres- properties, and hence some means 5.5 shows this concept in a symbolic manner. ponding forms of representation. Figure is captured only through the representations, we Unfortunately, since the design model n (mental) design model for particular projections of the ’s However, both are means that the architect can such representations are the only real the building. Indeed, to others. Even so, the representations are not the use to convey ideas about the design from it, as is illustrated in Figure 5.4. design model, they are only projections n term is used to describe ‘stakeholder’ views of the model (Finkelstein model (Finkelstein of the views ‘stakeholder’ describe is used to term ier example, we can now see that: ier example, we can whereas its use in this book is much more focused upon the model-centred idea of idea of the model-centred upon focused much more book is in this its use whereas providing with the users’ being concerned much more inward-facing, context is the requirements particular but and the model, between the user the interface are concerned with that both begins from the user. model, the other begins from the whereas one Figure 5.4 SDC05 9/18/07 10:45 AM Page 93 AM Page 10:45 9/18/07 SDC05 design needs, which are often con- properties, the designer usually needs forms properties, the designer usually needs solution-oriented system-oriented Intersecting attributes for different representations. The nature of software and the many paradigms that exist for developing software The nature of software and the many paradigms that exist for developing In order to describe design representations (Webster, 1988; Harel, 1992; Wieringa, 1998). These can be design representations (Webster, 1988; Harel, 1992; Wieringa, 1998). broadly classified as follows: operations. For more detailed hierarchy, cerned with describing ‘constructional’ issues such as packaging, procedure attributes. and data organization, the chosen forms will generally focus on static design This change of emphasis during design is illustrated in Figure 5.6. number of systems, based on different structuring criteria, has led to the use of a large only an abstraction (which adds to the complications of describing it with abstract only an abstraction (which adds to process. So in order to formulate and explore the forms), it is also the description of a use a set of description forms that are able to design model, a designer needs to properties of a system. describe both the static and the dynamic of the system. Such forms tend to emphasize fea- that describe the dynamic behaviour around a system, or the sequencing of tures such as the flow of data or information used to describe the characteristics that reflect these features. used to describe the characteristics that 5.2 for software viewpoints Design of software is its dynamic nature. Software is not Perhaps the most distinctive property Figure 5.5 the ways in which design representations can be that distinguish software systems, and

94 Describing a design solution SDC05 9/18/07 10:45 AM Page 94 AM Page 10:45 9/18/07 SDC05 95 Design viewpoints for software Changes of viewpoint with evolution of the overall design model. Changes of viewpoint These representations can all be classified as ‘direct’ viewpoints, in that they are These representations can all be classified data-modelling forms, concerned with the data objects used within the system, and data-modelling forms, concerned with the relationships between these. constructional* forms, in which the viewpoint is concerned with essentially static constructional* forms, in which the aspects of the system; that seek to describe the causal links behavioural forms, a set of viewpoints during execution; between events and system responses to describe what the system does in terms of functional forms, viewpoints that seek its tasks; can themselves be ‘structured’. Hence for this edition we have preferred the use of ‘constructional’ to make the can themselves be ‘structured’. Hence for this edition we have preferred the use of ‘constructional’ emphasis clear. a solution. However, this unintentionally introduced a note of ambiguity, in that all of the viewpoint descriptions a solution. However, this unintentionally introduced a note of ambiguity, in that all of the viewpoint * for these forms, on the basis that they described the structure of In the first edition we used the term ‘structural’ Figure 5.6 some form of in order to ‘execute’ a design (Harel, 1992; Friel and Budgen, some form of interpreter in order to ‘execute’ a design (Harel, 1992; Friel in terms 1997); here the output from the interpreter forms the derived viewpoint based on the of some sequence of states or diagrams. (This particular example is ties that a designer needs to consider. further class of viewpoints can be described as created directly by the designer. A 1992), shown in Figure 5.7; in these some ‘derived’ viewpoints (Budgen and Friel, model in order to generate a ‘new’ represen- transformation is applied to the design derived viewpoint is that produced by the use of tation form. An example of such a n are a number of forms in general use, partly Within each of these broad classes, there require different sets of attributes for their because the many possible relationships ever quite captures all of the proper- description, and partly because no representation n n n SDC05 9/18/07 10:45 AM Page 95 AM Page 10:45 9/18/07 SDC05 header file), and data in the form .h scenarios). While it is less general-purpose ’, provides an object-oriented classification ’, provides an object-oriented classification + 1 View ++ 4 , which may include files of data, files containing information Examples of the use of derived viewpoints within the viewpoints model. Examples of the use of derived viewpoints The rest of this section looks briefly at some of the characteristics of the four The rest of this section looks briefly While the above classification of viewpoints is a useful and practical one, it is While the above classification of viewpoints data specification about the organization of a program (such as a n As the name implies, these are primarily concerned with describing how the various As the name implies, these are primarily concerned with describing how languages, software-structuring forms provided in programming languages, mark-up is there- etc. are to be used in the final system. A characteristic role for this viewpoint Some fore that of describing the outcome of using a design practice such as a method. of the constructional forms described by this viewpoint include: tion that attributes are not necessarily uniquely confined to one viewpoint. tion that attributes are not necessarily section then considers how these can best classes of direct viewpoints. The following diagrams and mathematical forms. be described in terms of the use of text, 5.2.1 forms Constructional further in this book. can classify software design descriptions. As an by no means the only way that we example, Kruchten’s (1994) ‘ (logical, process, development, physical some similarities, including the shared recogni- than the form adopted here, there are observed behaviour of designers in ‘mentally executing’ a design in order to assess its observed behaviour of designers in ‘mentally 1985).) While observation suggests that behavioural aspects (Adelson and Soloway, such viewpoints in an informal way, they do not designers make use of a number of design practices and they will not be explored form part of any currently formalized Figure 5.7

96 Describing a design solution SDC05 9/18/07 10:45 AM Page 96 AM Page 10:45 9/18/07 SDC05 97 Design viewpoints for software , being , where such con- , where such package finite-state machines or the Ada or the Ada class , such as the Java , such as , usually in the form of sub-program organization, but also organization, in the form of sub-program , usually , describing the dependencies that exist between classes (Parnas, 1979). that exist between classes (Parnas, , describing the dependencies , describing how the ‘flow of control’ is managed between program the ‘flow of control’ is managed between , describing how , concerning the sources and forms of data; , concerning the sources Most of these forms can be considered as examples of We should also note that, partly because this form describes the designer’s ideas at We should also note that, partly because While this viewpoint is largely used to describe the outcomes of the design process, While this viewpoint is largely used to Generally, this viewpoint is concerned with modelling static structures rather than Generally, this viewpoint is concerned An important part of the description involves specifying the relationships and of the description involves specifying An important part data flow invocation elements; uses hierarchy system, or to create inheritance . system, or to create of mark-up languages such as HTML (HyperText Markup Language) and XML and Language) Markup (HyperText such as HTML languages of mark-up Language); Markup (Extended execution threads of of execution; parallel threads constructs for handling including constructs packaging sections of the ‘scope wall’ around some form of be used to construct structs may system. 5.2.2 forms Behavioural causal issues, connecting an ‘event’ to a ‘response’ These are essentially concerned with tend to be far more abstract than the previous via any necessary conditions. These forms compilable entities that have definite syntax class, which are usually concerned with forms are more likely to be concerned with and semantics. In contrast, behavioural across a number of the physical elements in a operations that may actually be spread tioning major elements of functionality rather than being constructional in nature. tioning major elements of functionality detailed notations used are usually very depend- relatively low levels of abstraction, the the eventual system. We will discuss this point in ent upon the ‘architectural’ form of rather more detail in Chapter 6. with any form of run-time behaviour. (An attempt was made to combine construc- with any form of run-time behaviour. features in a development of the Structure Chart tional information and behavioural and Constantine (1979), but this does not notation that was proposed in Yourdon degree.) appear to have been used to any significant level when considering major units that might be it can also be used at a more abstract this role is more likely to be one of parti- used in some overall design plan. However, n n n dependencies that will exist between the elements of the system. Typically, these are will exist between the elements of the dependencies that such forms as: n n ability to represent the varied influences of time is rather uneven, as the examples of Chapter 7 will show, and can be summarized thus: concerned with the transitions that occur between different states of (waiting, a system to make processing, output and so on), and the conditions (events) that are required forms are them occur. Being concerned with dynamic relationships (causality), these required to handle some of Our the design properties that are concerned with time. SDC05 9/18/07 10:45 AM Page 97 AM Page 10:45 9/18/07 SDC05 (in terms of structures such than design, for this very reason. sequence analysis . form descriptions are also fairly tractable, although their use is mainly tractable, although are also fairly descriptions (both in compounding types to create new ones, and in such mechan- (both in compounding types to create aspects can be described fairly well; described can be aspects effects are very difficult to capture and describe using existing forms of using existing forms capture and describe very difficult to effects are type For some classes of problem, the choice of data structures is a central one, and can- For some classes of problem, the choice themselves may well be imposed by external Modelling of data structures, which At the detailed design level such forms are generally needed to describe the run- At the detailed design level such forms Behavioural descriptions can be used for both black box modelling roles (con- can be used for both black Behavioural descriptions sequencing sequencing fixed-interval of real-time systems; to particular features restricted constraint description. This section examines how the different forms of notation for constructing represen- This section examines how the different forms of notation for constructing are: tations are used. The three basic components that can be used in a representation Whatever the role, the data-modelling notations do tend to be used primarily in white Whatever the role, the data-modelling notations do tend to be used primarily box roles, due to the relatively detailed nature of the information involved. 5.3 of notation Forms not easily be divorced from the functional issues. Because the viewpoints describing not easily be divorced from the functional nature, and hence more easily handled, there are data structures are essentially static in that are widely used for modelling these a number of well-established representations forms. task for factors, is often seen as being more a While the description of data structures need not be a very significant issue in archi- While the description of data structures aspect of a detailed design. Again, there are tectural design terms, it is often a critical need to be captured. These include such depend- a number of relationships that may encies as: ‘classes’); isms as inheritance, used to create new as trees and lists); and of the initial problem specification, and the algorithmic aspects in particular may be of the initial problem specification, better specified than other features. time behaviour of program elements such as subprograms. 5.2.4 forms Data-modelling 5.2.3 forms Functional exactly what it is that a system tasks for the designer is to describe One of the hardest is difficult to describe in any a problem-driven issue and hence does. This is essentially this may well be one of the better-defined aspects general form. However, in exchange, sidering how the system as a whole will respond to specific events) and white box system as a whole will respond to sidering how the interact in terms of ‘chains’ of how the system elements will modelling (describing has probably become much Overall, their importance and use events and actions). as constructional forms such systems have become larger and also more pervasive as use. have come into more widespread as classes and objects n n n

98 Describing a design solution SDC05 9/18/07 10:45 AM Page 98 AM Page 10:45 9/18/07 SDC05 99 Forms of notation fonts (when available) can help to italic or bold diagram and see what sense it makes!). Their use during the sense it makes!). Their use during diagram and see what any So textual forms are rarely used as the sole means of providing information about So textual forms are rarely used as the The main problems with using text alone are that: The main problems in a form that easily onto lists and tables. Indentation can help with pro- in a form that maps easily onto lists limited, owing to the difficulty of recognizing viding structure, but its usefulness is alignments over long blocks of text; ambiguity, and resolving this can lead to the natural-language forms are prone to text. use of long and complex sequences of any structure that is implicit in the information can easily be obscured, unless it is any structure that is implicit in the information text diagrams expressions mathematical brain (Miller, 1957); but it may be somewhat misused here, since it referred to hand- brain (Miller, 1957); but it may be somewhat misused here, since it referred ling ‘events’ rather than abstractions.) Diagrams have been extensively used in the first four chapters of this book to illustrate Diagrams have been extensively used in the first four chapters of this book of relation- concepts about hierarchy, position, flow of information and other forms simplicity of ship between abstract objects. As with text, diagrams also benefit from that form, and there is probably a ‘natural limit’ to the number of items of information 7 plus or can be easily assimilated when reading a diagram. (Miller’s ‘magic number’, the human minus 2, is much quoted in this context of handling information within 5.3.2 forms description Diagrammatical This shows that text is often most effective in conveying information when it is used This shows that text is often most effective in small blocks or tables. The use of n In particular, ‘structured’ forms such as ordered lists and tables provide a ready means forms such as ordered lists and In particular, ‘structured’ lists and numbered lists appear – many examples of ‘bullet’ of referring to information such mechanisms are therefore a summary is a form of abstraction, in this book. Since too. useful to the designer n all of the text from all of the text from need not be mutually exclusive. design process also 5.3.1 forms description Textual not just for design. used as a means of summarizing information, Text is very widely n n n neither of the latter any sense: indeed, exclusive in these are not mutually Of course, (try removing a textual component very much use without is likely to be of two forms this role is the use of standard ‘pro-formas’ in the SSADM method (Longworth, 1992) this role is the use of standard ‘pro-formas’ certain design decisions. The use of a standard in order to capture information about overcome the problems of producing and read- form provides the structure needed to ing free text. highlight items, but the effect of this is rapidly lost if used to excess. (In handwritten highlight items, but the effect of this substitute.) material, underlining acts as an adequate a supplementary role. A good example of text in design ideas, although they can play SDC05 9/18/07 10:45 AM Page 99 AM Page 10:45 9/18/07 SDC05 The traditional flowchart notations: (a) Some of the symbols used; Historically, the earliest form of diagram associated with software design is form of diagram associated Historically, the earliest Diagrammatical notations are very widely used in software design, as in many design, in software used widely are very notations Diagrammatical already referred to what we have all of them are also pragmatic reasons, For largely Figure 5.8 (b) A simple example of a flowchart. as representative as any other visual form might be. Curiously, given their long history any other visual form might be. Curiously, as representative as little research into the cognitive of form, there appears to have been of use and variety notations to describe software properties. aspects of using such main symbols that are used in Figure 5.8 shows some of the probably the flowchart. of the form. As sometimes together with a very simple example drawing flowcharts, forms of design activity. Indeed, most of the forms that will be discussed in this book in this be discussed that will the forms most of Indeed, activity. of design forms this very briefly at be discussed only their properties will and so are diagrammatical, point. a pencil, or sketched produced with diagrams are easily line’ forms. Such as ‘box and are of software, they characteristics absence of any visible and, in the on a whiteboard

Describing a design solution 100 SDC05 9/18/07 10:45 AM Page 100 AM Page 10:45 9/18/07 SDC05 Forms of notation 101 hierarchical organ- . This occurs where one or more forms of ‘diagram element’ can themselves be . This occurs where one or more forms of ‘diagram element’ can themselves As a footnote to this discussion: the use of colour is probably best restricted to pre- As a footnote to this discussion: the use of colour is probably best restricted A further useful property of many forms of diagram is that of A further useful property of many forms As mentioned earlier, a desirable quality in any diagrammatical form of represen- As mentioned earlier, a desirable quality For most users, diagrams are usually the most effective way of providing a clear For most users, diagrams are usually It is interesting to look at the number of symbols that are used in the more suc- look at the number of symbols that It is interesting to The use of flowcharts for general software development is certainly not recom- for general software development The use of flowcharts A major criticism of the flowchart is that it chiefly describes a solution in terms of describes a solution is that it chiefly of the flowchart A major criticism then, do remember that a substantial percentage of the average audience may have then, do remember that a substantial percentage of the average audience problems in distinguishing between many of the colours that you use. ization advantage described using a diagram of that form. Hierarchical organization offers the and com- that diagrams can then be ‘layered’ into levels of abstraction, avoiding large plex diagrams and so aiding comprehension. even sentations, where it can be used to highlight features of a diagram. However, municating those ideas to others. Such conventions as the use of thick and thin lines to municating those ideas to others. Such out by this criterion, as are the use of complex distinguish between attributes are ruled object-oriented design forms fail this test, and icons or symbols. (Unfortunately some available powerful diagramming tools on when they are combined with the widely the effect of binding a designer into the use of work-stations, their adoption can have design tasks.) these tools even for early architectural text. Like text, diagrams have both a syntax (‘how we say it’) and a semantics (‘what it text. Like text, diagrams have both a to ensure that the diagram meets its purpose. means’), and these need to be used correctly using only a pencil and paper (or pen and tation is that it should be easily produced essential criterion to meet if diagrams are to be whiteboard, and so on). This is an of exploring ideas about a design and com- easily and rapidly sketched out as a means is a measure of the degree of abstraction involved in their use. As a general rule, the is a measure of the degree of abstraction tend to be at lower levels of abstraction (the forms with the larger numbers of symbols problem with their use is that of remembering flowchart is a good example), and one all the nuances of the notation. However, this is not guaranteed, and summary of abstract concepts and relationships. than a heap of unstructured and ungrammatical a poor diagram is no more helpful mended, and they are now rarely taught or used except for specialist purposes. However, now rarely taught or used except for mended, and they are design, with properties of diagram are now used in software very many other forms in the design process. the forms of abstraction required that more closely reflect those that continue to be used forms. (By ‘successful’ is meant cessful diagrammatical more than four or five symbols, which in itself over a period.) Many of them have no describes structural forms that are not much more abstract than the final program forms that are not much more abstract describes structural we experimented in a small way little benefit. (Some years ago now, code, and so offers both flowcharts and pseudo- the development of a system by using with documenting as we found that our months, we decided to drop the flowcharts code. After a few extracted from the pseudocode.) information was always happens with pioneering ideas, it has not stood the test of time very well and is now well and time very test of stood the it has not ideas, pioneering with happens purposes. specialist only for used its of the problem and than in terms machine, rather of the underlying the operations forms for sequencing emphasis upon it also places great As a part of this, structures. more explicit by mod- now made much design that is a feature of detailed operations, is that the flowchart significant reason Perhaps the most structures. ern programming SDC05 9/18/07 10:45 AM Page 101 AM Page 10:45 9/18/07 SDC05 ., 1994), and we will look ., 1994), (1), 8–20 et al 25 , IEEE Computer (4), 459–527 30 , ACM Computing Surveys Mathematical forms have particular strengths in describing system behaviour, and have particular strengths in describing Mathematical forms Since computers are discrete machines, with finite word size and many states, the discrete machines, with finite word Since computers are the use of text, diagrams, and mathematical expressions as the three basic forms in con- the use of text, diagrams, and mathematical structing design representations. the roles of representations in capturing, explaining, and checking design information; the roles of representations in capturing, model, as a means of capturing a particular set of the concept of a viewpoint of a design the use of a representation; design properties, and as projected through – the constructional, behavioural, functional, the principal classes of direct design viewpoint and data-modelling forms; niques. Further reading Summary This paper was written in answer to an earlier paper by Fred Brooks Jr (Brooks, 1987). It is This paper was written in answer to an earlier paper by Fred Brooks Jr (Brooks, the use of what mainly concerned with the problems of describing reactive systems and discusses Wieringa R. (1998). A survey of structured and object-oriented specification methods and tech- Wieringa R. (1998). A survey of structured and object-oriented specification methods of their A comprehensive analysis of a wide range of design methods, together with an analysis use of notations, which is of particular relevance here. Harel D. (1992). Biting the silver bullet. n n n n This chapter has examined the issues involved in providing descriptions of a designer’s ideas. This chapter has examined the issues involved in this were: Some key points and terms that were identified gerated, since the concepts involved are frequently familiar enough to programmers. involved are frequently familiar gerated, since the concepts limitations include the com- the issues of time dependency. Major in handling some of symbols (together with in terms of using a range of unfamiliar plexity of the notation and difficulties with handling standards for these on occasion) a certain lack of descriptions of large-scale systems. form of mathematics most appropriate for the needs of software design is that which most appropriate for the needs of form of mathematics is still less likely to structures. Unfortunately, discrete mathematics describes discrete forms, and so one of the dis- armoury than more classical be part of the engineer’s additional staff training and mathematical forms is the need for advantages of using problem should not be exag- quite advanced levels. However, this education, often at 5.3.3 notations Mathematical pro- forms to in using mathematical an increased interest years there has been In recent (Fraser software designs descriptions of vide abstract the stems from Much of this interest this in Chapter 18. some examples of briefly at combine abstraction in being able to forms have that mathematical great advantage of ambiguity. with a lack

Describing a design solution 102 SDC05 9/18/07 10:45 AM Page 102 AM Page 10:45 9/18/07 SDC05 Exercises 103 of standardizing any particular form of design description; of standardizing any standardizing the same form of description. standardizing the same against in favour (a) the hierarchy of pages in a website; (b)make use of a particular data type in a program. the program units (procedures) that (b) a list of reasons it provide? viewpoint on the design model does capture, and hence what diagram; a mathematical form: points that might be needed in order to provide a full design description, and the represen- needed in order to provide a full design points that might be used for these. tations that could be (a) a list of reasons Exercises 5.3 does it of the flowchart. What design attributes Consider the (much-maligned) example 5.4 using in turn: text on its own; a Suggest how you might represent the following viewpoints 5.1 any other view- that was used in this chapter, suggest For the example of 5.2 Write down: I have termed ‘derived viewpoints’ for design model execution as well as representation forms in as representation as well model execution design for viewpoints’ termed ‘derived I have general. SDC05 9/18/07 10:45 AM Page 103 AM Page 10:45 9/18/07 SDC05 SDC05 9/18/07 10:45 AM Page 104 SDC06 9/18/07 10:50 AM Page 105

chapter 6 105 Transferring Design Knowledge

6.1 The need to share knowledge 6.4 Design patterns 6.2 The architecture concept 6.5 A unified interpretation? 6.3 Design methods

Codifying and exchanging experiences about both the processes involved in designing and the resulting design features that have proved effect- ive, are essential activities (indeed, they form the core theme of this book!). One role for these activities is the promulgation of new know- ledge to existing practitioners. A second is to provide the means of con- veying the ‘body of knowledge’ about software design issues to new or would-be designers. In this pivotal chapter, we examine the forms that are most widely employed for these purposes, and conclude by pro- viding a simple framework that shows how their roles can be related to each other. , so that the accumulated experiences of the practitioner , so that the accumulated , so that new knowledge can be promulgated throughout the can be promulgated throughout , so that new knowledge they know how to do something, while manifestly being able to demonstrate their they know how to do something, while manifestly being able to demonstrate The last point is significant. An expert practitioner may well be unable to explain The last point is significant. An expert practitioner may well be unable to The type of knowledge that needs to be transferred will obviously vary. For scient- The type of knowledge that needs to peer to peer exchange body of practitioners; teacher to pupil instruction to join the group. to new members or to those aspiring group can be conveyed have no rationalized explanation as to why this is so. Such ‘heuristics’ or ‘rules of have no rationalized explanation as to why this is so. Such ‘heuristics’ based upon thumb’ are no less valid for the lack of an explanation. Indeed, they may be the ‘knowledge’ involved may also include experience of when particular forms of the ‘knowledge’ involved may also include experience of when particular solution may work well or otherwise and, if possible, the reasons for this. why which knowledge in practice. For example, an expert in may ‘know’ but may typefaces are most effectively used together for particular styles of document, studies, and of the results from particularly significant experiments. Between peers, studies, and of the results from particularly may be transferred by means of personal knowledge of new work and new results the web and conferences. For their pupils, links, as well as through books, papers, ‘classical’ experiments, models and practices, there is the need to learn about the study. Within those domains that are largely through various forms of classroom including both craft and engineering dis- centred around more ‘creative’ activities, to transfer knowledge may not be very different, ciplines, while the mechanisms used (CPD), and employ mechanisms such as the ‘pattern book’ (in a very general sense) (CPD), and employ mechanisms such basic purposes behind their use are largely the and interactive on-line instruction, the same as they were for the craft guilds. models of how their particular aspect of the ists, the relevant knowledge may include to be suitable for conducting experimental world works, of the techniques considered The craft guilds of the Middle Ages provided classical examples of a structure organized The craft guilds of the Middle Ages provided and exchange (and, possibly, protect) the know- for this purpose, acting to preserve together with an apprentice–master structure ledge of how to pursue a given craft, A more modern example is the way in which used to add new members to the group. to acquire and be tested on ‘The Knowledge’ aspiring London cab-drivers are required to be licensed. In the context of more creative about routes around the in order such as ‘Continual Professional Development’ activities, while we might now use terms n n 6.1.1 share? Why knowledge, it is custom- practitioners need to employ specialized Wherever a body of between them become ways in which that knowledge is transferred ary to find that the for: forms, in order to provide codified in some appropriate 6.1 knowledge share need to The convey ‘knowledge’ forms employed to is the various theme of this chapter Since the section examines both this opening process and product), design (both about software to that are apt and the factors transferring knowledge the motivations for some of impede this.

Transferring design knowledge 106 SDC06 9/18/07 10:50 AM Page 106 AM Page 10:50 9/18/07 SDC06 The need to share knowledge 107 , which are generalizations that are ‘signed’ by the author, but , which are generalizations that are , which report on actual phenomena, and for which the value is , which report on actual phenomena, , or well-established scientific truths, with their value being measured in scientific truths, with their value , or well-established Our ability to transfer knowledge about how to design software is also con- Our ability to transfer knowledge about how to design software is also Both of the reasons for transferring knowledge that were identified at the begin- Both of the reasons for transferring Not only is the transferability of knowledge a problem, the quality of that know- of knowledge a problem, Not only is the transferability determined by the degree of ‘interestingness’ that they possess for us. determined by the degree of ‘interestingness’ Rules of thumb by data, and where the value is determined by which are not necessarily supported their usefulness. Findings been established. to the rigour with which they have forms that correspond Observations and transfer knowledge. The remaining sections then examine the nature of these and transfer knowledge. The remaining sections then examine the nature mechanisms in rather more detail. real-time systems, , games, etc., the designer is still likely to be expected to real-time systems, databases, games, etc., the designer is still likely to be tackle all aspects of software development that might arise. been men- strained and limited by a number of factors, some of which have already ourselves tioned in the preceding chapters. In the rest of this section we briefly remind to codify of some of these, and then review some of the mechanisms by which we seek cannot be expected to possess the knowledge needed to produce creative solutions cannot be expected to possess the domains and solution forms that we encounter. across the wide range of problem through specialization: a specialist in ear, Other disciplines may address this problem normally attempt to remove an appendix; nor nose and throat surgery would not to attempt to enter the luxury car market. How- would a firm be likely in software systems are less clear-cut. Even ever, the distinctions and specializations to some degree, such as in the development of where software producers do specialize design issues are concerned, much of our knowledge is likely to be of the second and design issues are concerned, much of problems in terms of codifying it. third kinds, with correspondingly greater software design as for any other form of design. ning of this section are as relevant for is necessary in any domain and so needs Indeed, the instruction of pupils (novices) In addition, even expert software designers little further discussion at this point. 3. not always recognized! Certainly though, where Unfortunately these distinctions are ferentiate between the following three kinds of results (‘shells of knowledge’) when the following three kinds of results ferentiate between issues (Brooks, 1988). considering computing 1. 2. and it may be difficult to apply it outside of a limited set of problems. In a domain to apply it outside of a limited and it may be difficult many ), this are relatively repetitive (which characterizes where the problems (and hence software an issue. However, software development may not be too critical is true. not constitute a domain where that design) certainly does that it is useful to dif- rather mixed. Indeed, Brooks has suggested ledge may also be such deep and complex cognitive issues that any explanation will be of limited general of limited will be any explanation issues that cognitive complex deep and such con- point when this very make the authors (1994), Conger Vessey and (In usefulness. can be quite difficult, expert design: ‘examining sidering software are at which they processes to the point problem-solving automate their since experts though, without some Unfortunately what they are doing’.) able to articulate no longer that helps to distin- – one of the issues solutions work of ‘why’ particular knowledge limited in its scope, a heuristic may be from a craft – engineering discipline guish an SDC06 9/18/07 10:50 AM Page 107 AM Page 10:50 9/18/07 SDC06 , pro- indirect in nature: direct . Our assessment of the degree of success or failure of . Our assessment of . One major consequence of this was discussed in the pre- . One major consequence . The act of designing involves employing knowledge about . The act of designing involves employing . Design solutions are inextricably interwoven with domain know- . Design solutions are inextricably interwoven (reusable elements, materials used in implementation, etc.) and about (reusable elements, materials used in (how to go about solving a particular type of problem). Transferring know- (how to go about solving a particular design knowledge design problem, they also have quite significant limitations. This issue is one that is problem, they also have quite significant limitations. This issue is one explored more fully in the next sub-section. ledge about products is usually well understood as a problem, and a mechanism when we such as the ‘catalogue’ is generally employed. However, as we will see such come to consider reuse in Chapter 17, because software is really a process, a creative tried and tested forms are less effective. Transferring knowledge about studies process such as designing is more problematical. Mechanisms such as case of the and stylized design processes both have useful roles to play but, by the nature nificant factor in failed solutions. A good example of this issue is provided by the nificant factor in failed solutions. A automated baggage handling system, which experiences of the Denver Airport the mid 1990s (Swartz, 1996). achieved some degree of notoriety in Process versus product products cesses for example, a real-time solution is highly likely to require the designer to make for example, a real-time solution is of that solution, to ensure that the key decisions about priorities for the elements response time. It may also be more elements are able to meet the required the properties that can be considered when perhaps involving knowledge about domain, and how these can be prioritized. making design trade-offs in a particular of the domain context may be a sig- Failure to fully understand the implications significant when assessing any other form of artifact, the distinction is much more significant when assessing any other element is so directly linked to the blurred for software, where the ‘construction’ phase exists. design element and no separate manufacturing Domain factors is to ‘bound’ the set of acceptable solutions ledge. One role for domain knowledge involved in this role may be to a given problem. The knowledge present. Influence of implementation success or failure of their is apt to be entangled with the particular design solutions poor programming or is particularly true of failure, where implementation. This nullify any good qualities of the design the lack of computing power can completely influence of implementation issues is equally itself. While it can be argued that the Invisibility of the medium line’ representations to both the difficulty of linking ‘box and vious chapter, namely in any consistent manner. and to their eventual implementation abstract concepts our own version of the of notations available is apt to create Indeed, the variety communicate design ideas. we are faced with the need to ‘Tower of Babel’ when conceptual barrier is still of notation is helpful, the While some standardization n n n n 6.1.2 of and transfer codification constrain that Factors the that arise from are a mix of those we encounter design the constraints For software of our knowledge from the limitations and those that arise the medium itself nature of wider issues of design. about the

Transferring design knowledge 108 SDC06 9/18/07 10:50 AM Page 108 AM Page 10:50 9/18/07 SDC06 The architecture concept 109 to solu- , 1995). forms et al. provide a frame- which the designer sign knowledge sign strategy is a more established approach. is a more established architectural style transferring de transferring and of processes came into accepted usage in the 1970s, and came into accepted (Perry and Wolf, 1992; Shaw and Garlan, 1996) (Perry and Wolf, architecture has provided an alternative form for use both in codifying and has provided an alternative form for software design method software architecture design pattern for ‘representative’ problems has sometimes been provided through the use of problems has sometimes been provided for ‘representative’ The following sections examine each of these concepts in rather more detail, while The following sections examine each More recently (and within the context of a particular architectural form), the idea More recently (and within the context Transferring knowledge about design Transferring knowledge Codifying and transferring knowledge about the form of detailed design knowledge about the form Codifying and transferring here.) We begin by identifying what we mean by a software architecture; look at how here.) We begin by identifying what we mean by a software architecture; and different architectural styles can be described; examine three simple examples; 6.2 concept The architecture the Since this concept provides some important ideas that we will be using throughout other two rest of this book, we provide quite a detailed description in this section. (The treatment topics are addressed more extensively at a later point and so get a briefer is one which seeks to classify the more abstract features of a design solution. So this to classify the more abstract features is one which seeks describing solution basic vocabulary that can assist with concept provides a others. The early forms of to elaborate further upon how these roles are performed. to elaborate further tions been devised that can be recently has a more general framework case studies, but only form of design solutions. The codify ideas about the higher-level used to record and concept of a From the above, we can see that transferring knowledge about a creative process such process a creative about knowledge transferring see that we can the above, From automated. is easily one that task, or a simple no means is by as design 6.1.3 and codifying for Mechanisms of with the design which experience of the ways in briefly review three Here we on sections then go The following and transferred. systems is codified software-based classes of problem. The form of knowledge employed is largely about the sequences of classes of problem. The form of knowledge form of solution (methods tend to implicitly decisions that can lead to a particular style). assume a particular form of architectural of the design might be structured (Gamma transferring knowledge about how a provided a procedural form of guidance on how to develop solutions for specific provided a procedural form of guidance still focusing on their roles as mechanisms for knowledge codification and transfer. still focusing on their roles as mechanisms However, since the concepts of and since we will be discussing the roles of work for much of the rest of the book, most of the emphasis has been placed upon methods and patterns in later chapters, architectural issues. they describe particular solutions to commonly occurring problems. However, this is they describe particular solutions to in that it is not a solution template within which to misunderstand the role of a pattern, but rather a solution the user has only to ‘plug’ some code, So patterns are really much more about the can then adopt for a particular problem. sense, therefore, their role is closer to that of the ‘how’ of design development. In that with transferring knowledge than codifying it. design method, being more concerned Superficially, patterns would appear to codify knowledge about design products, since Superficially, patterns would appear SDC06 9/18/07 10:50 AM Page 109 AM Page 10:50 9/18/07 SDC06 , ! While it ., 1996). architecture designing choose to do so, et al may , when what they really mean is architecting has long been one that is associated with a quite specific has long been one has been used for many years within the software development within the software used for many years has been architect architecture Perhaps a little inconsistently though, an architect does not design an Perhaps a little inconsistently though, Closer to our own domain, we also have the concept of the ‘computer architect’ Closer to our own domain, we also The role of the might be possible to ‘verb any noun’, this one is particularly inappropriate. *of A personal bête noire here is those who speak provide a framework for that design task, by identifying a general set of characteristics on (the style) that relate to the problem and which have been employed successfully reflection of similar problems. As such, the ‘physical’ concept of architecture is more a common patterns than something that is itself designed (Buschmann to software. However, Perry and Wolf (1992) have rightly cautioned against drawing to software. However, Perry and Wolf a hardware architecture makes use of a the analogy too far. As they have observed, with scale being achieved by replication of relatively small number of design elements, neural networks), this is rarely true for software, these. With a few exceptions (such as involves adding further distinct design elements. where any increase of scale generally need.* The role of architectural style is to but rather a solution to address a particular puters with a generally consistent form (typically described using such terms as RISC, puters with a generally consistent form providing a (largely) consistent platform for pipeline, etc.) became the norm. By up great opportunities, both in terms of the executing software elements, this opened for software to evolve and migrate, rather marketplace, and also by making it possible new generation of computers. Indeed, it is this than needing to be rewritten for each the motivation for seeking to adapt this concept very success that has provided part of of these cases, we associate the term very much with those people whose role is to of these cases, we associate the term tasks, rather than managing the details of the undertake the more abstract design actual implementation. of a computer, usually referred to as its ‘architec- who designs the top-level structures more important concepts in the development of ture’. Indeed, this has been one of the 360/370 range, the idea of a ‘family’ of com- computing. Beginning with the IBM ibility, in that no-one expects the architect involved with developing a new building expects the architect involved with ibility, in that no-one architect in managing its construction. The to actually take part is used in other domains too, not expected of him or her. The term but in general, it is of ‘naval ’ as being analogy. For example, we may speak although usually by so); and also of ‘land- ships (usually warships, but not necessarily people who design is that of gardens, estates, etc. Again, in both scape architects’ whose domain of design has also been used by different people to mean rather different things. So before going by different people to mean rather different has also been used by the work of a number in which this has been drawn together on to look at the way and David Garlan, it is use- by Dewayne Perry, Mary Shaw of people, and especially sense. we mean by the term in a more general ful to consider what a very clear design respons- namely buildings. This is also a role with domain of design, then briefly consider how the concept provides aid for our theme of transferring our theme aid for provides concept the how briefly consider then design. about knowledge 6.2.1 architecture? is What The term it descriptive terms, as with so many Unfortunately, a very informal manner. world in

Transferring design knowledge 110 SDC06 9/18/07 10:50 AM Page 110 AM Page 10:50 9/18/07 SDC06 The architecture concept 111 and, for style can perhaps best be viewed as something can perhaps best be is often the most useful one to employ, and most useful one is often the architectural style architectural style architectural , 1995). Thirdly, it tells us something about the type of construc- , 1995). Thirdly, it tells us something et al. ? In practice, most authors seem to consider this to be an abstract top- be an abstract this to to consider seem most authors ? In practice, of a particular design solution, it may also tell us something about the design pro- of a particular design solution, it may also tell us something about the design In addition, although the concept is primarily concerned with categorizing the In addition, although the concept is primarily concerned with categorizing archi- One of the clearest discussions about the roles of software architecture and So what roles can the idea of architectural style provide when applied to software So what roles can the idea of architectural So the notion of an So the notion of an So that begs the question of whether we can usefully speak of a system as having of a system speak can usefully we of whether question begs the So that architecture tectural style is provided in a short paper by Garlan and Perry (1995). Writing as an tectural style is provided in a short paper by Garlan and Perry (1995). Writing many of introduction to a collection of papers on software architecture, they capture form methods cesses involved. Indeed, a rarely recognized characteristic of software design style upon is that the use of any method implicitly imposes a particular architectural next section. the designs that are produced. This is a point that we will return to in the server’ and ‘pipeline’ are widely employed, although not necessarily well-defined. One server’ and ‘pipeline’ are widely employed, on the form and structure of a family of view of this role is that it ‘defines constraints Perry, 1995). Secondly, as mentioned above, the architectural instances’ (Garlan and where there is potential for some degree of ‘mis- concept may assist with identifying the elements used to construct a software-based match’ to occur between the forms of system (Garlan useful for describing a particular solution. tional notations that are likely to be systems? Firstly, the role of providing a very abstract description of the overall form is systems? Firstly, the role of providing is more likely to be expressed in terms of con- still an appropriate one, although this we may also refer to buildings in this way, structional forms than epochs. (Of course, concrete’, where such a description provides some as in ‘wattle and daub’ or ‘glass and will be.) Descriptive terms such as ‘client– idea of what the likely form of the building quences of mixing items of software that have different architectural styles. (Returning quences of mixing items of software we can easily see that adding a 1960s-style flat briefly to the analogy with buildings, built in the Tudor period is unlikely to be visu- roofed extension to a cottage that was to ‘bond’ well physically! Both may well be quite ally harmonious, nor are they likely constructed in a style that is appropriate for the functional in their own way, and be but as these are so very different, some degree materials employed in their fabrication, of ‘mismatch’ is almost guaranteed.) that provides a very abstract description of a particular set of general characteristics of abstract description of a particular that provides a very will then know something of provided with such a description, we a solution. When there may still be great vari- a particular solution, but within that the general form of we will return to later, such a specifically, and this is a point that ation in detail. More a fairly broad assessment of the likely conse- description may also enable us to make describing buildings we often seem to use temporal classification of styles, perhaps we often seem to use temporal describing buildings architects have developed par- materials have come along, so because, as new building of ships, role is more likely them. In contrast, in the domain ticular ways of employing describe a ship as an ‘aircraft classifying architectural style. If we to be the basis for as a flat ‘through deck’ that it is likely to have such characteristics carrier’, then we know for its superstructure, etc.) land and take off, and a small ‘island’ to allow aircraft to an and their general of its major elements expressed in terms of a design, level description of its a description this is also apt to provide way we express form. The the term our purposes, speaking about build- example, when in this book. For will use extensively one that we a ‘1960s’ style. (When ‘Elizabethan’ or building is in an say that a given ings we might SDC06 9/18/07 10:50 AM Page 111 AM Page 10:50 9/18/07 SDC06 that elements , which we will be examin- , which we component was then described as a set of ‘weighted properties and {Elements, Form, Rationale} = Form . This stems from the way that architectural concepts provide an concepts provide that architectural from the way . This stems . The arguments here are largely concerned with the role of architec- are largely concerned with the role . The arguments here . Garlan and Perry argue that ‘software architecture can expose the argue that ‘software architecture . Garlan and Perry . Here an architectural style offers a framework that can provide the basis style offers a framework that can . Here an architectural . This partly relates to the idea of the relates to the idea . This partly In Perry and Wolf (1992), the authors proposed an initial classification scheme in In Perry and Wolf (1992), the authors Various authors have suggested some ways in which we might classify architec- Various authors have suggested some processing elements data elements connecting elements Analysis conformance to the style!). features of a design (including its for checking various Management for change. and, in particular, of planning ture as an aid to planning Reuse ing in Chapter 17. Evolution As such, therefore, it pro- which a system is expected to evolve’. dimensions along for use by those entrusted ideas and aims of the originators, vides a guide to the and change. with its later maintenance Understanding design. a system’s high-level understanding of that aids abstract vocabulary Software Architecture of connecting elements include such mechanisms as procedure calls, messages, shared of connecting elements include such mechanisms as procedure calls, messages, data repositories, etc.). can be used. relationships’, which constrains the choice of elements and how they n n n (Examples where the connecting elements could also be processing or data elements. the form of: a style) could be considered as being defined through which an architecture (and hence a particular form. The particular by a set of (design) elements that have they identified were: For the concept of an architectural style to be of use to us, we need to be able to pro- For the concept of an architectural style in some way. Not unreasonably, since a style vide a specification of its characteristics might also expect that the notation we use to describes ‘a family of instances’, we individual systems should also be suitable for describe the architectural form of of an architectural style too. describing the more general concept chapters, and all of them are issues that we will return to in later ones. chapters, and all of them are issues that to describe software systems. We now go on to tural styles so that these can be used some of the points made in this sub-section. review some of these, in order to illustrate 6.2.2 styles architectural Classifying n n already encountered in the discussions of earlier Some of these are issues that we have n n the key issues very elegantly and in a concise manner. The authors also argue that the argue authors also The manner. in a concise and very elegantly issues the key of five aspects following at least the upon an impact can have of architecture concept development. software n

Transferring design knowledge 112 SDC06 9/18/07 10:50 AM Page 112 AM Page 10:50 9/18/07 SDC06 The architecture concept 113 Client–Server Blackboard architectural description language. UniCon . In contrast though, the scheme adopted in Shaw and adopted in though, the scheme . In contrast content control’ by the recipientthread of control Pipe-and-filter concurrent processes ‘Classical’ Objects components Distributed Objects Lightweight threads was intended to capture the motivation for particular choices for particular the motivation to capture intended was connectors and rationale Major categories of software architectural style Various efforts have also been made to codify such descriptions of architectural Various efforts have also been made Subsequent authors have often tended to adopt simpler schemes of classification. simpler schemes tended to adopt authors have often Subsequent how data is communicated through the system; how data is communicated interact; how data and control style. reasoning that is compatible with the the type of (design) the kinds of components and connectors that are used in the style; and connectors that are used the kinds of components and transferred among control (of execution) is shared, allocated the ways in which the components; Data-sharing Direct sharing of data among Hypertext Call-and-returnInteracting processes Order of computation with a single Communication among independent, Data-centred repository Communicating processes Main program/subprograms Complex central data store Transactional databases Table 6.1 CategoryData-flow Characteristics Motion of data, with no ‘upstream Batch sequential Examples of Styles authors categorize architectural styles in terms of the following major features: architectural styles in terms of the following authors categorize (although, as we have observed previously, this information is too rarely recorded). is too rarely this information previously, we have observed as (although, based only upon a basic framework (1996) employ Shaw and Garlan For example, components also returns to some (and in some ways, more elaborate (1997) is somewhat Clements the way). Here organized in a different Wolf, although used by Perry and of the ideas and there is also a discussion of their own and there is also a discussion of their to debate, since there is the inevitable conflict Whether this is a realistic goal is open and those of the detail needed for speci- between the needs of abstract description more fully in the next chapter). However, for the fication (a conflict that we examine concerned with the concepts and with their cat- purposes of this book we will only be egorization in general terms, as above. section, we employ it to briefly examine and categorize some examples of different section, we employ it to briefly examine the styles identified by Shaw and Clements. architectural styles. Table 6.1 summarizes to aid with analysis, although also to provide style using a more formal basis, largely In Shaw and Garlan (1996) examples are pro- a more formal basis for these concepts. using the Z formal description language, vided of specifications that are represented n n n benefit of making explicit many of the issues that For our purposes, this scheme has the of this and later chapters. So, in the next sub- we should be considering in the context n n Finally, the Finally, SDC06 9/18/07 10:50 AM Page 113 AM Page 10:50 9/18/07 SDC06 pr Print out the selected files in suitable format Files grep that meet the ‘Select’ those required pattern e architectural styles e architectural Pipe that occurs within some form of network. Indeed, that occurs within some form of network. 1s Filter dataflow List the files in sorted order in the directory 1; + The pipe-and-filter style: Unix processes. count = In a pipe and filter architectural style, the components are typically processes that In a pipe and filter architectural style, The descriptions provided in the rest of this section are of necessity brief ones, and in the rest of this section are The descriptions provided count stream chronous manner. A widely-cited example is the ‘classical’ approach to compiler design, chronous manner. A widely-cited example to gradually transform the source code into in which a series of operations are performed such as a lexer or parser, acts as a filter, trans- some form of binary code. Each element, the form required by the next stage. For exam- forming a stream of input tokens into and splits this into the ‘lexemes’ or groups ple, the lexer inputs a stream of characters context of the program. So the input expression of characters that have meaning in the although the Unix variant is essentially linear, many non-linear topological forms although the Unix variant is essentially described in Simpson and Jackson (1979). exist, such as the MASCOT approach 6.1 and 6.2. Examples of these are shown in Figures an output stream (the ‘filters’), connected together transform an input data stream into which may occur in a synchronous or asyn- by some form of dataflow mechanism, involved, we will look at three examples of widely encountered architectural styles. at three examples of widely encountered involved, we will look 1. filter Pipe and within the architecture the 1970s onwards has been embodied This style (which from one based upon the transformations that of the Unix operating system) is essentially are centred around the sarily be consistent with the original style – which should not be taken to imply that with the original style – which should sarily be consistent presence of ‘hybrids’ does not a mismatch.) As with buildings, the there is necessarily of classification any less useful. render the basic idea a specialized source such of these issues the reader should consult for fuller discussion To illustrate the concepts (1996) or Shaw and Clements (1997). as Shaw and Garlan 6.2.3 softwar of some Examples (and which is firmly right at the outset need to be made that does One qualification in necessarily ‘pure’ systems are not (1997) is that real and Clements made in Shaw than of more possess the characteristics style, and so may their architectural terms of may Buildings we see in other domains. with what (This is not inconsistent one style. may not neces- of time, and the changes with the passage and extended well be altered Figure 6.1 Input data

Transferring design knowledge 114 SDC06 9/18/07 10:50 AM Page 114 AM Page 10:50 9/18/07 SDC06 The architecture concept 115 due to the emphasis function ’, ‘1’, ‘;’ regardless of the + ’, ‘count’, ‘ = input to a process. Upstream processes have no control of this. input to a process. Upstream processes have through the transfer of data. method such as JSP placed upon the filters (components). A design (Chapter 14) may generate this style of solution. The pipe-and-filter style: MASCOT diagram. The pipe-and-filter architectural style Table 6.2 provides a brief summary of this style using the general classification More complex forms of this style (such as that used in the MASCOT system cited More complex forms of this style (such Data communicationControl/data interaction share the same topology and control is achieved Control and data generally Data is generally passed with control. Design reasoning Tends to employ a ‘bottom-up’ approach using FeatureComponentsConnectorsControl of executiontransferred by the arrival of data at the Typically asynchronous, control is Data transformation processes. Instantiation in pipe and filter mechanisms (e.g. Unix pipes, files, etc.). Data transfer ment to another underpins this style. Unlike the more data-driven ‘pipe-and-filter’ style, ment to another underpins this style. Unlike the more data-driven ‘pipe-and-filter’ of other which is essentially non-hierarchical (filters have no control over the actions scheme adopted in Shaw and Clements (1997) described in the preceding sub-section. scheme adopted in Shaw and Clements (1997) described in the preceding 2. Call and return ele- The concept of an ordered and hierarchical transfer of control from one processing will be output as the stream of lexemes: ‘count’, ‘ will be output as the stream of lexemes: or tab characters. presence or absence of intervening space dataflow control, including allowing for the earlier) may incorporate more complex and, where appropriate, having mechanisms to retention of data, its synchronization it is time-expired and not yet processed. allow data to be over-written where Table 6.2 Figure 6.2 SDC06 9/18/07 10:50 AM Page 115 AM Page 10:50 9/18/07 SDC06 object- . A design function output results main process data architectural forms, and some of these will be discussed in algorithms in the components. access). within the ‘calling stack’. Design will method such as the ‘traditional’ Structured Analysis/Structured 13). produce solutions that employ this style (Chapter input data event-driven The call-and-return style: subprogram invocation. style: subprogram The call-and-return The call-and-return architectural style The call-and-return architectural and There are obviously many other styles, of which good examples include There are obviously many other styles, of which good examples include In the case of a database system, the central mechanism is generally concerned Control of executionData communication (in detail) the through the calling hierarchy and Sequencing is controlled Control/data interaction directly (global Data is passed via parameters and can also be accessed beyond the linking of parameters and return inform This is relatively limited, Design reasoning Encourages use of a ‘top-down’ strategy, based upon FeatureComponentsConnectors Subprogram units. in call and return Instantiation invocation (calling). Subprogram summary of this architectural style. oriented vides an illustration of the general form of a client–server system. of data. with providing some form of indexed access to a (potentially) large volume this, with the Blackboard systems can be regarded as rather more ‘freestyle’ variants on control and data now being representative of some form of ‘knowledge’ and with the provides a sequencing of any updates being much less tightly controlled. Table 6.4 This style describes systems in which the key element is some central mechanism used This style describes systems in which which can then be manipulated independently for the persistent storage of information units. Examples that embody such a style are by some arbitrary number of processing systems. Shaw and Clements (1997) also database systems and blackboard expert into this general category, on the basis that the argue that client–server forms come often incorporates a database. Figure 6.4 pro- server acts as a repository and, indeed, illustrated in Figure 6.3. The main program (which itself is really a top-level subpro- illustrated in Figure 6.3. The main program system) may well perform no role other than gram when viewed from the operating subprograms that perform the actual processing that of controlling and sequencing the features of this style. tasks. Table 6.3 summarizes the main 3. Data-centred repository filters), the call-and-return style places much greater emphasis upon control aspects filters), the call-and-return style places A call-and-return style is therefore closely linked rather than upon data transfer issues. form of ‘main program’ and ‘subprograms’ as to the traditional program structuring Table 6.3 Figure 6.3

Transferring design knowledge 116 SDC06 9/18/07 10:50 AM Page 116 AM Page 10:50 9/18/07 SDC06 The architecture concept 117 Database Server software Application concept in knowledge transfer in knowledge concept

Network viewpoint is obviously relevant for database and data modelling highly synchronized, whereas in the case of a blackboard there may be little highly synchronized, whereas in the case of a or no interaction. that occurs in this style client–server systems. The wider variation of detail procedural design approaches. tends to preclude the widespread use of more The data-centred repository style: simple client–server system. The data-centred repository style: simple The data-centred repository architectural style ‘Thin’ client Browser Design reasoning A ComponentsConnectorsControl of executionData communicationControl/data interaction and may also occur in parallel. Operations are usually asynchronous Storage mechanisms and processing units. a database or a client–server system, these may be Varies quite widely. For mechanism. Data is usually passed via some form of parameter queries, direct access (blackboard). Transactions, Feature Instantiation in data-centred repositories Figure 6.4 by Garlan and Perry (1995) and were reviewed in Section 6.2.1. Taking a slightly nar- by Garlan and Perry (1995) and were reviewed in Section 6.2.1. Taking a this book, we rower focus, in terms of the issues that are more directly the concern of can identify the following key roles. illustrate the basic concepts. 6.2.4 of the architectural The role in terms of At this stage, the obvious question is: ‘what role do these ideas perform suggested the task of designing software?’ A number of answers to this question were later chapters on design practices. However, the above three offer good examples that later chapters on design practices. However, Table 6.4 SDC06 9/18/07 10:50 AM Page 117 AM Page 10:50 9/18/07 SDC06 form of how to . An important . An procedural description . One of the consequences of choosing . One of the consequences to generate design solutions. We will not be describ- . An important element in successfully updating an . An important element how A design method can be regarded as providing a (what Perry and Garlan refer to as ‘evolution’). Changes that preserve the overall (what Perry and Garlan refer to as ‘evolution’). to be more successful and to leave scope for architectural integrity are likely both many design tasks occur within a larger oper- further changes in the future. Since a valuable aid to identifying such constraints ational context, these concepts provide of a system. and hence to preserving the structure example, choosing a call-and-return style would suggest that we might begin by a call-and-return style would suggest example, choosing to use a transaction- of the overall system, or choosing considering the functionality about the data forms suggest that we should begin by thinking centred form may involved. changes Assisting with later ideas and intentions of the original designer(s) existing system is to understand the Determining the choice of design strategy Determining the choice need to find some way of for a solution is that we then an architectural form described in the rest of this whether it is by using the forms achieving that solution, both the strategy and ‘formal’ means. Choice of a style affects chapter, or by less the eventual solution. For used to support it and describe the choice of notations Providing a framework and vocabulary for top-level design ideas design for top-level and vocabulary a framework Providing a sys- of (architecture) form the overall what to determine is in designing element a as a pipeline; processes connected to use a set of be. Is the best choice tem is to Sometimes a centralized database? elements; or of distributed processing network always the case. but this is not by context, is more or less pre-determined this choice the overall form of for deciding on both a framework therefore provide These ideas for discussion. to others and hence for describing it and a vocabulary a solution, method describes the tasks that the designer is to perform and the order in which they method describes the tasks that the designer is to perform and the order cannot should be performed. However, since design is a creative process, a method codifying knowledge about in the rest ing design methods in any real detail, since we have much fuller descriptions knowledge, of this book. Our only real concern here is with their role in transferring or rather with the detailed forms used to do this. That is, a set about the task of producing a design solution for a given problem. previous subsections. 6.3 methods Design a means of codifying knowledge about the The preceding section has described discuss the role of design methods in terms of of a design solution. In this section we chapters. Like so many of the elements that make up the software design context, the chapters. Like so many of the elements style lies in this ability to describe the broad major value of the concept of architectural on detailed classification may risk being picture, and placing too much emphasis of this concept will therefore be for describing counter-productive. Most of our use design forms, although occasionally we may need high-level characteristics of different detailed characteristics that were described in the to be specific about some of the more This section has introduced some important ideas that will be employed in the later This section has introduced some important n n n

Transferring design knowledge 118 SDC06 9/18/07 10:50 AM Page 118 AM Page 10:50 9/18/07 SDC06 Design methods 119 know- transferring . (In fairness, software product is not one that is confined to software, as demon- that is confined to is not one methods , 1995). This suggests that once some degree of knowledge about of software (Brooks, 1987) has made it necessary to create artificial of software (Brooks, 1987) has made et al. will ensure the production of a sound design will ensure the production of a sound invisibility Studies of experienced designers have tended to suggest that they are only likely to Studies of experienced designers have While the idea of design While the methods. The design notations) and the design method frameworks for its description (including framework, providing both an explanation of has become an integral part of that and deployed and also a vocabulary for how these abstract forms can be developed doing so. coped with this, and the design method has provided one of the ways in which the design method has provided coped with this, and of people with design could be conveyed to large numbers design knowledge responsibilities. meant that some means of in software technology have also Rapid developments has also been needed if practitioners are providing peer-to-peer knowledge transfer role has been partly filled by the use of design to be kept informed, and again this The rapid development of the computing industry since the 1960s has led to a drast- of the computing industry since The rapid development over the past 30 years. for design and development skills ically escalating need knowledge could not have mechanisms for transferring Traditional master/pupil valuable, supporting the view that methods are more a means of (say) a transaction processing system for a bank and hence might employ a design (say) a transaction processing system for a bank and hence might employ compiler. method for this, when they would certainly not do so in developing a new given method Similarly, studies of method use also suggest that few designers follow a in varying completely, and that they tend to use experience to adapt the procedures degrees (Hardy becomes less how to design has been acquired, the framework offered by a method design method developers do not necessarily make this claim, but of course it is implic- design method developers do not necessarily to adopt a method that was thought to result itly assumed. No-one would be expected in poor design solutions!) they do not feel confident about their ‘domain follow design method practices where 1985; Guindon, 1990; Visser 1987). In other knowledge’ (Adelson and Soloway, might feel less confident when asked to design words, an expert in designing compilers ledge than of generating specific solutions. Through its procedures and notations, a design method implicitly produces a design Through its procedures and notations, architectural style. This leads to one other obser- solution that embodies a particular design methods play in the software domain. vation about the rather unique role that same expectation that following a given design In no other domain is there quite the process n n cess than is commonly adopted with software.) Why this should be so must remain adopted with software.) Why cess than is commonly of reasons. conjecture, but we can suggest a number partly a matter for n provide actual guidance about exactly how each task should be performed for any be performed task should each exactly how about guidance actual provide problem. specific and more detailed are generally much design methods Jones (1970), software strated in pro- example of this is (Another arise in other domains. than those which prescriptive a (1996), which takes by Pahl and Beitz design text the ‘classical’ engineering vided by pro- about the design to teaching prescriptive approach and much less quite different SDC06 9/18/07 10:50 AM Page 119 AM Page 10:50 9/18/07 SDC06 . While design patterns are not design pattern , 1977), who describes it in the following words: et al. of producing a design solution, but also retain a strong element of product of producing a design solution, but The concept of the design pattern is very much associated with the object-oriented The concept of the design pattern is very in the work of the architect Christopher The concept of the design pattern is rooted Having looked at how knowledge about design is transferred through the concepts Having looked at how knowledge about While the above arguments should not be seen as a claim that ‘design methods are should not be seen as a claim While the above arguments One other question is why the development of new design methods enjoyed methods new design of development why the is other question One ‘Each pattern describes a problem which occurs over and over again in our envir- ‘Each pattern describes a problem which occurs over and over again in a way onment, and then describes the core of the solution to that problem, in such the same that you can use this solution a million times over, without ever doing it way twice.’ Alexander (Alexander architectural style, although in principle there are no reasons why patterns could not architectural style, although in principle extent, this reinforces the arguments of the be employed with other styles. To some architectural style is one that has necessitated preceding section: the object-oriented hence less accessible) design methods, leading to the use of much more complex (and such designs. a search to find alternative ways of developing 6.4 patterns Design design patterns is a topic that we will be address- The detailed form and application of So, as with design methods in the preceding sec- ing much more fully in Chapter 10. to consider design patterns in the context of their tion, our main concern here will be transfer. role as a mechanism for knowledge of architectural styles and the practices of design methods, we now look at one of the of architectural styles and the practices other developments of the 1990s, the of methods in that they are concerned with the procedural, they share some of the role processes modelling. design knowledge and, indeed, in reading the later chapters of this book, we need to and, indeed, in reading the later chapters design knowledge at the beginning of this chap- In terms of the roles that we identified keep this in mind. to play a useful role in transfer- while design methods continue ter, it is probable that, terms of peer-to-peer exchange the novice designer, their value in ring knowledge to has been reduced. of the procedural steps is likely to require greater maturity of design thinking. In other is likely to require greater maturity of the procedural steps are those who probably able to use such methods effectively words, the only people procedures, or whose need is expertise not to need the detailed already have sufficient expertise to a new architectural style. mainly to adapt their of usefulness in transferring that there are limits to their degree dead!’, they do suggest greater popularity and importance during the 1970s and 1980s, whereas, since the 1980s, whereas, and the 1970s during importance and popularity greater the - role, at least in a less prominent they have played early 1990s, one possible reason for conjecture, but partly a matter Again, this is ing literature. is the increasing in the community) of design expertise a growing maturity (apart from to that this also leads argued elsewhere We have of software structures. complexity each 1999), in which 1995; Budgen, methods (Budgen, complexity of design increasing

Transferring design knowledge 120 SDC06 9/18/07 10:50 AM Page 120 AM Page 10:50 9/18/07 SDC06 Design patterns 121 , (1995), et al. has been explored (Coplien, 1997) and, at idiom , 2001). While not conclusive (few et al. architectural design pattern as architectural patterns and, as such, they also extend the (1996). The latter authors look upon many of the architectural (1995). et al. pipe and filter et al. The design pattern concept is not restricted to use in ‘detailed design’ activities. At The design pattern concept is not restricted to use in ‘detailed design’ activities. As with design methods, one question that we need to ask is whether the use of As with design methods, one question Patterns are of course no more of a panacea than any other approach that we Patterns are of course no more of a In some ways, the idea of the pattern comes much closer to embodying the tradi- idea of the pattern comes much closer In some ways, the Essentially, a pattern is a generic solution to a problem, which itself is likely a problem, which generic solution to a pattern is a Essentially, pattern concept beyond a purely object-oriented context. the programming level it is generally referred to as an the architectural level, the concept of an in Buschmann styles such as patterns will lead to ‘good’ solutions. While the process of pattern use does not seem patterns will lead to ‘good’ solutions. experimental findings regarding how maintain- to have been studied, there are some (Prechelt able the end product is likely to be certainly indicate that design patterns can be empirical studies ever are!), these findings a consistent style, especially in terms of enabling used to produce solutions that have future change. bering the relevant bits of knowledge. (We might note that in Gamma bering the relevant bits of knowledge. of 23 design patterns. In other words, they keep the authors concentrate on a catalogue which is perhaps one good reason for its wide their vocabulary to a manageable limit, few design problems present features that are acceptance.) That said, of course, very such, the pattern concept does recognize and entirely new and original and so, as knowledge. embody a useful level of reuse of design ‘label’ a sub-problem that they knew how to solve, leaving them free to concentrate on ‘label’ a sub-problem that they knew the less familiar aspects of a problem. the transfer of design knowledge. Indeed, the might choose to adopt for organizing limitations: to be successful, patterns need to very mechanism itself effectively imposes which in turn suggests that too large a set of be readily accessible and recognizable, presenting problems for indexing and remem- patterns is likely to be unmanageable, important part of learning about design, if generally much more difficult to achieve! learning about design, if generally much important part of exchange of design have a role in terms of providing peer-to-peer Patterns can also through the use of methods. smaller ‘chunks’ than can be achieved knowledge in much of designers. One of the matches some of the observed practices The pattern idea also in Adelson and Soloway design behaviour that was observed characteristics of expert for plans’, where a designer would recognize and (1985) was the employment of ‘labels about the possible consequences that might need to be considered when performing consequences that might need to be about the possible design trade-off decisions). and expertise than design model for transferring knowledge tional master/apprentice on ‘teaching’ about solutions, achieve. Methods also concentrate methods can possibly of these is an equally about problems too, and the recognition while patterns educate This concept has been taken up for software (or, more specifically, for object-oriented for specifically, (or, more for software taken up been concept has This the book being the topic work on the core with community’, ‘pattern by the software) by Gamma transfer, there- In terms of knowledge of a bigger problem. to be a part (almost certain) a designer might problem that about a particular information fore, it conveys (as well as some notes that problem for addressing together with a strategy encounter, SDC06 9/18/07 10:50 AM Page 121 AM Page 10:50 9/18/07 SDC06 interpretation, based largely upon experience. interpretation, based personal A simple model contrasting expert and novice design contexts. (1988) that expert designers are not necessarily good programmers, we are left to designers are not necessarily good programmers, (1988) that expert This model is not inconsistent with some of the other observations made by This model is not inconsistent with Our starting point is some of the earliest studies of how people actually design is some of the earliest studies of how Our starting point the inexperienced designer lacks this intermediate level of thinking, and can easily the inexperienced designer lacks this an undue degree of detail about implementation. become entangled in consideration of Figure 6.5 shows this schematically. Concepts such as ‘labels for plans’ can Adelson and Soloway and by other researchers. knowledge’ that a designer brings to be considered as being part of this ‘underpinning methods (and, to some degree, of design patterns a task. So one of the roles of design how well a design would meet its purposes. If to this we add the observation in Curtis would meet its purposes. If to this we how well a design et al. designer is the ability to of the characteristics of the experienced conclude that one In other words, the experi- intermediate level of ‘mental model’. form and use some of their design elements without needing to enced designer uses a set of abstractions In contrast (as many teachers will know), think about how these will be implemented. personal interpretation of how these ideas complement each other. While the interpre- each other. these ideas complement interpretation of how personal number of academic studies, it upon the observations from a tation provided draws study, hence the emphasis subjected to either analysis or empirical has not itself been on it being a Soloway (1985) was that ex- observation of Adelson and software. One particular to explore their ideas about would ‘execute’ their designs in order perienced designers 6.5 interpretation? A unified a terms of providing material in some very important has introduced This chapter are design practices in which software of the ways for our understanding framework wood for the trees’ difficult to ‘see the it can become However, as always, organized. to provide a rather section is intended This short with so many concepts. when faced Figure 6.5

Transferring design knowledge 122 SDC06 9/18/07 10:50 AM Page 122 AM Page 10:50 9/18/07 SDC06 A unified interpretation? 123 An extended model describing an expert’s design context. An extended model describing an expert’s The detailed form of any particular intermediate model is almost certainly a very The detailed form of any particular how the ‘underpinning knowledge’ is devel- One question that this leaves is just If we pursue this further, we can note that where designers tackle unfamiliar tasks, If we pursue this further, we can note Figure 6.6 to some degree. Such questions are, of course, almost impossible to answer. Certainly most of us would Such questions are, of course, almost impossible to answer. Certainly most of its general accept that the task of designing software does require an understanding it. The properties, of what is possible, and of what are the ‘good’ ways of deploying knowledge is observations of Curtis and his co-workers also suggest that, while such This necessary, a high degree of programming expertise may actually be a distraction. at least underpinning knowledge will also be linked to particular architectural styles, personal one, and this is not itself the object of our attention in the rest of this book. personal one, and this is not itself the in which a designer develops the ability to form Rather, our concern is with the ways and, where appropriate, to express their ideas and employ such intermediate models using particular notations. a designer need to know about implementation? oped. In other words, how much does a method). So this suggests that there are likely to be potentially many forms of inter- a method). So this suggests that there corresponds to a particular architectural mediate model, where each form loosely in using the object-oriented paradigm might feel style. A designer who is an expert for a transaction-based architectural style less confident about developing a solution model. Figure 6.6 extends the original concept because of this lack of an intermediate this possibility. as described in Figure 6.5 to include too) is to help the inexperienced designer develop such intermediate models of their too) is to help the inexperienced designer ideas. such a model (and hence may revert to using they may well have problems in building SDC06 9/18/07 10:50 AM Page 123 AM Page 10:50 9/18/07 SDC06 (1), 43–52 14 can be recognised in many domains. Identify some examples , Software Architecture: Perspectives on an Emerging Discipline. Software Architecture: Perspectives on an IEEE Software architectural style A specific feature of this book is that, for just such reasons, no code-based exam- no code-based reasons, just such that, for book is of this feature A specific (c) publications; of architectural styles and their principal characteristics, for the following domains: (a) ships; (b) motor ; the rationale for using design patterns and their ability to describe the core features of the rationale for using design patterns reusable design solutions. behind such knowledge; and a vocabulary for of architectural style in providing a framework the role of the concept strategy; and for assisting with the choice of design top-level design ideas, practices and strategies; the use of design methods to codify design the reasons for transferring design knowledge, and (where known) for codifying the rationale design knowledge, and (where known) the reasons for transferring Prentice-Hall terns, and objects. Exercises Further reading Summary 6.1 The concept of This is the definitive reference text for the subject of software architecture. Although in terms of This is the definitive reference text for the fragmented, it contains a wide set of examples and developing the theme its structure is rather illustrates all of the key ideas. Monroe R.T., Kompanek A., Melton R. and Garlan D. (1997). Architectural styles, design pat- Monroe R.T., Kompanek A., Melton R. many of the concepts discussed in this chapter and A very readable paper that draws together as their strengths and limitations, with some simple explores their capabilities and roles, as well examples for illustration. Shaw M. and Garlan D. (1996). n n n This chapter has examined some of the principal ways in which software design knowledge and some of the principal ways in which This chapter has examined here have included: and transferred. Particular issues addressed expertise can be codified n ples have been used to illustrate points. The assumption throughout has been, and will has been, throughout assumption points. The illustrate used to been ples have that and of the of programming, understanding reader has a basic be, that the to of how developing an understanding help further with this book is to the role of models’. employ these ‘intermediate form and

Transferring design knowledge 124 SDC06 9/18/07 10:50 AM Page 124 AM Page 10:50 9/18/07 SDC06 Exercises 125 particular printer. hockey, cricket, etc.). hockey, cricket, based upon analogies with the practices of any other disciplines that also involve significant with the practices of any other disciplines based upon analogies elements of design activity. the architectural styles that are likely to be most appropriate: the architectural styles (a)auto-teller machine; a bank (b) used to analyse static files of text; a spell-checker (c) employed by a ‘raw text’ into the page description language a program that reformats (d) (tennis, as a sport a topic such about information pages of static containing websites and Garlan (1996) of this in Shaw good illustration of a problem usually features ), there are constraints. For the absence of any other style in the the choice of a particular that encourage features and identify to be their major what you consider of system, identify following types 6.3 for software, might be used to codify design knowledge Identify any other mechanisms that 6.2 is a styles (there using a range of architectural be implemented While many systems can SDC06 9/18/07 10:50 AM Page 125 AM Page 10:50 9/18/07 SDC06 SDC06 9/18/07 10:50 AM Page 126 SDC07 9/18/07 10:53 AM Page 127

chapter 7 127 Some Design Representations

7.1 A problem of selection 7.3 White box notations 7.2 Black box notations 7.4 Developing a diagram

The abstract nature of software means that it lacks any readily visualis- able images. This chapter reviews and describes a selection of the forms that are adopted for describing the properties of software. We begin by reviewing the choice of examples and then go on to discuss each one: identifying its form, and the role(s) that it generally plays in the design process. For convenience, these example forms have been loosely grouped into two sets: the ‘black box’ forms that are used to describe what a system does, and the ‘white box’ forms that are concerned with describing how it is to do it. Finally, we briefly examine some of the ways of checking and developing diagrams. , in terms of the ideas described in Chapter 5, where we considered con- described in Chapter 5, where we , in terms of the ideas , including textual and diagrammatical forms of notation; , including textual , in terms of the form’s role during the phases of design, the type of problem We should also note that some of these notations may well be known under more We should also note that some of these notations may well be known under These are not the only forms of representation that will be met in this book, since These are not the only forms of representation Descriptive forms, such as those reviewed in this chapter, are not particularly Descriptive forms, such as those reviewed The selection is not exhaustive, nor is it likely to meet with universal agreement. The selection is not exhaustive, nor Chapter 5 provided a framework for describing the roles and forms of represen- a framework for describing the roles Chapter 5 provided form viewpoint viewpoints; functional and data-modelling structional, behavioural, use and the extent to which it is used. domain in which it might be appropriate, of this, with different names for each role and method.) Where possible, the most of this, with different names for each role and method.) Where possible, generic or widely adopted name has been employed here. enough significance to be introduced in advance of the description of the techniques enough significance to be introduced in advance of the description of the on the design for their use. Tables 7.1 and 7.2 provide a summary of the viewpoints of the design model that each of these forms can provide, and list the characteristics that can be captured through its use. example than one name. (Michael Jackson’s Structure Diagram is a particularly good the aid of pencil and paper alone. In Chapter 5, we identified this as an important the aid of pencil and paper alone. In should meet, and hence it has been used as one criterion that any diagrammatical form of the selection criteria for this chapter. when specific methods are reviewed. (In particu- further examples will be encountered have been deferred until they can be shown lar, the examples of mathematical forms discussed in this chapter are considered to be of in a fuller context.) However, the ones amenable to being neatly classified and categorized, not least because some forms play amenable to being neatly classified and However, the idea of ‘black box’ and ‘white box’ multiple roles in the design process. to ‘what’ and ‘how’ respectively), has been descriptions (roughly corresponding of the roles that a given notation can per- adopted here as providing a useful indication are ones that can be easily produced with form. In addition, all of the forms described (Remember too that some notations used for software design may well have originated (Remember too that some notations cases, even before the invention of computers!) with quite different purposes – in some the activity of design is a creative process, and As emphasized throughout this book, subject to personal preference when it comes hence the forms that go with it are also to a question of use. n n n as wide a spectrum as possible. as wide a For this chapter, which looks general classifications for these. tations, and gave some been made so as to range across the selection from these forms has at specific examples, the spectrum of: 7.1selection of A problem that forms many design representation from the examines a selection This chapter representation forms, very many such methods. There are software design are used in a than producing forms, and rather of the more popular variants on some as well as give chosen to a fairly small sample, focuses upon list’ of these, this chapter ‘laundry

Some design representations 128 SDC07 9/18/07 10:53 AM Page 128 AM Page 10:53 9/18/07 SDC07 Black box notations 129 notation is one that is it is to do it. We can also how black box relationships between elements, interfaces activities Design characteristics on flow, dependency of operations Information stores relation with data other operations, entities between design Static relationships an entity State-machine model of including parallelism System-wide state model, and abstraction (orthogonality), hierarchy (operations, data, Form of sequencing adopted actions) and objects Interactions between classes system and other ‘actors’ Interactions between a of system Synchronization and coordination Design characteristics Invocation hierarchy between subprograms, decomposition into subprogram units Uses and dependencies Message-passing sequences, interaction protocols Algorithm form properties of the elements of a design model. That is, it is Functional and constructional Constructional Behavioural Functional Viewpoints Functional, data modelling, behavioural Constructional Behavioural and functional Behavioural and functional Viewpoints Functional Data modelling Behavioural Behavioural an element will do, rather than external what The selection of white box design representations The selection of black box design representations box design of black The selection Our choice of forms is a mixed one, in terms both of historical and technological A final point that follows on the one that was made in the previous paragraph: the A final point that follows on the one Sequence Diagrams Pseudocode Representation form Structure Chart Class and Object Diagrams UML: Diagram UML: Activity Diagram State Transition Diagram Statechart Structure Diagram (Jackson) UML: Class Diagram Representation form Representation Data-Flow Diagram Diagram Entity–Relationship To remind ourselves of the discussion in Chapter 2: a level of detail provided in the descriptions of the following sections is not intended to level of detail provided in the descriptions that will be used in the later chapters be consistent. In particular, those notations described in such complete detail as others, since on design methods are not normally provided in the relevant chapters. further examples of their use will be 7.2 notations box Black Table 7.2 Table 7.1 Table factors. We begin with the Data-Flow Diagram (DFD), a form which is generally factors. We begin with the Data-Flow Diagram (DFD), a form which concerned with the used to describe used to help consider such forms as performing the role of ‘external memory devices’, 1994). increase the limited capacity of human working memory (Vessey and Conger, SDC07 9/18/07 10:53 AM Page 129 AM Page 10:53 9/18/07 SDC07 Structured . In the same spirit, the simple flow , 1999). process et al. , he gives an example of an informal flow diagram , he gives an example of an informal The DFD has been widely used for software design purposes over many years, and The DFD has been widely used for software design purposes over many years, Even this simple example is sufficient to show one of the strengths of the DFD Even this simple example is sufficient The general nature of the DFD concept has been shown very effectively through The general nature of the DFD concept The use of some form of DFD for describing the operation of complex systems of DFD for describing the operation The use of some form tion and performs a somewhat different role in the design process, is that used by the tion and performs a somewhat different role in the design process, is that 1992). Structured and Design Method (SSADM) (Longworth, much greater complexity than this simple example. DFDs are a number of variations in the exact forms of the symbols used for drawing the form that to be found in the literature. This chapter will concentrate on describing since Chapter has been popularized through the work of De Marco (1978) and others, nota- 13 will be making use of this. Another example form, which uses a more ‘formal’ when used to describe a sequence of operations, namely that one can readily see the when used to describe a sequence of glance. For example, if we take operation 5, ‘fit prerequisites for any operation at a dependent upon having the completed results of door to walls’, we can see that it is can see why. Sequential lists of actions may be operations 3 and 4 available, and we but the dependency aspect, which is so easily able to convey the same information, is generally less clear in such forms. The benefits visualized through the use of a DFD, more important for operations that involve of this ready become even flow’ in this case is physical (consisting of subassemblies), the principle is the same as flow’ in this case is physical (consisting an excellent demonstration of the effectiveness for software, and the example provides a of such a form when it is used to describe form can be used to describe the assembly of a diagram in Figure 7.1 shows how this garden shed. it is likely to have originated in a number of places and times, all quite independently. it is likely to have originated in a number (although admittedly this one is largely folklore) The earliest reference that he can find dates from the 1920s. (1978). In the introduction to his book an example used by Tom De Marco Analysis and System Specification for a kayak. While obviously the ‘data being used to clarify the assembly instructions The DFD is mainly used for describing a very problem-oriented view of the workings used for describing a very problem-oriented The DFD is mainly the flow of information a description based on modelling of a system. It provides making use of or modi- of operational elements, with each element around a network flowing into that element. fying the information era, and Page-Jones (1988) has suggested that almost certainly predates the computer less explicitly related to any one viewpoint. Finally, we examine the recent develop- to any one viewpoint. Finally, we less explicitly related examine some representative Modeling Language (UML), and ment of the Unified this (Rumbaugh black box forms from 7.2.1 Diagram The Data-Flow considered to have been employed for system modelling well before the computer era the computer before well modelling for system employed have been to considered The style. architectural important to an related course, strongly is, of and which began architectural related to an important (ERD) is again Diagram Entity–Relationship two then consider forms). We one (transaction-based a very different style, albeit with Statechart, each (STD) and the Transition Diagram forms, the State behavioural offers a quite Structure Diagram limitations. The Jackson strengths and its particular ‘structure’ and hence concerned with notation: being more example of such a different

Some design representations 130 SDC07 9/18/07 10:53 AM Page 130 AM Page 10:53 9/18/07 SDC07 Black box notations 131 A flow diagram providing instructions for the assembly of a simple garden shed. A flow diagram providing instructions for Figure 7.2 shows an example of the use of a DFD to describe the operation of a bank Figure 7.2 shows an example of the use of a DFD to describe the operation autoteller (cashpoint) system. The four basic elements that are used in the diagram are: autoteller (cashpoint) system. The four basic elements that are used in the The form of the DFD symbols. The DFD is a graphical representation, and it makes use of only four basic it is Because of its highly abstract nature, in terms of the level of description provided, – at a time chiefly used during the early design stages that are often termed ‘analysis’ when the designer is likely to be making major architectural design decisions. Figure 7.1 SDC07 9/18/07 10:53 AM Page 131 AM Page 10:53 9/18/07 SDC07 domain problem , and as such it identifies the solution A top-level DFD describing the operations performed by a bank autoteller machine. A top-level DFD describing the operations So essentially this DFD provides a top-level ‘model’ of how the designer intends So essentially this DFD provides a top-level ‘model’ of how the designer To take an example from the operations described in Figure 7.2; the validation To take an example from the operations the parallel bars, used to denote a data store or file; the parallel bars, used to denote a data of information between the other three the arc, used to denote the flow components. the circle (or, as it is popularly termed, the bubble), which is used to denote an the circle (or, as it is popularly termed, description of the operation; operation, and is labelled with a brief source or sink of information; the box, used to denote an external (customer, PIN, transaction), rather than of the main architectural tasks for the autoteller system. (proceeding to the selection of the required transaction by the customer) or rejection (proceeding to the selection of the required transaction by the customer) given to pro- (which may involve returning or retaining the card). Even if permission is involved to ceed further with the transaction, there will be a further validation process ensure that the option selected is permitted for this customer. the autoteller to operate. It is expressed in terms that are part of the include denoting it by the use of a single bar or by an open-ended box.) include denoting it by the use of a single card, from the customer (in the form of operation requires inputs from the customer’s PIN) and from an internal directory. The first the personal identification number or the customer’s identity, while the third ensures two of these are used to authenticate a different financial institution) is acceptable to that the card (which may be issued by are then concerned with either acceptance the machine. The outputs from this process n n seems to vary in practice; other conventions (The form used to describe a data store Figure 7.2 n n

Some design representations 132 SDC07 9/18/07 10:53 AM Page 132 AM Page 10:53 9/18/07 SDC07 Black box notations 133 flow that is asso- control An expansion of one of the ‘bubbles’ from the top-level DFD for the bank autoteller An expansion of one of the ‘bubbles’ from In this example, the designer has elaborated on his or her ideas for the oper- In this example, the designer has elaborated on his or her ideas for An important characteristic of the DFD is that it can be expanded in a hierarch- An important characteristic of the DFD Figure 7.3 machine. of a bubble, its position within an expanded description of the system. by ation ‘Validate customer access’. Note particularly that in the operation represented bubble 1.3, there is no attempt to show the structure of the ical fashion, with the operation of any bubble being described by means of a further ical fashion, with the operation of any shows an expansion of bubble 1 of Figure 7.2, DFD. As an example of this, Figure 7.3 emphasizes the significance of the numbering using the same symbols. This also since the identity number indicates the ‘level’ scheme used for identifying the bubbles, forming this operation, and its details will need to be elaborated later, using other forming this operation, and its details will need to be elaborated later, forms for its description. ciated with the possible iteration required to permit the customer three attempts at ciated with the possible iteration required to permit the customer three in per- entering the PIN. The DFD is not concerned with the control logic involved SDC07 9/18/07 10:53 AM Page 133 AM Page 10:53 9/18/07 SDC07 rather than a computer-oriented solution. De rather than a computer-oriented solution. , in that they identify the operations that need to be , in that they identify problem functions DFD is used to model a system in terms of the physical entities con- DFD is used to model a system in terms physical Figure 7.5 shows the equivalent logical DFD, in which the bubbles are now Figure 7.5 shows the equivalent logical DFD, in which the bubbles The In this role, one of its benefits is that it can fairly easily be understood by the user, In this role, one of its benefits is that The point about abstraction is an important one when it comes to the conventions is an important one when The point about abstraction While expansion is valuable in allowing for the gradual refinement of a design, of a design, gradual refinement for the allowing in is valuable expansion While initial modelling tasks and with communication with the customer, while the logical initial modelling tasks and with communication with the customer, while model DFD is necessary when the designer begins to build up the architectural any detail. (For example, Roger clearly handles all arrangements concerning rail travel, any detail. (For example, Roger clearly handles all arrangements concerning although we can only conclude this by examining the data-flow arcs.) it. This is a labelled to show what is being done to the data, rather than who is doing 7.4, but is more abstract and more structured view of the system described in Figure helps with clearly derived from it. Both of these forms are important: the physical DFD since it is used to model the ‘logical’ and ‘physical’ DFDs, which it is Marco makes a distinction here between useful to consider. example, Figure 7.4 shows a physical DFD that cerned, rather than their functions. For booking system in a travel office. The labels on is used to model the workings of the who does a job, rather than describing the job in the bubbles in this diagram indicate Because of its abstract nature and ability to describe function, the DFD is widely used Because of its abstract nature and ability termed ‘analysis’). It is a major component for the initial modelling of systems (often Systems Analysis and Structured Design) of the widely used SSA/SD (Structured 13, and it is also used in the various derivat- approach, which is described in Chapter ives of this method. ment about whether the operations are to be performed sequentially or in parallel. The ment about whether the operations are operations (see Chapter 13), but the DFD convention is usually to assume sequential operations. Indeed, some design methods make can equally be used to describe parallel use of it in this way. Using the DFD to be performed, as well as that which is generated by them. well as that which is generated by to be performed, as 7.3 has already raised this when drawing such diagrams. Figure that should be used user is permitted when enter- describes the number of tries that the point: bubble 1.3 directly in any way. On this diagram does not show the iteration ing the PIN, but the the form of the diagram makes no state- same point about sequencing information, The DFD viewpoint the architecture of a are primarily concerned with describing Data-Flow Diagrams its system in terms of description. The data-flow ele- using an abstract level for the performed by the system, for the appropriate operations the information that is needed ment is used to identify it can also lead to problems of inconsistency: changes may be made to a lower-level be made may changes inconsistency: of to problems also lead it can flow arcs in the parent the information and/or form of alter the number diagram that of numbering (as well as automatic of such changes Consistency checking diagram. that are quite widely drawing tools by the specialist is generally provided bubbles) production of DFDs. to assist with the available

Some design representations 134 SDC07 9/18/07 10:53 AM Page 134 AM Page 10:53 9/18/07 SDC07 Black box notations 135 A ‘logical’ DFD describing a travel agency booking system. A ‘physical’ DFD describing a travel agency booking system. A ‘physical’ DFD describing a travel agency Figure 7.5 Figure 7.4 SDC07 9/18/07 10:53 AM Page 135 AM Page 10:53 9/18/07 SDC07 Entity– , 1992; Stevens, et al. has provided an essential foundation for the development of the foundation for the development has provided an essential is a class of elementary facts relating two or more entities; is a class of elementary facts relating are real-world objects with common properties; are real-world objects with common The basic Entity–Relationship notation. relationship Figure 7.6 shows the three principal symbols that are used in these diagrams, Figure 7.6 shows the three principal However, ERDs can play other roles apart from their use in . For play other roles apart from their However, ERDs can As mentioned earlier, other forms of DFD are used to help with more detailed used to help with forms of DFD are earlier, other As mentioned entities a to differ in detail.) These basic elements are defined as follows: to differ in detail.) These basic elements n n widely used forms seem to have been derived from the notation devised by widely used forms seem to have been on the more ‘generic’ elements of the (1976). This section will seek to concentrate detailed nuances of the form. notation, and will not explore the more symbols for entities and relationships are fairly together with their meanings. (The of attributes and other qualities are apt standard, but beyond that the representations system (Page-Jones, 1988; Stevens, 1991), while on a larger scale they can be used to system (Page-Jones, 1988; Stevens, 1991), more complex and abstract design ‘objects’ model the relationships that occur between (Booch, 1991). The Entity–Relationship notation exhibit ‘local’ variations, but most of the In their detailed form, many ERD notations static data objects in a problem model or a design model. In particular, the in a problem model or a design model. static data objects Relationship Model (Batini are used in many database systems relational models that 1991). model the detailed form of the data stored in a example, they are sometimes used to intuitive appeal to the DFD: it can be understood relatively easily, and can often be the DFD: it can be understood relatively intuitive appeal to description. than could many other forms of developed more easily 7.2.2 Diagram Entity–Relationship The relationships that exist between is principally used to capture the This form of diagram required in order to build the system. (In this case, the system will presumably be some will presumably the system this case, (In the system. to build in order required system.) reservation of automated sort This of this tool. the general usefulness that emphasizes of a design, a point modelling is terms of actions (as easy to think in it is often relatively the fact that in turn reflects place on providing languages that older programming by the emphasis demonstrated is therefore a strong structures). There rather than data describe actions forms that Figure 7.6

Some design representations 136 SDC07 9/18/07 10:53 AM Page 136 AM Page 10:53 9/18/07 SDC07 Black box notations 137 might later be ) and ‘many to n position might be connected by the might be connected teacher -ary’ properties. Binary relationships -ary’ properties. Binary and n .) , while the attribute , while the attribute ) student height m examines -ary property is to set bounds upon the cardinality of -ary property is to set bounds upon the , and n and ) held in library (of order 1) ) held in library (of n bearing , range ). Examples of these are: ). Examples of these ) having written books ( are classes of values that represent atomic properties of either entities or entities of either properties atomic represent values that of are classes attends-class-of n n An ERD showing a simple relationship between two classes of entity. to m The development of an ERD typically involves performing an analysis of speci- The development of an ERD typically Relationships are also classified by their ‘ Relationships are books (entity of order books (entity of order authors ( attributes attributes as can be seen more recognizable, entities are often the (attributes of relationships examples). from the Figure 7.7 shows an example of the ERD form being used for describing information about some shows an example of the ERD form the data structures that might be used in fairly recognizable entities, and so describes some form of indexing system. (In the latter case, an author may have written many books, and a book may have mul- (In the latter case, an author may have tiple authors.) The effect of the relationship. the values that are permitted by the the terms in these as entities, relationships fication or design documents, classifying the basis for developing an ERD. Figure 7.7 or attributes. The resulting list provides n n may be composite, with higher-level attributes being decomposed into lower-level with higher-level attributes being may be composite, the attributes attributes. (For example, relationships decomposed into n and involved, the level of abstraction of course, vary with of an entity will, The nature relationships between the nature of the of its attributes and will the form so, therefore, and attributes one type of relationship, by more than may be connected them. Entities ‘husband’ and ‘wife’. Relationships may also be ‘one to many’ (1 to Relationships may also be ‘one ‘husband’ and ‘wife’. link two entities, such as the relationship ‘married to’ occurring between the entities as the relationship ‘married to’ link two entities, such many’ ( SDC07 9/18/07 10:53 AM Page 137 AM Page 10:53 9/18/07 SDC07 An ERD relating some of the major entities in an air traffic control system. An ERD relating some of the major entities In contrast to this, Figure 7.8 offers an example of a more system- and design- In contrast to this, Figure 7.8 offers an example of a more system- and made earlier, concerning the possible existence of multiple relationships between two made earlier, concerning the possible existence of multiple relationships entities. Figure 7.8 in a basic air related use of the ERD form to model the entities that might be involved that was traffic control system. This figure also provides a simple illustration of a point

Some design representations 138 SDC07 9/18/07 10:53 AM Page 138 AM Page 10:53 9/18/07 SDC07 Black box notations 139 (pronounced ‘vee eye’) has two vi editor, in which the bubbles represent the states vi , in which keystrokes are interpreted as commands to the editor to , in which keystrokes are interpreted , in which any keystrokes are interpreted as data to be stored in the , 1992). This is a rather specialized area of system design, and as such has specialized area of system design, , 1992). This is a rather et al. As an example, the popular Unix screen editor As an example, the popular Unix screen A process executing in a computer fits this model quite well. Its ‘state’ at any point A process executing in a computer fits The data-modelling viewpoint is also used as a subsidiary viewpoint in a number viewpoint is also used as a subsidiary The data-modelling insert mode editor’s buffer. command mode a file, moving the position of the screen cursor, perform such operations as opening or beginning to insert text at some point; ition (namely, pressing the Escape key). Figure 7.9 shows a simple diagrammatical description of this model of the n com- Transitions occur between these modes according to certain forms of ‘escape’ between mand. There are many commands that can be used to make the transition reverse trans- command mode and insert mode, but only one that can be used for the basic states of operation, which are termed its current ‘modes’. These are: basic states of operation, which are n between the states. of the contents of its variables and the values of in time can be described fully in terms notably the program counter register, whose any associated registers in the CPU, most will be executed next. While we might not wish contents determine which instruction a process in terms of all its possible states, there to model the complete behaviour of can be considered. might be some useful supersets that 7.2.3 Diagram Transition The State can usefully be described by considering them Some classes of problem (and solution) can be considered as existing in a finite set of as ‘finite-state automata’. Such a system being the triggers that can lead to transitions possible ‘states’, with external events of design methods. One example in which it occupies such a role is the SSA/SD One example in which it occupies of design methods. described in Chapter 13: Analysis and Structured Design) method (Structured Systems SSADM, which uses a variant the ‘object’ forms of Chapter 15 and other examples are plays a relatively minor role in in this section. However, it of the notation described when compared with its central role in database the procedures of all these methods, design and development. ERDs are widely used for developing the schema used in relational database modelling for developing the schema used in ERDs are widely used (Batini probably fits somewhere in this book. (The design of databases not been addressed for producing compilers, and form of design that is widely used between the ‘template’ in this book.) systematic forms described later the more general-purpose The ERD viewpoint The of viewpoint a data-modelling concerned with providing purely and simply ERDs are the the analysis of be used both during they can As with many notations, a system. (design). of the solution and during the development problem ERD Use of the SDC07 9/18/07 10:53 AM Page 139 AM Page 10:53 9/18/07 SDC07 above text editor. vi has a rich set of commands for this vi can be considered as a substate of command mode. can be considered as a substate of command identifies the condition that will cause the transition to describes the actions that arise as a result of the transition is described by an arrow, and identifies a ‘legal’ change of state that is described by an arrow, and identifies represents an externally observable mode of behaviour, and is represented represents an externally observable mode A simple state-transitional description of the Unix A simple state-transitional Line command mode transition condition transition action transition state The form of this is a little more structured than that which was used in our first The form of this is a little more structured Figure 7.9 is a simple example of a form of STD (several conventions for these are Figure 7.9 is a simple example of a form The a specific (there may be several, and they might occur simultaneously, or in can occur within the system. The not con- occur – usually in terms of the event that causes the transition – but is cerned with the actual mechanism. It is written next to the transition arrow, a horizontal line. The its behaviour. by a box, with a text label that describes The n n example. There are four principal components to this representation of an STD. example. There are four principal components n n In Chapter 13, when we come to consider the extensions to SSA/SD, the Structured In Chapter 13, when we come to consider Method, we will encounter a number of Systems Analysis and Structured Design real-time systems. In the extension devised by extended methods that are aimed at a form of STD that will now be considered Ward and Mellor (1985), they introduced in a little more detail. in use), and it provides a convenient means for modelling many other systems too. in use), and it provides a convenient (or ‘reactive’) systems can often be usefully mod- Indeed, the general class of real-time nature leads readily to the use of such a form. elled in this way, since their event-driven The form of the STD (modes), and the arcs correspond to the transitions, labelled by the events (commands) correspond to the transitions, labelled (modes), and the arcs cause the editor to enter insert occur. (Not all the commands that that cause these to clarity, as mode are shown, in order to maintain purpose.) Figure 7.9

Some design representations 140 SDC07 9/18/07 10:53 AM Page 140 AM Page 10:53 9/18/07 SDC07 Black box notations 141 (which has initial state text editor can be modelled vi the horizontal line and the details of the trans- the horizontal line and the details of text editor using an STD (Ward and Mellor). text editor using an STD vi below (which will have transitions into it, but none out from it). (which will have transitions into it, but A description of the Unix A description of the Unix final state Figure 7.11 shows a rather more complicated system modelled in this way (com- Figure 7.11 shows a rather more complicated Figure 7.10 shows how the earlier example of the Figure 7.10 shows how the earlier example sequence). These are written ition conditions. Figure 7.10 an arrow pointing in to it, with no source state attached), and may (possibly) need to an arrow pointing in to it, with no source identify a possibility that particular transitions will occur, with no indication as to how these will possibility that particular transitions will occur, with no indication as to how be sequenced. The STD viewpoint behavioural The STD is our first example of a representation that is used to capture a of the viewpoint of a system, and so it is concerned with modelling dynamic attributes identifies the system in terms of entities such as states, events and conditions. It only plicated in the sense of having many more states). In this case, the system described is plicated in the sense of having many as a component of an air traffic control sys- the behaviour of an aeroplane modelled state to be entered is the primary radar detecting tem. The event that causes the initial The complexity of the transitions involved in this the aircraft as it enters the airspace. number of actions that the aircraft might take, example arises because of the sheer to being stacked before landing, and of com- from simply flying through the airspace, binations of such events. using this form of STD. Note that multiple transitions are still permitted between a using this form of STD. Note that multiple all possible transitions are shown, in order to given pair of states. (Once again, not action has been identified to determine when the avoid too complex a diagram.) An has been identified as the initial state when the editor terminates, and command mode editor begins operation. To complete the diagram, we also need to identify a default To complete the diagram, we also need SDC07 9/18/07 10:53 AM Page 141 AM Page 10:53 9/18/07 SDC07 editor has shown, if there are a lot of transitions vi An STD describing the behaviour of an aircraft in an air traffic control zone. An STD describing the behaviour of an aircraft The STD is a useful modelling tool, but as with all diagrammatical forms, it has The STD is a useful modelling tool, limitations. As the example of the Similarly, between a small number of states, the diagram can become very tangled. does not large and complex systems result in large and complex diagrams, as the form section we lead directly to any form of hierarchical layering of diagrams. In the next problem of describe another state-oriented form of description that overcomes the layering by adding a hierarchy to the states themselves. Use of the STD problem entities: although it can have a role A major role for the STD is in modelling is less significant. It is also particularly useful in in building models of solutions, this of a system, hence its popularity in real-time modelling some of the real-time needs variants of design methods. Figure 7.11

Some design representations 142 SDC07 9/18/07 10:54 AM Page 142 AM Page 10:54 9/18/07 SDC07 Black box notations 143 The elaboration of the description of a state is similar to the form used in the The elaboration of the description of a state is similar to the form used Figure 7.12 shows an example of the use of this notation, to describe the operation Figure 7.12 shows an example of the The Statechart shares a generality of role with the STD too. Both of these forms a generality of role with the STD The Statechart shares and their powers of description is provided By far the best tutorial on Statecharts The Statechart was devised by David Harel (1987; 1988) and he has observed that devised by David Harel (1987; 1988) The Statechart was Jackson Structure Diagram, described in the next section, in that the state ‘display’ is Jackson Structure Diagram, described in the next section, in that the state ‘display’ an abstraction of the three states ‘picture’, ‘text’ and ‘mixed’, so that selecting above ‘picture’ shows that this will be the default state, which will be entered when the above ‘picture’ shows that this will be the default state, which will be entered be used to set is switched to ‘display’ (an extension of this particular convention can remembers indicate when selection is made by means of some ‘history’ mechanism that be entered the previous use of these states). Note also that the state ‘mixed’ can only from ‘text’. of a Teletext . Figure 7.12(a) shows that the set has two states, ‘standby’ of a Teletext television set. Figure 7.12(a) ‘display’ and ‘standby’ occurs in response to the and ‘display’. The transition between the remote control. The reverse transition will operation of the ‘standby’ button on is pressed. In Figure 7.12(b) the description of occur when any button on the control and it is now elaborated into the three encap- the state ‘display’ is expanded further, ‘picture’, ‘text’ and ‘mixed’. The small arrow sulated states, which are labelled as In this notation, a state is denoted by a box with rounded corners, labelled in the upper In this notation, a state is denoted by by encapsulation, and directed arcs are used to left corner. Hierarchy is represented The arcs are also labelled with a description denote a transformation between states. parenthesized condition. (Conditions are quite of the event and, optionally, with a it might not be possible to engage a cruise con- common in real systems. For example, accelerating or braking.) trol mechanism in a car while either in Harel (1987), where the author uses the functions of the Citizen Quartz Multi- in Harel (1987), where the author examples. The examples below are rather less Alarm III watch as the basis for his some basic ideas about the scope of this particu- inspired, but should at least provide lar form of description. The form of the Statechart designer to describe transitions that are ‘orthogonal’ in that they are completely inde- transitions that are ‘orthogonal’ in designer to describe to occur in parallel. – so making it possible for the transitions pendent of each other as well as the functioning of a the structure of a problem, can be used for describing generally come from the former.) solution. (However, the better examples it is based on the more general concept of the ‘higraph’, which in turn has a range of general concept of the ‘higraph’, it is based on the more ‘this rather mundane name should perhaps discount his claim that applications. (We unused combination of “flow” of a better one, simply as the one was chosen, for lack rather more abstract form of or “chart”.’) It provides a or “state” with “diagram” state-oriented viewpoint the STD, and in particular it adds to the description than the as well as permitting the of abstraction in the description, ability to create a hierarchy 7.2.4 The Statechart is concerned section, the Statechart in the preceding that was described Like the STD automaton, or finite- form of finite-state of a system as a the behaviour with describing in well suited for use is particularly it is a form that Like the STD, state machine. response to particular functions arise in in which the main reactive systems, describing events. SDC07 9/18/07 10:54 AM Page 143 AM Page 10:54 9/18/07 SDC07 A Statechart describing a Teletext television set. (a) The two main states A Statechart describing a Teletext television Figure 7.12(c) shows the first diagram expanded in a bottom-up rather than Figure 7.12(c) shows the first diagram a system. However, there are some significant differences between them in terms of the a system. However, there are some significant differences between them in attributes that they each capture. single diagram and be readily comprehended. Of course, the diagrams themselves can single diagram and be readily comprehended. Of course, the diagrams themselves also be layered in a hierarchical fashion.) The Statechart viewpoint of Like the STD, the Statechart is concerned with providing a behavioural description denote any transitions that apply equally to all the encapsulated states, by showing denote any transitions that apply equally in, for example, ‘standby’ in Figure 7.12(b). them as applied to the outer box as states are now shown to be within a superstate top-down fashion. The two initial about how many levels of a hierarchy can be ‘powered’. (There are no specific limits are practical issues of notational complexity shown in a diagram, but obviously there levels seem to be as many as can fit easily on a that limit this. About two or three must result in selecting one of these three states. In the Jackson Structure Diagram must result in selecting one of these of a tree, while in the Statechart it is denoted by abstraction is denoted by the levels form is that it makes it relatively simple to encapsulation. One benefit of this latter (c) A more abstract description of (a). Figure 7.12 of the states shown in (a). of the television set. (b) An expanded description

Some design representations 144 SDC07 9/18/07 10:54 AM Page 144 AM Page 10:54 9/18/07 SDC07 Black box notations 145 . Figure 7.14 shows an example of a state A that can be described as a Describing orthogonality in the Statechart notation. Describing orthogonality in the Statechart Statechart describing the actions of an aircraft in an air traffic control system. the actions of an aircraft in an air traffic Statechart describing The remaining major feature of the Statechart that ought to be described here is The remaining major feature of the Statechart that ought to be described When comparing this with the STD form used in Figure 7.11, we can see that When comparing this with the STD Watches and television sets have the advantage that the events that cause state Watches and television sets have the of further states, but these are essentially independent groupings. Events may be com- of further states, but these are essentially independent groupings. Events event a. Also, mon, as can be seen from the description of the transformations due to systems through a hierarchy of diagrams and states. In that sense they are largely com- systems through a hierarchy of diagrams and states. In that sense they are and the plementary, with the STD perhaps being more suited to modelling problems, Statechart being better suited for modelling detailed solutions. orthogonality in terms superstate of two orthogonal states B and C. B and C can in turn be described description of an aircraft in an air traffic control system, this time using the Statechart. description of an aircraft in an air traffic and transition are common to both, the STD while the descriptions of state, event in terms of the actions that occur, while the provides a more detailed description for describing abstraction, defaults, history, Statechart has more refined mechanisms of hierarchy also limits it largely to describing the and, of course, scale. The STD’s lack whereas the Statechart can describe whole behaviour of individual design elements, Figure 7.14 terms of button presses, and hence are readily changes are directly identifiable in of Figure 7.11 into this form, and shows a described. Figure 7.13 reworks the example Figure 7.13 SDC07 9/18/07 10:54 AM Page 145 AM Page 10:54 9/18/07 SDC07 , et al. A Statechart describing the architecture of a computer. A Statechart describing the architecture of Figure 7.15 shows this concept in terms of the basic architecture of a computer. Figure 7.15 shows this concept in terms Orthogonality is important in reactive systems, where we expect to observe a suit- Orthogonality is important in reactive system uses two other viewpoints of a system, in addition to this form (Harel system uses two other viewpoints of a system, in addition to this form 1990).) Use of the Statechart an import- The Statechart is clearly a powerful and useful tool, and like the STD it has other ant role in modelling reactive systems. Both forms are generally used to support design viewpoints such as data flow. (To reinforce this point: Harel’s ‘STATEMATE’ The state of the computer is shown as a compound of the state of the CPU and the state The state of the computer is shown as something of a simplification). The two have of the main memory (this is obviously events that are common to both. When the com- various substates, and there are some a default state that is expressed in terms of puter is first powered up, they each assume is communication via some memory bus, and their internal operations. While there might also be accessed by device controllers hence some synchronization, the memory suitably separated from those of the CPU. or the like, and so its operations are cause its cruise-control system to change its setting, for example, and lowering the cause its cruise-control system to change not affect the settings of the wing surfaces. In undercarriage of an aircraft should well be changed by the pilot when lowering the latter case, the wing surfaces may routine for landing, but the two should not the undercarriage, as a part of the general be linked automatically in any way.) in describing A, note that we need to identify the default entry to states B and C, shown in describing A, note that we need to F. here as being the inner states D and groups of parallel functions, although all might able separation of concerns between (Switching on the lights of a car should not be working towards the same objective. Figure 7.15

Some design representations 146 SDC07 9/18/07 10:54 AM Page 146 AM Page 10:54 9/18/07 SDC07 Black box notations 147 The basic notation is very simple, and is based upon three forms of box: The basic notation is very simple, and Since this notation will be used extensively in the later chapters of this book (albeit Since this notation will be used extensively so in Figure 7.16(b) the previous description of tea-making is extended to include so in Figure 7.16(b) the previous description of tea-making is extended to the possibility of using either China tea or Indian tea. that Figure 7.16(c) the description is further extended by including the possibility we might put more than one spoonful of tea into the pot. of making tea is described as a series of actions. of making tea is described as a series sequence selection iteration There are a number of rules used in constructing these diagrams, but the most There are a number of rules used in constructing these diagrams, but shows that important is: ‘forms cannot be mixed within a sequence’. Applying this rule 3. A box with an asterisk in the upper right corner denotes an iteration, and so in abstractions of the lower boxes.) 1.so in Figure 7.16(a) the action A simple box denotes a component of a sequence – 2. selection from an option, and A box with a circle in the upper right corner denotes The form of the Structure Diagram of a ‘tree’, constructed from a set of boxes and The Structure Diagram takes the form an elaboration of the description contained in arcs. Each set of ‘child’ boxes provides of a complete sequence is described by the parent box, and hence the full description (In that sense, the parent boxes are themselves the lowest boxes on each branch. entity. (Arguably, the one exception to the above statement is the ERD. Although this entity. (Arguably, the one exception many ‘class and object’ notations are loosely might be true for the original notation, based upon its form.) will concentrate on the basic ‘rules of form’ under a variety of names), this section of its use until later. involved, leaving the main examples entity whose form is being described. Indeed, it can be used to describe the form of is being described. Indeed, it can be entity whose form of program actions (func- modelling viewpoint); the sequencing a data structure (data might occur for some form of or the sequencing of ‘states’ that tional viewpoint); certainly unique to this nota- viewpoint). This feature is almost ‘object’ (behavioural describe in this book are effectively linked to a tion; all of the other notations that we are also linked to a particular form of design particular viewpoint, and generally n n n it purely describes sequen- is an especially abstract notation, since In many ways this assumed about the type of no particular interpretation being tial structuring, with 7.2.5 Diagram Structure Jackson The in that is described Chart notation to the Structure similar in appearance Although and set of attributes, a very different Diagram describes the Structure Section 7.3.1, with concerned 1988a). It is basically of roles (Cameron, a very different set performs forms: three ‘classical’ structuring in terms of the sequential structure, describing SDC07 9/18/07 10:54 AM Page 147 AM Page 10:54 9/18/07 SDC07 and functional data modelling A Jackson Structure Diagram describing the operation of making tea. (a) A simple A Jackson Structure Diagram describing the viewpoint, when used to describe the sequential structuring of data objects. They can viewpoint, when used to describe the sequential structuring of data objects. also be used for describing a viewpoint that has elements of both abstraction of ‘carriages’ above the iteration box, as shown in Figure 7.17(b), in order abstraction of ‘carriages’ above the iteration box, as shown in Figure 7.17(b), to keep the first level of abstraction as a pure sequence. The viewpoints provided by Structure Diagrams As already indicated, Structure Diagrams can be used to provide a Figure 7.16 (c) Adding iteration and choice. sequence of actions. (b) Adding a choice. it, it may be necessary to add an additional Figure 7.17(a) is incorrect. To correct

Some design representations 148 SDC07 9/18/07 10:54 AM Page 148 AM Page 10:54 9/18/07 SDC07 Black box notations 149 viewpoints, when they are used to describe the actions of a program or an viewpoints, when they are used to describe An example of an incorrect Structure Diagram. (a) The sequence and iteration An example of an incorrect Structure Diagram. Since this form will occur so often later in the book, these roles will not be out- Since this form will occur so often later in the book, these roles will not In Figure 7.20 an example of this form is used to describe the dynamic form of a In Figure 7.20 an example of this form Figure 7.18 shows an example of a data structure described in this manner. In this Figure 7.18 shows an example of a data lined any further at this point, and fuller descriptions will be left to the appropriate lined any further at this point, and fuller descriptions will be left to the chapters. As already indicated, this form is ubiquitous. In examining the JSP design method As already indicated, this form is ubiquitous. In examining the JSP design input and (described in Chapter 14), it will be used to describe the structures of the 1992) output data streams. In both the JSD (Chapter 15) and SSADM (Longworth, The title of design methods it is used to describe the ‘evolution’ of entities over time. the form might vary, but the basic notation does not. program. In this example, the task of the program is to print out a page of a monthly program. In this example, the task of related to the appearance of the statement on the bank statement. Clearly this is closely page. Uses for the Structure Diagram tion than can normally be provided through pseudocode (see Section 7.3.4). tion than can normally be provided a physical one, as the diagram is used to describe case, the data structure happens to be one. A more conventional programming data the structure of a textbook such as this a simple file of text is described using this structure is shown in Figure 7.19, where form. forms are wrongly mixed on a single level. (b) How this can be resolved by adding a further level forms are wrongly mixed on a single level. of abstraction in the description. behavioural much more abstract form of sequencing descrip- entity. In particular, they provide a Figure 7.17 SDC07 9/18/07 10:54 AM Page 149 AM Page 10:54 9/18/07 SDC07 can be misleading as it refers to the unification of their can be misleading as it refers to the unified A Jackson Structure Diagram describing a static object (the structure of a A Jackson Structure Diagram describing a This section differs from the others in this chapter in that it describes several nota- This section differs from the others in this chapter in that it describes several tions. What is perhaps most striking to the reader is that these are much less distinctive tions. What is perhaps most striking to the reader is that these are much less to this obser- than any of the other notations that we have discussed. (One exception Indeed, one criticism that can be made of the UML is that this process has resulted in Indeed, one criticism that can be made of the UML is that this process has design prac- an excessive number of notations, especially when compared with other been vested tices. Since 1996, the responsibility for the development of the UML has standard in the Object Management Group (OMG), and it was adopted as an OMG the relevant in 1997, although work continues to develop and extend it further as technologies themselves progress. 7.2.6 Forms UML Modelling made to bring together the ideas of three of the The UML emerged from the efforts Booch, and . ‘gurus’ of the ‘object community’: Grady As such, the term the notations making up the modelling language. methodological ideas, rather than of Figure 7.18 textbook).

Some design representations 150 SDC07 9/18/07 10:54 AM Page 150 AM Page 10:54 9/18/07 SDC07 Black box notations 151 do also contain some discussion (1999) although, as often occurs with ‘ref- (1999) although, as often occurs with Unified Process et al. , which is described separately in Section 7.3.3.) To , which is described separately in Section sequence diagram A Jackson Structure Diagram describing a simple file containing text. A Jackson Structure Diagram describing a Since the rest of this section draws upon ‘’ concepts, the reader who Since the rest of this section draws upon ‘object model’ concepts, the reader The UML has already generated quite an extensive literature of its own. The The UML has already generated quite UML and its application. 16 first. is unfamiliar with these might want to read the opening section of Chapter of the UML and examples of its use. At the time of writing there is no single text that of the UML and examples of its use. At the time of writing there is no single of the is widely recognized as offering a particularly clear and authoritative exposition the UML. The text by Stevens and Pooley (2000) provides a rather more user-focused the UML. The text by Stevens and Pooley (2000) provides a rather more rather lack- introduction, although the examples provided in this could be regarded as most ing in depth for anyone wanting to make serious use of the UML. In addition, textbooks that describe the associated development processes for the object-oriented architectural style, and hence this development processes for the object-oriented notations adopted. As a further consequence, in influences the nature and form of the wider conceptual issues relating to software a book such as this, which addresses UML are also of less interest. design, the more ‘fussy’ aspects of the definitive reference text is Rumbaugh a reader with the most accessible introduction to erence’ works, this does not provide Figure 7.19 vation is the ‘unification’ processes involved. It also (partially) some extent this probably reflects the itself. When we come to examine this later reflects the nature of the object paradigm constructional detail is characteristic of the we will see that an early emphasis upon SDC07 9/18/07 10:54 AM Page 151 AM Page 10:54 9/18/07 SDC07 and use case functional , (structural); the constructional (1999) into: class diagram (dynamic). A further dynamic form, the et al. activity diagram (concerned with the organization of the model itself).(concerned with the organization of (relating elements of a system); that is essentially equivalent to that described in Section 7.2.4, (concerned with describing system behaviour); is covered separately in Section 7.3.3 and UML also makes use of a . viewpoints that were introduced in Chapter 5. We will examine three viewpoints that were introduced in A Jackson Structure Diagram describing the actions of a program (printing a bank A Jackson Structure Diagram describing the statechart (structural); and the <> In terms of conventions, it is useful to note that the UML makes extensive use of In terms of conventions, it is useful to note that the UML makes extensive dynamic forms model management structural forms heads to distinguish between different forms of relationship. By convention, where the heads to distinguish between different forms of relationship. By convention, arrows, form of relationship needs to be made explicit, this is placed between double as in diagram sequence diagram form of although some of the notational details differ slightly. and arrow- ‘box and line’ forms and, in particular, often employs variations of line n n to the The first two can be recognized as corresponding behavioural the of the nine UML notations in this section: UML Forms The UML forms are classified in Rumbaugh n Figure 7.20 statement).

Some design representations 152 SDC07 9/18/07 10:54 AM Page 152 AM Page 10:54 9/18/07 SDC07 Black box notations 153 Bank- CurrentAccount and ). Figure 7.21 illustrates of system use is one that . scenario inheritance DepositAccount that are created from these (where these that are created from BankAccount objects , 1992; 1999). From this has emerged the more et al. . Indeed, we can draw an analogy between the use While the concept of the (where a class roughly performs the role of a ‘template’ that performs the role of a ‘template’ (where a class roughly use case A core concept of the object model is centred upon the relation- the object model is centred upon the A core concept of viewpoints, being concerned with relationships that exist between viewpoints, being concerned with relationships classes The UML class notation. forms the basis for creating subclasses relationship (Parnas, 1979) and the concept of relationship (Parnas, 1979) and the concept Classes can be related in a number of ways. The UML recognizes six forms of Classes can be related in a number The UML class diagram therefore provides a means of describing both the classes The UML class diagram therefore provides constructional employed in the ERD described earlier). Figures 7.22 and 7.23 show simple examples employed in the ERD described earlier). a very simple association relationship indicating of two of these. Figure 7.22 shows associated with any number of accounts (for sim- that any customer of a bank may be to being held between only two customers). plicity, we have limited joint accounts are only represented by name, as further details Note too that in this figure, the classes this particular relationship. Figure 7.23 are not considered necessary when describing through inheritance. The general class shows an example of generalization terms of the viewpoints model used in this book, it is therefore largely an element used terms of the viewpoints model used in for albeit at a very high level of abstraction. (potential) implementation elements, flow, generalization, realization and usage) relationship (association, dependency, notation (which draws quite extensively on that with appropriate distinctions in the themselves, and also the interactions between these (particularly those based upon the themselves, and also the interactions uses described in the UML, and this form can be used an example of a simple class as it is of a design. For early design stages, the details of at different stages in the development be omitted or curtailed to the bare minimum attributes and operations might well logical concept embodied in a particular class. At required to represent the appropriate made, so the description can be elaborated. In later stages, as design decisions are are specific instances of a given class, possessing an individual state and identity). of a given class, possessing an are specific instances primary activities in object- for classes is one of the Identification of candidates at the ways of describ- We will return to look more generally oriented design practices. in Section 7.3.2. ing classes and objects be used, the work of Ivar Jacobson has formalized both the concept and also its role be used, the work of Ivar Jacobson has formalized both the concept and in the design process (Jacobson general concept of the Account the basic which, although having different modes of operation, will still possess attributes and operations of the parent class The Use Case Diagram a system is to has been employed informally over many years when determining how describes a general concept) and any describes a general The Class Diagram ships that involve Figure 7.21 SDC07 9/18/07 10:54 AM Page 153 AM Page 10:54 9/18/07 SDC07 aspect. However, they are CurrentAccount behavioural BankAccount in terms of our viewpoints model does offer rather in terms of our viewpoints model does (which can be hardware, people or other systems), (which can be hardware, people or other expresses this idea at a fairly high level of abstraction. expresses this idea at a fairly high level actors DepositAccount use case diagram , 1999). Actors are (rather confusingly and not very elegantly) rep- , 1999). Actors are (rather confusingly describes a particular sequence of these interactions. describes a particular sequence of these use case diagram et al. An example of class generalization via inheritance (UML). An example of class generalization via inheritance An example class association (UML). An example class association categorization to them too. There is nothing inconsistent about doing so. scenario Figure 7.25 shows an example use case diagram, together with a textual example Figure 7.25 shows an example use case diagram, together with a textual Classifying the The UML of one of the component use cases. We should perhaps note that the notations of one of the component use cases. We should perhaps note that the also concerned with the tasks that a system performs, and so we can also ascribe a also concerned with the tasks that a system performs, and so we can also functional boundaries While the viewpoints framework is a useful classification mechanism, the although are not firm, and many notations have elements of more than one viewpoint, case diagram usually in a major/minor balance. What perhaps does distinguish the use is that the balance of these viewpoints is rather more even than is usual. (Rumbaugh four kinds of relationship shown, although two resented by stick figures, and there are form and hence need to be labelled using the of these share a single representational occurs elsewhere in UML). form indicated previously (this ‘overloading’ with the interactions that occur between more of a challenge! Use cases are concerned have a a system and its environment, and hence ticular instantiation of these, so a use case describes a set of possible interactions ticular instantiation of these, so a between a system and other and a of a use case diagram. The use case itself is shown Figure 7.24 shows the basic elements description of a slice of system functionality’ as an oval, and represents ‘a logical Figure 7.23 program and execution thread. In the way that case/scenario relationship and that of possible actions, and an execution thread is a par- a program describes a general set of Figure 7.22

Some design representations 154 SDC07 9/18/07 10:54 AM Page 154 AM Page 10:54 9/18/07 SDC07 Black box notations 155 between actor and use case between actor and use relationships between use cases relationships between their identity using their PIN. the amount required. not exceed the customer’s credit limit. machine, system directs the machine to deliver the cash and debits customer’s account, else request is refused. User is a customer of the bank 1. User enters card in machine and establishes 2. User enters a request for funds and specifies 3. The system checks to ensure that this will 4. If request is valid, and cash is available in the 5. System directs machine to return card. User’s account is debited by the amount withdrawn that links the varieties of a use case with the that links the varieties USE CASE: Withdraw funds Customer ACTORS: PRE-CONDITIONS: BODY: POST-CONDITIONS: <> or <> Bank Indicates employed between these two elements) (only form of link that is <> more general form of these <> cases, labelled to where one use case makes use of other use has indicate the form that a particular relationship Use case (title indicates the activity covered by this use case) covered by this use indicates the activity Use case (title case a role in a use a human) describing Actor (not necessarily funds funds Check Deposit balance Withdraw Simple example of use case modelling (UML). Elements of a use case diagram (UML). <> Figure 7.25 Figure 7.24 Customer (a) The use case diagram(a) simple use case specification A (b) SDC07 9/18/07 10:54 AM Page 155 AM Page 10:54 9/18/07 SDC07 description elements too. behavioural that describes the oper- ). join functional can be thought of as a variant upon the can be thought of activity diagram a previous computation has completed). So the a previous computation has completed). and activity diagram is a thick horizontal line that represents the coordination is a thick horizontal line that represents ), and the second the opposite case where the operation The that effectively ‘routes’ outgoing transitions (this is in prefer- that effectively ‘routes’ outgoing transitions fork . (between activities), shown as an unlabelled arrow. The lack of a (between activities), shown as an unlabelled , shown as a named box with rounded sides. , shown as a named box with rounded transition synchronization bar activity Unified Process decision diamond Key elements in the notation are as follows. The activity diagram is therefore useful for modelling the type of ‘coordinating’ The activity diagram is therefore useful Use case modelling is perhaps one of the most disappointing elements of the UML. disappointing elements one of the most is perhaps Use case modelling this is used, then it becomes necessary to label the transitions to indicate which this is used, then it becomes necessary to label the transitions to indicate condition is employed for a particular route. The into a bar are complete (the coordinat- of the activities. When all of the transitions are ‘fired’. ing bit) then the outward transitions A multiple possible outgoing transitions). When ence to using a notation that shows The The the Statechart, the transitions arise from the label is because, unlike the case of because of external events. actions of the activities themselves, not ating action, termed a proceeds only after two transitions have completed (a Figure 7.26 shows a simple example of an bars are used ation (in part) of a bank autoteller machine. Only two synchronization a coordin- here, one showing division of transitions (where multiple actions occur after n n n n (for example, new data is available executions of statements, or performance of states in such a diagram now represent the ‘firing’ of transitions between the states of actions, and the focus of interest is upon and coordination of the various com- such a system, and hence upon the synchronization therefore resembles, at least in part, the Petri putations and actions. The activity diagram this primarily as a Net Graph (Stevens, 1991). We can classify with some in terms of our viewpoint model, although is rather vaguely described as ‘modelling computations and workflows’ (Rumbaugh, as ‘modelling computations is rather vaguely described description, which can be sum- Pooley (2000) offer a rather clearer 1999). Stevens and and orderings that arise when modelling the essential dependencies marized as one of goals. operations have multiple cannot proceed until certain conditions are met situation where a given computation Use cases represent a powerful and distinctive element, but one that is not really sup- a powerful and distinctive element, Use cases represent might have been hoped. notations anything like as fully as ported by the UML The Activity Diagram and the events that cause than modelling the states of the system state machine. Rather the activity diagram these (as in our earlier example of Statecharts), transitions between provided in the UML are not particularly concerned with representing the details details the representing with concerned particularly are not UML in the provided in which ways of some review A fuller its context. much as itself, so use case of the and Budgen (2001), in Ratcliffe be modelled is provided themselves might use cases of the wider issues come to examine when we later return to this concept and we will role in the procedures case plays a pivotal since the use object-oriented systems, designing of the </p><p>Some design representations 156 SDC07 9/18/07 10:54 AM Page 156 AM Page 10:54 9/18/07 SDC07 Black box notations 157 credit insufficient check account card eject request process cash issue obtain request card accepted card process card rejected Example UML activity diagram: the bank autoteller. Example UML activity diagram: the bank means that we will be revisiting their roles more fully in a later chapter, and so we will means that we will be revisiting their roles more fully in a later chapter, and not expand further on this aspect in this section. the complexity of the UML itself rather than the end problem which is the subject of the complexity of the UML itself rather than the end problem which is the modelling process. Uses of the UML notations style The strong links between these notations and the object-oriented architectural UML viewpoints UML notations is to produce some muddying One consequence of the plethora of of the more disappointing aspects of the UML of the ‘viewpoints picture’. Indeed, one for integrating the different viewpoints within a is the lack of any clear framework rather inward-looking, in that the only notation model. In some ways, the UML is that is really intended to help with managing relating to ‘model management’ is one Figure 7.26 SDC07 9/18/07 10:54 AM Page 157 AM Page 10:54 9/18/07 SDC07 . Sequence viewpoints. viewpoints. object and functional class and constructional , 1974). ). It therefore highlights the dependence of a procedure on the et al. notation can be viewed as one that is largely concerned with describing one that is largely can be viewed as notation call graph The Structure Chart provides a means of recording the details of a program’s The Structure Chart provides a means Its origins lie in the research performed at IBM to understand the problems Its origins lie in the research performed In this section we review a smaller choice of forms than in the previous section, review a smaller choice of forms than In this section we white box lower-level procedures that it invokes. Figure 7.27 shows an example of a Structure lower-level procedures that it invokes. Figure 7.27 shows an example of Chart, in which the three main components are: The form of the Structure Chart procedures The Structure Chart uses a treelike notation to describe the hierarchy of (sometimes (subprograms) in terms of the invocation relationship between them termed a program (Stevens to anyone who is trying to understand its oper- structure in a form that is of great value maintainer, who needs to understand the general ation. It is particularly useful to the in order to make changes that are consistent architecture of someone else’s design, with its form. description and, when allied with an algorithmic form such as pseudocode, can be used description and, when allied with an plan for the programmer. to provide a fairly comprehensive implementation operating system, which in many ways was encountered with the design of the OS/360 programming in the large. A major problem that the first real example of an attempt at of complexity, and the Structure Chart was one the researchers identified was that to resolve and understand the structuring of a of the means suggested for helping very effective way. 7.3.1 Chart The Structure ‘index’ to the hierarchy of procedures within a The Structure Chart provides a visual therefore very much a solution-oriented form of program, using a treelike format. It is style. After that, we review two of the object-oriented notations that seek to describe review two of the object-oriented style. After that, we of details that relate to the concepts the implementation design, although strictly there is widely employed in object-oriented Diagrams are also style. Finally, we exam- their use to that particular architectural no reason to restrict form of description that is not strictly a dia- ine the role of pseudocode, a venerable used to supplement diagrammatical forms in a grammatical one, but which is often draughtsman’s ‘<a href="/tags/Blueprint/" rel="tag">blueprint</a>’. There is still a design process to be performed in translat- process to be There is still a design ‘blueprint’. draughtsman’s the various detailed into the final system (essentially, ing a white box description programming). design activities of architectural styles (per- are also quite closely related to particular and most of these with the Structure Chart, be too surprised at that!). We begin haps we should not call-and-return architectural classical form of description for the which provides a 7.3 notations box White A such not surprisingly, element. So, realization of a design of the detailed some aspect with the tend to be associated notations the the equivalent of these as being of regarding however, be cautious We should,</p><p>Some design representations 158 SDC07 9/18/07 10:54 AM Page 158 AM Page 10:54 9/18/07 SDC07 White box notations 159 ). as the example) are used to indicate where couples PrintString , the recursive calling is indicated by the closed invocation is drawn at the lowest level, because it is called by procedures is drawn at the lowest level, because is an obvious candidate for such treatment, since it is likely to , which provide information about information flow in terms of , which provide information about MatchNode PrintString A Structure Chart describing a small program (first form). A Structure Chart describing a small program , which denotes a procedure (subprogram); , which denotes invocation; side-arrows ReadNextToken box arc procedure arc. in both the top (first) and second levels. Double side-lines (again using a standard ‘library’ unit. There will therefore the designer expects to be able to use a unit. be no further design details for such in a fairly simple manner. For example, in the The use of recursion can be indicated parameter-passing (sometimes termed parameter-passing (sometimes termed of the lowest calling unit – in Figure 7.27, the Procedures are drawn below the level procedure the the the There are a number of conventions that can be identified from this example. Three in There are a number of conventions that particular are as follows: cedure call a number of other procedures in performing its task. The form of the Structure Chart is also hierarchical, in the sense that any box on the The form of the Structure Chart is also hierarchical, in the sense that any this would diagram can itself be expanded using the same form, although normally the pro- only apply to a box drawn at the lowest level. In the example of Figure 7.27, n n n n n n Figure 7.27 SDC07 9/18/07 10:54 AM Page 159 AM Page 10:54 9/18/07 SDC07 (1974). Instead of annotating the diagram with text describing the (1974). Instead of annotating the A Structure Chart describing a small program (second form). A Structure Chart describing a small program et al. , Ada and Modula-2. In using a Structure Chart to record the design of a program , Ada and Modula-2. In using a Structure One of the benefits of this latter form is that it can easily be extended for use with One of the benefits of this latter form An alternative notation that is sometimes used for drawing Structure Charts is An alternative notation that is sometimes ++ The principal role of the Structure Chart is to describe the way in which a program is The principal role of the Structure Chart is to describe the way in which of proced- assembled from a set of procedures. Its primary features are the description although ure function and of connectivity with other procedures through invocation, be an important practice, and one that supports the use of information-hiding. It is be an important practice, and one that supports the use of information-hiding. the use important to record the details of such a direct access form in order to clarify of such practices. The Structure Chart viewpoint table to indicate the parameters for each procedure. table to indicate the parameters for each local permanent data structures, such as Java, programming languages that support C can be added to the table, in which to record written in such a language, a third column that are used by the procedure. In design- the details of any local or ‘instance’ variables the use of direct references to such structures can ing for such programming languages, shown in Figure 7.28, and this is more akin to that which was originally proposed in shown in Figure 7.28, and this is more Stevens become cumbersome, this form uses a separate parameter flow, which can rapidly Figure 7.28</p><p>Some design representations 160 SDC07 9/18/07 10:54 AM Page 160 AM Page 10:54 9/18/07 SDC07 White box notations 161 rela- , 1999). Also, inheritance et al. and uses . In the UML, the term ‘component’ was provided in Section 7.2.6, where the roles was provided in Section 7.2.6, where component diagram class diagram ). ibid. The UML development of the class diagram that is used to describe ‘physical’ Once again, the proliferation of object-oriented practices and programming Once again, the proliferation of Chapter 13 provides an example of a widely used design method in which the an example of a widely used design Chapter 13 provides The Structure Chart contains some information about the organization of a pro- about the organization some information Chart contains The Structure such forms as the Structure Chart is that they are not concerned with invocation hier- such forms as the Structure Chart is that they are not concerned with invocation archy, instead seeking to model such dependencies as the sub-headings.) The UML component diagram 7.21 already incorporates the main features The class notation introduced in Figure namely the descriptions of ‘state’ variables that are needed for white box modelling, class/object. Where such diagrams differ from and of the methods provided by a given section is chiefly concerned with the needs of the latter role. section is chiefly concerned with the of a range of notations and, for the same reasons languages has resulted in the creation our attention upon the provisions made as previously, we will mainly concentrate UML. (Also, since this section is largely a con- for such modelling needs within the ‘formal’ structure and we will omit the usual tinuation of Section 7.2.5, it has a less considered were essentially those that were relevant to black box modelling activities. considered were essentially those that the object-oriented paradigm is that such nota- However, one of the characteristics of and also for quite detailed design, and so this tions are used both for analysis purposes is intended to be used as a replaceable part of a system’ (Rumbaugh tionships. For constructional purposes, both of these are quite important. implementation issues is the that is used to describe ‘a physical unit of implementation with well-defined interfaces 7.3.2 diagrams and object Class A description of the UML provides a plan for the programmer to use, but also gives information that will be useful the programmer to use, but also gives provides a plan for programs!). a program (or to the marker of student to the maintainer of of Structure Charts. When transformations consists mainly output from the design portion of the design, they to describe the algorithmic combined with pseudocode the design process. form a quite detailed set of outputs from The use of the Structure Chart The use of the Structure of abstraction from the final provides a relatively low degree The Structure Chart it can form a useful index a solution and, as was observed earlier, implementation of engineering’ program code a program. (Some tools exist for ‘reverse to the structure of For this reason, it not only the details of the Structure Chart.) in order to construct only the presence of the latter is recorded, with no attempt to indicate anything about anything to indicate attempt with no recorded, latter is of the the presence only is recorded, via parameters of data transfer While the of calls. or sequencing frequency the diagram. primary feature of it is not a amount of construc- providing a certain regarded as also can therefore be gram, and tional information. ‘each component embodies the implementation of certain classes from the system ‘each component embodies the implementation of certain classes from design’ ( SDC07 9/18/07 10:54 AM Page 161 AM Page 10:54 9/18/07 SDC07 for use provided ). Figure 7.30 shows AccountInterface interface-name1 interface-name2 than is used in the wider <<link>> to be supplied from other com- or component required getAccountStatus <<run-time>> <<compile>> component interfaces component-name <<run-time>> <<link>> DisplayControl UserValidation UML component diagram for part of a bank autoteller. UML component diagram for part of a bank Notation used for a component (UML). Notation used for a component updateScreen Because components supply information to each other, the details of the interfaces While this is a more specific view of the term While this is a more specific view of Figure 7.30 (usually in terms of binding time, as in forming an an example of a component diagram that describes some of the elements implementation of a bank autoteller. ponents; both of these are represented by a small circle attached by a line, with an ponents; both of these are represented by a small circle attached by a identifier that represents the given interface. a set of com- may need to be available when a given component is compiled, or when diagram by ponents are linked together. Such dependencies can also be shown on the concerned dashed arrows, which may be labelled to show the details of the dependency software engineering context (and will be used later in this book), we will confine our- software engineering context (and will this section. Figure 7.29 shows the basic UML selves to using this definition within has interfaces that are notation for a component. Such a component that are by other components, and interfaces Figure 7.29</p><p>Some design representations 162 SDC07 9/18/07 10:54 AM Page 162 AM Page 10:54 9/18/07 SDC07 White box notations 163 , design objects , 1994), and we will et al. . One box (and only one) has message passing . What is interesting is that such a diagram is con- . What is interesting method was one of the first of what we can term method was one Fusion object interaction graph A simple example of an object interaction graph (Fusion). In its most simple form, such a component may be an object that is created from created that is an object may be component such a form, most simple In its of a class or direct instantiation is more than the UML component Strictly, the Figure 7.31 object-oriented architectural style, which tends to place less emphasis upon overall object-oriented architectural style, which employs boxes to represent constructional issues). The basic notation linked by labelled arrows that represent the system operation that the interaction an external arrow as input, representing of objects are represented by a box drawn graph is intended to implement. Collections a simple example of an interaction graph. with a dotted outline. Figure 7.31 shows The rather aptly-named The rather aptly-named object-oriented design methods (Coleman second-generation methods, Fusion makes in Chapter 16. Like other object-oriented look at its practices and the main form it employs notations for detailed design, limited use of box-and-line is that of the again, this is not inconsistent with the structed for each system operation (although, a building block, we can effectively regard it as being the white box realization of these can effectively regard it as being the a building block, we the additional information white box aspect being achieved through concepts, with the interfaces and dependencies. provided about both The Fusion notation its parent class. Equally, since realizations such as the Java programming language language programming as the Java such realizations since Equally, class. its parent may be a class. role, a component in a ‘library’ use of the class mechanism permit the the the description of directly from is therefore modelled a component In both cases, ‘dominant’) class. parent (or as However, viewed or objects too. a grouping of classes it may represent object, since SDC07 9/18/07 10:54 AM Page 163 AM Page 10:54 9/18/07 SDC07 , which ), and we ), and timeline visibility graph visibility represents an interesting form of notation that has gained represents an interesting does use other box-and-line notations (such as its (such notations box-and-line use other does sequence diagram Figure 7.32 shows a simple example of a sequence of basic operations using this Figure 7.32 shows a simple example of a sequence of basic operations using The sequence diagram has some additional and optional notational elements. Since The sequence diagram has some additional So another example of a use for a sequence diagram is to describe the interactions So another example of a use for a sequence Fusion is rather a and object notations category of class a whole, this general Viewed as ies provided by the browser). Finally, the user selects another page and the applet is ies provided by the browser). Finally, the user selects another page and terminated. shown as a dashed line and, when it is active, this can be shown as a pair of solid lines. shown as a dashed line and, when it is active, this can be shown as a pair In the notation, based upon the interactions between a web browser and an applet. and then example, the user invokes the applet when a particular web page is selected requires it interacts with the applet, causing it to redraw its image on the page (which the facilit- to request the browser to organize this, since the applet can only draw with only the sequential aspects are described.) Each processing element, usually an object, only the sequential aspects are described.) ‘actor’, is allocated a column, and messages are but also possibly some other system shown by arrows between the columns. during a sequence, and since their methods can objects can be created and destroyed the vertical line below each element can be modi- themselves be activated or otherwise, state. While the element exists, its timeline can be fied to show the changes in element The Sequence Diagram notation is dominated by the need for a The organization of a sequence diagram the page downwards. (Obviously, where there is conventionally runs from the top of this might be drawn to scale, but generally a need to indicate specific time intervals between a set of elements (which can be objects, actors, remote processes, client and between a set of elements (which can perform a given task. server, etc.), when they collaborate to more correctly, in a specific scenario). It might that may be involved in a use case (or, involved in a network <a href="/tags/Communication/" rel="tag">communications</a> pro- also be used to describe the exchanges of the interactions that occur between any group tocol, as well as more general aspects their architectural form. of cooperating system elements, whatever 7.3.3 Diagrams Sequence The UML there is no real reason why for object-oriented design, although particular popularity style. Essentially, the purpose to that particular architectural its use should be confined message-passing sequences that occur of this notation is to detail the interactive concept’ is a complex one that has many ramifications, and so this is hardly likely to one that has many ramifications, concept’ is a complex Structure Diagram, to take one of so clean a form as Jackson’s encourage the evolution is scope for new develop- it does also seem an area where there example. However, illustration of the work- who has ever tried to produce a graphical ments, as anyone will be only too well aware! ings of a Java program will consider the roles of these further in Chapter 16. However, it lacks any notation that any notation it lacks However, 16. in Chapter these further roles of the will consider of a particular design. aspects picture of the constructional any form of overall describes basic box-and-line based upon fairly are mostly one. Those available disappointing provide limited scope decoration, and upon textual depend heavily combinations, The ‘object not be too surprising. This should perhaps structuring. for hierarchical</p><p>Some design representations 164 SDC07 9/18/07 10:54 AM Page 164 AM Page 10:54 9/18/07 SDC07 White box notations 165 Applet functional behavioural paint() redraw() Create applet Initialize applet Applet draws image Load home page HTML browser Initialization Select page Select event Select event , and indeed, the use case is a rather practical way User timeline message flow use cases A simple example of a sequence diagram (UML). A simple example of a sequence diagram Narrative One of these is to describe exactly how a proposed set of objects will be able to One of these is to describe exactly how a proposed set of objects will be The sequencing aspect does mean that there can also be a degree of The sequencing aspect does mean that Figure 7.32 meet the needs of particular detailed sequence of actions taken by a set of collaborating elements (which can be detailed sequence of actions taken by a set of collaborating elements (which that regarded simply as processing ‘threads’ for this purpose), and with the messages expand- they use to coordinate these actions. This is obviously an important role when Chapter 16. ing object-oriented design models, and one which we will be examining in this notation So for the rest of this section, we consider briefly some other roles that can perform. of this form. although this is very much a secondary role. information provided in such a diagram, Uses for Sequence Diagrams are essentially concerned with modelling the As indicated above, sequence diagrams The Sequence Diagram viewpoint mainly concerned with providing a We can regard this notation as being box notation because its primary concern is to description of a system. It is a white response is to be produced. Like many beha- describe how a particular behavioural and, indeed, one problem this can vioural forms it is intrinsically non-hierarchical relatively large and complex diagrams easily create is the difficulty of comprehending User selects applet option redraw image Applet asks browser to User terminates applet User starts web browser applet User selects page containing applet Browser starts and initializes SDC07 9/18/07 10:54 AM Page 165 AM Page 10:54 9/18/07 SDC07 ). Some examples of scenario . In many ways, the interactions of objects can them- . In many ways, the interactions of protocols Example of a use case described using a sequence diagram. Example of a use case described using a Overall, the sequence diagram offers a rather useful notation that is not con- Overall, the sequence diagram offers One other area where the sequence diagram can offer a useful form of visualiz- One other area where the sequence Figure 7.33 (more imposing) titles such as PDL (program description language), but it is easily (more imposing) titles such as PDL (program description language), but recognized, even when concealed behind such grander titles. descriptions of sequences that span more than a single page can become difficult to descriptions of sequences that span more than a single page can become comprehend and manage.) 7.3.4 Pseudocode under other Pseudocode is, of course, used very widely indeed. It sometimes appears selves be regarded as a form of protocol, but we more usually employ the term when selves be regarded as a form of protocol, in communications networks. describing more general sequences used is generally true of behavioural descriptions fined to one architectural style (this to the designer’s ‘visualization portfolio’. The of course), and forms a useful addition organization, although there may some- main limitation is the lack of any hierarchical subgroups of sequences. (As a rough guide, times be scope to structure through Figure 7.33 shows a short sequence taken from one of these (the unused elements are Figure 7.33 shows a short sequence One attraction of using this form is that it can activated in a later part of the sequence). of the use cases, and hence make it easier for help end users to gain an understanding or errors in these. them to assist with identifying any inconsistencies ation is in describing of identifying the external stimuli involved. Conversely, a sequence diagram can also of identifying the external stimuli involved. more correctly, a be used to describe a use case (or, are provided in Ratcliffe and Budgen (2001), and sequence diagrams used for this role</p><p>Some design representations 166 SDC07 9/18/07 10:54 AM Page 166 AM Page 10:54 9/18/07 SDC07 White box notations 167 The use of pseudocode to describe the structure of a program unit. The use of pseudocode to describe an algorithm. To be effective, there are some useful rules of thumb for writing pseudocode. The are some useful rules of thumb for To be effective, there If anything, pseudocode is used rather too much, as the low level of abstraction level of as the low much, rather too is used pseudocode If anything, one, in that it is an important that it provides the level of abstraction That said, Use indentation to emphasize structure (it aids the eye in following the form of a Use indentation to emphasize structure a branch). sequence and finding other nodes in Figure 7.35 Figure 7.34 n cerned with describing a solution in terms of sequence, although it is restricted to a solution in terms of sequence, cerned with describing 7.34 shows a typical example of operations alone. Figure describing the sequencing of the previous section. Fig- upon the tea-making example of this role, and expands for program design. typical example of the use of pseudocode ure 7.35 shows a more of Figure 7.35) are: principal ones (as illustrated in the example effectively, it is necessary to ensure that pseudocode does not become too much like the to ensure that pseudocode does effectively, it is necessary programming language! Pseudocode form 7.3.1, pseudocode is con- Diagram that was described in Section Like the Structure that it provides tends to conceal the wood within the trees as far as design abstraction as far as design the trees within the wood conceal tends to it provides that which it can be main- in the ease with of its attraction lies Perhaps some is concerned. keyboard. terminal and an ordinary computer tained using still a solution while sequencing of about the detailed designer to think permits a this in order to do solution. However, detailed forms of the distant from the remaining SDC07 9/18/07 10:54 AM Page 167 AM Page 10:54 9/18/07 SDC07 or ENDLOOP is more abstract and , which requires a LOOP check for #15 . #15 check for the end-of-line character . ENDIF and Pseudocode will rarely appear in the examples of this book, since we will not be Pseudocode will rarely appear in the Pseudocode can be used to complement the Structure Chart by providing the Pseudocode can be used to complement For example, the line For example, the line comprehended than and much more easily of knowledge of the significance Pull out ‘language keywords’ in some manner, perhaps by typing them in upper them in typing by perhaps some manner, in keywords’ out ‘language Pull or underlined. case a branch clause in body of a loop, or blocks such as the executable Try to ‘bracket’ keywords as using such paired structure, by a conditional IF of constants. variables or the values of program to the identifiers Avoid referring last section, however, we briefly review one means of checking and producing dia- last section, however, we briefly review one means of checking and producing grammatical forms, namely the use of tabular structures. Having considered a range of (largely diagrammatical) forms of design notation, two Having considered a range of (largely diagrammatical) forms of design notation, developed?’ obvious and related questions that might arise are ‘how are these diagrams answer to and ‘how can they be checked for consistency?’. Obviously, there is no one of producing either of these questions and, for design methods at least, both the tasks In this and verifying diagrams may be partly driven by the procedures of the method. taking any segments of our larger examples down to quite this level of detail. taking any segments of our larger should be taken as assumed, even if it is not men- However, its use for detailed design design method. tioned explicitly in the context of a particular 7.4 a diagram Developing the restricted viewpoint it provides when making design choices. the restricted viewpoint it provides when elaborates on the boxes in the diagram. It can details and sequencing information that a Structure Diagram. Indeed, almost all forms of of course be generated directly from a textual description of this form, since its dis- diagram can usefully be augmented with the relevant levels of abstraction. ciplined format can help to maintain element, but this is relatively minor in terms of importance. element, but this is relatively minor Uses for pseudocode and augment other forms of description Pseudocode is widely used to complement hard to develop a design using pseudocode alone used in the later stages of design. It is it is certainly undesirable, not least because of (one hesitates to say ‘impossible’), but code! The pseudocode viewpoint based upon the sequencing this is basically a functional one, As already mentioned, level. There is also a small constructional of operations, expressed at quite a detailed While these practices cannot guarantee better levels of abstraction, they can cer- cannot guarantee better levels While these practices than poorly documented writing pseudocode that is little better tainly help to avoid n n n</p><p>Some design representations 168 SDC07 9/18/07 10:54 AM Page 168 AM Page 10:54 9/18/07 SDC07 Developing a diagram 169 or State Transition Table text editor, with corresponding STD. vi text editor that was originally depicted in Figure 7.10. For convenience text editor that was originally depicted vi An STT describing the Unix . A common convention used is to plot the set of states down the left hand column . A common convention used is to plot Figure 7.36 is an example of an STT that corresponds to the ‘simple’ STD describ- Figure 7.36 is an example of an STT The tabular form of the STD is generally referred to as a The tabular form of the STD is generally To illustrate these points we will briefly examine two examples. In the first we points we will briefly examine two To illustrate these Many notations can be conveniently reduced to a tabular form to assist in check- to assist tabular form to a reduced conveniently can be notations Many command set being described. Figure 7.36 to show only the events and not the actions and, again, with only a small subset of the to show only the events and not the actions vi STT the remaining columns. Entries in the table then and the events as column headers to a given event occurs at a time when the system denote the final state that results when edge of the row. is in the state denoted at the left hand ing the Unix shown, with the STD being slightly abbreviated and as an aid to comparison, both are 7.4.1 of a diagram representation A tabular in Section 7.2.3. As we noted to the STD that was described For this, we will return becomes complex to man- form of diagram, and hence there, this is a non-hierarchical of states and transitions. systems with large numbers age when used to describe will transform a diagram into its corresponding tabular form, while in the second we into its corresponding tabular will transform a diagram As examples, the choices of the and then develop the diagram. will begin with a table both techniques are capable in these are purely illustrative, and particular forms used forms. use with a wide range of diagrammatical of being adapted for ing them for completeness and consistency. Conversely, starting from a tabular form a tabular from starting Conversely, consistency. and for completeness ing them better at handling forms are generally diagram. Tabular with generating a can assist and recognize it much easier to visualize diagrams make descriptions, while large-scale in complementary therefore largely The two are between elements. relationships the details of a design of recording arguments in favour there are good nature, and formats. using both SDC07 9/18/07 10:54 AM Page 169 AM Page 10:54 9/18/07 SDC07 line than the vi (probably not), and also whether there are (probably not), and also whether there a tabular representation a tabular . Finally, we can also note that, in this particular exam- . Finally, we can also note that, in this text insertion mode and text insertion mode An STT zone. describing an aircraft in an air traffic control While the STT is by no means the only form that can be readily transformed into While the STT is by no means the only A slightly fuller (or, at least, more balanced) STT describing the behaviour of an A slightly fuller (or, at least, more balanced) Simple though this example is, it does demonstrate the way in which a tabular example is, it does demonstrate the Simple though this Figure 7.37 SSADM model at this point is that it is strongly data driven, makes use of a variation SSADM model at this point is that it is strongly data driven, makes use objects. upon the DFD, and hence is based upon the use of processes rather than 7.4.2 from a diagram Developing procedures One software design method that does provide particularly comprehensive process, we for diagram development is SSADM (Longworth, 1992). To illustrate this (a particular briefly consider the development of an Entity Life-History Diagram (ELHD) about the interpretation of the Jackson Structure Diagram). All we should really note the model itself, while on the other we have easier visualization of any omissions or the model itself, while on the other a tabular form is likely to be convenient only inconsistencies. We can also see that two major elements in some way. So while an where a particular notation combines a table (if not so usefully as an STD), it is slightly ERD might be easily transformed into to transform a DFD, where auxiliary ele- less convenient, although not impossible, included. ments such as datastores need to be was shown earlier in Figure 7.11. Again, this provides a form that might be used for was shown earlier in Figure 7.11. Again, since each combination of state and event can checking the analysis model with users, about each recorded). be considered in turn (and decisions clear illustration of the concept, as well as of the a table, it does provide a particularly On the one hand we have ready visualization of trade-offs between the two formats. command mode defined, such as the effect of pressing the ‘esc’ actions that might usefully need to be key when in readily accommodate the structure of ple, the STT’s tabular form can more to include the many other command options. STD can, since it is more easily extended is shown in Figure 7.37. The corresponding STD aircraft in an air traffic control zone, form can aid with checking a model and identifying any questions about its com- checking a model and identifying form can aid with 7.36 might rightly lead the For example, the table in Figure pleteness or correctness. should be any way of moving between (say) designer to question whether there </p><p>Some design representations 170 SDC07 9/18/07 10:54 AM Page 170 AM Page 10:54 9/18/07 SDC07 Developing a diagram 171 This is a task that normally involves an analysis This is a task that normally involves This is likely to involve several evolutionary stages for This is likely to involve several evolutionary Figure 7.38 shows a simple example of such a matrix. Figure 7.38 shows a simple example This task is largely performed as part of a previous task in This task is largely performed as part (occur at a particular point in time); (arise from things occurring outside the system); (arise from things occurring outside (arise when some condition is satisfied within the system itself). (arise when some condition is satisfied Example of an Entity Life-History Matrix (SSADM). Example of an Entity external temporal internal The strategy that is recommended for developing these diagrams involves using a recommended for developing these The strategy that is to develop such a diagram. Indeed, since a poor diagram can be confusing and mis- to develop such a diagram. Indeed, since a poor diagram can be confusing The dia- leading, it is important to recognize the possible need for iteration here. gram resulting from the above matrix is shown in Figure 7.39. leads to entry creation, modification or deletion, and hence provides further guid- leads to entry creation, modification itself. ance on the development of the ELHD Drawing the ELH Diagram. can be powerful descriptive forms, creating a each such diagram. While diagrams always an easy task, especially where lay- clear diagrammatical description is not may need to be several iterations in order out issues are concerned,* and so there n n n Creating the ELH matrix. to identify links between events and entities; The first substep in developing this is to determine whether a particular link a further analysis substep is then performed Listing the entities. the main roles of the ELHDs is to provide a SSADM and so, at this stage, one of of entities made previously. further degree of validation for the choice Identifying and listing the events. in order to extract the details of those events of the DFDs produced for a system that are: design process: there is no prescriptive way of doing it; there are many possible ways of organizing the layout; design process: there is no prescriptive way of doing it; there are many possible ways of organizing and there is no way of knowing when a ‘final’ form has been achieved! * as a microcosm of the ‘wicked’ nature of the wider Indeed, the task of drawing a diagram can be considered 4. 3. 1. 2. Figure 7.38 the basic links between sys- ‘ELH matrix’) to help with identifying matrix or grid (the So the basic steps are: tem events and the individual data entities. SDC07 9/18/07 10:54 AM Page 171 AM Page 10:54 9/18/07 SDC07 diagram is to list the elements, then any (4), 459–527 30 , ACM Computing Surveys Example of an Entity Life-History Diagram (SSADM). Example of an Entity and techniques. Further reading Summary The discussion of ‘techniques’ in this paper does include a review of notations which provides The discussion of ‘techniques’ in this paper does include a review of notations which some good examples, as well as a discussion of their role in the conclusions. design, other than from method-based aspects. Even Détienne (2002) contains no real discussion design, other than from method-based aspects. Even Détienne (2002) contains no The two of the cognitive aspects of design notations and their influence upon the design process. this chapter. items listed below provide further illustrations of some of the issues described in methods Wieringa R. (1998). A survey of structured and object-oriented software specification and also any particular design practices being used. We have also briefly reviewed the use of and also any particular design practices diagrammatical descriptions. tabular forms to help with checking and developing considers representational forms used in software There is surprisingly little literature that This chapter has examined a wide range of notations that can be used to support and document This chapter has examined a wide range chosen illustrate the forms used for both white the development of a design model. The examples set of viewpoints (functional, behavioural, data mod- box and black box modelling across the particular notation will of course depend upon many elling and constructional). The choice of any about the architectural form of the eventual system, factors, including the problem domain, ideas nature of the representation, although this should not detract from its wider useful- nature of the representation, although drawing ness. Indeed, a useful starting point in these using one or more tables as necessary. to try to identify the dependencies between Figure 7.39 is strongly assisted by the ‘dual-element’ Again, the effectiveness of this procedure</p><p>Some design representations 172 SDC07 9/18/07 10:54 AM Page 172 AM Page 10:54 9/18/07 SDC07 Exercises 173 Using UML: Software Engineering with Objects and Com- with Objects Engineering UML: Software Using Diagrams for Exercise 7.2. Addison-Wesley ing machine; (c) program. the design of a payroll-processing the modelling involved in each of the following design tasks: the modelling involved (a) design for a Java compiler; the top-level (b) in a microprocessor-controlled wash- design for a program that will be used the detailed ponents. Exercises Figure 7.40 7.2 forms. wrong? Redraw them using the correct Why are the diagrams in Figure 7.40 7.1 for describing and forms that you would consider suitable Identify the principal viewpoints Stevens P. with Pooley R. (2000). Pooley R. P. with Stevens used in the UML, main notational forms summary of the book gives a good This concise detail. not in very great examples, although together with SDC07 9/18/07 10:54 AM Page 173 AM Page 10:54 9/18/07 SDC07 Diagram for Exercise 7.3. Diagram for Exercise dinner, including all such associated tasks as laying out the table. Seek to ensure that your dinner, including all such associated tasks assumptions about the sequencing of actions. solution does not impose any unnecessary any inconsistencies and redraw the STD. and then into an STT. Using the latter, identify even if the ring is switched on, it will not need current whenever its temperature is higher even if the ring is switched on, it will not than the selected level.) (or document) its structure. you have written, and use them to describe external ones. 7.7 (consider only the lowest level states) Transform the Statechart in Figure 7.41 into an STD 7.5 for the most recent program that Choose a set of representations that you consider suitable 7.6 in cooking and serving a three-course Draw a DFD that represents the processes involved 7.3 and any further 7.41 by adding the internal transitions Complete the Statechart in Figure 7.4 simple electric cooking ring. (Remember, Draw a Statechart that describes the operation of a Figure 7.41</p><p>Some design representations 174 SDC07 9/18/07 10:54 AM Page 174 AM Page 10:54 9/18/07 SDC07 SDC08 9/18/07 10:56 AM Page 175</p><p> chapter 8 175 The Rationale for Method</p><p>8.1 What is a software design 8.3 Why methods don’t work method? miracles 8.2 The support that design 8.4 Problem domains and their methods provide influence</p><p>This chapter introduces the initial steps in the study of design methods. It considers the nature of a design method, its component parts, and some of the reasons why design methods are used. As well as identifying the benefits that can be obtained from the use of a design method, it also reviews the limitations on what they can provide for the user, and exam- ines the extent to which particular classes of problem may be suited to the use of specific design methods. in nature. , was discussed in Chapter 6. There in Chapter 6. , was discussed solution and our understanding of a invisible the is one that has played an important role in has played an important is one that knowledge transfer knowledge software design method software However, before we can begin to examine the structure of a design method, we However, before we can begin to examine Based upon these observations, one view that can be taken of the design process is Based upon these observations, one view In Chapters 1 and 2 we examined the nature of the design process in general, as In Chapters 1 and 2 we examined the The way that the continual rate of technological change and development has also rate of technological change The way that the continual to employ new concepts peer-to-peer updating about how required readily usable styles most effectively. and new architectural to assist with structuring artificial frameworks that can be used The need to create ideas about a medium that is intrinsically The need for a rapidly expanding industry to educate a continuous supply of new expanding industry to educate The need for a rapidly traditional master/pupil in circumstances where the designers and developers, with demand. have been inadequate to cope approach would simply odology’ as if it were a synonym for ‘method’. The correct meaning of ‘methodology’ intended to is ‘the science of method or orderly arrangement’. Indeed, this book is need to have a better understanding of what a method is, and hence how it can fulfil need to have a better understanding of what a method is, and hence how ‘method’ is the roles identified above. A typical dictionary definition of the word a regular, couched in such terms as the following: ‘a way of doing things, especially remainder of orderly procedure’. It is this view that will form the main theme for the develop- this book. (As we have previously observed, it is unfortunate that, in software term ‘meth- ment at least, a habit has arisen of using the rather grander-sounding that it corresponds to a process of ‘navigation through a solution space’. Each step in that it corresponds to a process of ‘navigation many options, and it is a part of the design task design may provide the designer with them. One of the major roles of a design method to identify these and to choose among providing some guidance as to how the choices is therefore to assist the designer by likely consequences of a particular decision in should be made, and how to assess the on subsequent structures and choices. terms of the constraints it may impose well as its role in the development of software. There, we particularly emphasized the well as its role in the development of it is highly unlikely that different designers non-analytical nature of the design process: solution to a problem; there are no clear criteria will come up with exactly the same as being that allow us to select one of these about its possible solution. problem is bound up with our ideas The last of these more or less directly leads into the material of this chapter (and of The last of these more or less directly we take a rather wider view of the roles that many of the following chapters). Here at the actual mechanisms that they employ, and methods perform, look more closely the limitations) that may arise from their consider some of the consequences (including use. n n directed towards the use of methods (when compared with the practices adopted in practices adopted compared with the methods (when the use of directed towards the following. other domains) included n 8.1 method? design a software is What of the The concept such for employing major motivation the late 1960s. A development since software that of assisting with methods, so design has been about software reasons why thinking that some of the we suggested</p><p>The rationale for method 176 SDC08 9/18/07 10:56 AM Page 176 AM Page 10:56 9/18/07 SDC08 What is a software design method? 177 for doing something that we have learned to do for doing something that we have recipes , describing what tasks need to be performed at each step in in quite the same sense that we consider the act of design to be creative. in quite the same sense that we consider creative Vessey and Conger (1994) have suggested that the knowledge involved in success- Vessey and Conger (1994) have suggested that the knowledge involved in So we can reasonably expect that a design method should identify a general strat- So we can reasonably expect that a design A design method is generally much less prescriptive than the kind of method that A design method is generally much less We can devise methods for organizing many other activities, from driving a car to We can devise methods for organizing The idea of a method as a structured and ‘procedural’ way of doing things is one way of doing and ‘procedural’ of a method as a structured The idea declarative knowledge the design process; and how much tea to add the tea to brew how long to wait for pour the tea into the cup. pour the tea into the Boil the kettle; warm the pot; add the tea; pour on water; wait a number of minutes; on water; wait a add the tea; pour warm the pot; Boil the kettle; 1. about how the ultimate solution to a problem is to be attained, since the specific design about how the ultimate solution to a problem is to be attained, since the specific than by the decisions required will be determined by the nature of the problem, rather method. (Think of all the different processes that are used for making coffee!) fully employing a design method can be categorized into two forms: it is used to develop new processes, which in turn are ways of doing things – where the it is used to develop new processes, which of the computer. Returning to the tea-making ‘doing’ that is involved will be the task be using a design method to design the form of example the analogy in this case would the tea-making process itself. some rather general guidelines on its use, egy to be used by the designer, and provide cannot be expected to be very prescriptive based upon experience. However, a method adapt a method like that in the example above for other tasks (for making coffee adapt a method like that in the example easily change its basic domain (that of making instead of tea, perhaps), but we cannot hot drinks). assembling a new garden shed. Indeed, in some we might use for making tea, or for almost be considered as a ‘meta-method’, in that ways a software design method can through ‘experiment’ or ‘theory’ (or some combination of both). We might be able to through ‘experiment’ or ‘theory’ (or guidance alone is insufficient for this purpose, and that some ‘domain knowledge’ is guidance alone is insufficient for this also required. and so on. However, such methods are constructing kitchen units, model aircraft rarely Rather, these methods are n n of the tea-maker. Since they are also essential to since these are personal preferences we can reasonably conclude that ‘procedural’ the success of the tea-making process, Like most methods, this puts a strong emphasis on the ordering of actions (if you don’t this puts a strong emphasis on the Like most methods, in the above example, and see the order of any of the operations think so, try changing on those issues that are more it provides little or no guidance what results!). However, as: a matter of taste, such provide a methodological analysis of design methods, by trying to analyse their forms their to analyse by trying methods, of design analysis a methodological provide some way.) them in classify and to per- the way that we used to structure ‘Methods’ are be familiar enough. that should of tea: as making a cup routine tasks, such form many SDC08 9/18/07 10:56 AM Page 177 AM Page 10:56 9/18/07 SDC08 , consisting of knowledge about how to employ a given employ how to about knowledge of , consisting part consists of one or more forms of notation that can be used part consists of one or more forms of The three components of a design method. representation Returning to the need to find ways of designing software: in Chapter 2, the fol- Returning to the need to find ways Declarative knowledge is therefore fairly readily conveyed through the use of a ‘do is therefore fairly readily conveyed Declarative knowledge procedural knowledge procedural situation. in a particular method The of the initial problem and that of the to describe (or model) both the structure viewpoints and differing levels of abstraction. intended solution, using one or more Figure 8.1 lowing three main components of a software design method were identified, and their lowing three main components of a relationships are shown in Figure 8.1: n software). Since we often express the declarative knowledge in what we term a pro- often express the declarative knowledge software). Since we should be performed, this specifying a sequence of actions that cedural form, by uses of ‘procedural’ are quite a little confusing, although both terminology can be (2002) uses the terms declar- is also worth noting that Détienne reasonable ones! (It way.) in yet another, slightly different, ative and procedural tea for four people. knowledge is more likely to form of description, whereas procedural this, then do that’ itself be acquired directly (as is experience. This experience may be acquired through or through exposure to case is about how to make tea) likely when the knowledge is about how to design more practical when the knowledge studies (which is probably 2. the would include knowledge making tea, the declarative of our example of In terms be performed (boiling they should the order in which be performed, and tasks to knowledge would while the procedural water to pot), tea to pot, adding water, adding to use when making how much water much tea to add and issues as how address such</p><p>The rationale for method 178 SDC08 9/18/07 10:56 AM Page 178 AM Page 10:56 9/18/07 SDC08 What is a software design method? 179 Formal Description Technique provide guidelines on the ways in which the activities provide guidelines on the ways in which clichés or part describes the procedures to follow in developing the solution and part describes the procedures to follow methods largely depend on the use of mathematical notations for the rep- methods largely depend on the use of heuristics Some properties of formal and systematic software design methods. Some properties of formal process This imbalance leads us to ask whether the term ‘Formal Method’ is really the This imbalance leads us to ask whether the term ‘Formal Method’ is really Software design methods fall into two very broad and general categories. These Software design methods fall into two Formal making a series of transformations on the different forms that comprise the rep- making a series of transformations resentation part. A set of for specific classes of problem. These defined in the process part can be organized past use of the method with a particular prob- are generally based on experience of of structure. lem domain, or for a particular form The This generally involves the designer in the strategies to adopt in making choices. n Figure 8.2 n (FDT) is sometimes preferred, as one that emphasizes the powerful notational aspects (FDT) is sometimes preferred, as one that emphasizes the powerful notational while playing down the much weaker procedural element. transformations. However, while the representation parts for such methods have been transformations. However, while the representation parts for such methods are less well the subject of considerable research and development, the process parts is discussed refined and are apt to be developments of the ‘top-down’ strategy which more fully in Section 9.3. most appropriate description. Because of this, the term are essentially distinguished by the forms of representation that are used, although in are essentially distinguished by the forms influence upon the forms of process that can turn the representation forms have some illustrated in Figure 8.2. be used within them. This division is a degree of consistency checking between the resentation parts. These notations permit of design, as well as more rigorous design descriptions used in the different stages In terms of the classification of knowledge discussed above, the process part can In terms of the classification of knowledge knowledge, while heuristics are more be considered as embodying the declarative This description will be elaborated further in concerned with procedural knowledge. terms will provide a very general descriptive the next chapter; for the moment these framework. SDC08 9/18/07 10:56 AM Page 179 AM Page 10:56 9/18/07 SDC08 ) usually consist clichés (or heuristics methods are generally less mathematically rigorous in form, both in both in form, rigorous less mathematically are generally methods Some answers to this were identified in Chapter 6 and were summarized at the Some answers to this were identified upon both the representation and process A second reason, and one that draws The design methods discussed in this book are all systematic in their form, discussed in this book are all The design methods The third component of a design method, the The third component Systematic izations, but the site may still form a virtual whole.) For the former in particular, the izations, but the site may still form a virtual whole.) For the former in particular, are cognitive tasks involved in planning and understanding such degrees of complexity parts, is simply that of scale. Software-based systems increasingly underpin almost all parts, is simply that of scale. Software-based systems increasingly underpin transactions aspects of a modern society. Some, such as those used to handle financial that they within banks and similar institutions, were designed with the expectation undirected would be large systems, while others may have become large through an websites, process of aggregation. (An example of the latter is the growth of many or organ- where different elements are owned and maintained by separate individuals expected from making use of a software design method (whatever form this might expected from making use of a software take)? these, that of providing an artificial framework beginning of this chapter. The last of invisible set of elements, is an important to assist with thinking about an intrinsically by the representation parts of design methods. one, and one that is largely addressed 8.2 methods provide The support design that design methods, it is not unreasonable at this Since this is a book about design and anyone use a method at all? Indeed, probably point to raise the question: why should far been produced without the use of an explicit considerably more software has so of such methods – so what benefits might be design method than through the use reflects the relative preponderance of systematic methods in current industrial prac- reflects the relative preponderance of design models that they tend to provide. The rest tices, and partly the wider variety of detail the rationale for using any method to of this chapter will examine in greater of the limitations that generally apply to the design software, and will consider some use of a design method. they may be highly systematic in form. We will encounter a number of examples of systematic in form. We will encounter they may be highly in allowing a designer to reuse and they play an important role these in later chapters, found in both systematic and Examples of heuristics can be the experience of others. <a href="/tags/Formal_methods/" rel="tag">formal methods</a>. of an FDT in Chapter 18. This bias partly although we will also examine an example strategy of another method. strategy of another handling particular situations that are recommended for use in of a set of techniques These heuristics are gen- across a wide variety of problems. that may be encountered with using the method in a period of time, as experience is gained erally built up over experiential in origin, although and so they are essentially a wider problem domain, terms of the representation part – which normally consists of one or more forms of forms of or more of one consists normally – which part of the representation terms are methods that is true even for those process part. This – and also of the diagram As JSP and SSADM. their form, such as prescriptive in considered to be more generally sys- techniques with ‘mix and match’ more scope to use there is far a consequence, used method can be forms from one or representation in which ideas tematic methods, the developed using the design is being issue, even though a particular to help resolve</p><p>The rationale for method 180 SDC08 9/18/07 10:56 AM Page 180 AM Page 10:56 9/18/07 SDC08 The support that design methods provide 181 may pro- , 1987). This allows et al. method knowledge , where the latter is inadequate or lacking. , 1988), as well as the nature of the design problem itself. So , 1988), as well as the nature of the design domain knowledge et al. issues issues ‘Technical issues’ consist of the problem-related aspects of design. There are a ‘Technical issues’ consist of the problem-related One of the implicit features of design methods is that the use of any method will features of design methods is that One of the implicit process (and of the two aspects of the software development There are therefore stand the intentions of the original designer(s) (Littman of the system maintainers to make changes consistent with the overall structuring being produced by a team of designers who will need to ensure that their contribu- being produced by a team of designers who will need to ensure that their helps tions fit together correctly. In such a case, the use of a design method both common with defining the chosen architectural form and also establishes a set of standards, criteria and goals for use by the team. The use of a method should lead to the production of records and representations under- in standard form that can be used by a maintenance team to capture and who is working in an unfamiliar domain, the use of a design method may assist who is working in an unfamiliar domain, of the mental models used to capture the with the formulation and exploration way, therefore, essential features of the design. In this vide a substitute for help the designer to produce a system that is The use of a design method should may be particularly important if the design is structured in a consistent way, which The ‘knowledge transfer’ mechanism discussed earlier in Section 6.3. Studies suggest The ‘knowledge transfer’ mechanism work in an opportunistic manner, but that that experienced designers may often and reliable when the designer is less familiar this practice may be less well-formed and Soloway, 1985; Guindon and Curtis, with a problem or its domain (Adelson the inexperienced designer, or the designer 1988; Visser and Hoc, 1990). So for technical management n n n and so both of these are considered in this section. and so both of these are considered relative importance of each one being somewhat number of these to consider, with the factors such as the structure of the development dependent upon a range of external organization (Curtis as ranked in any particular order. the following points should not be considered expected to benefit from using a method to provide a structured and systematic from using a method to provide expected to benefit process. These are: approach to the development n n lead to designs that employ the architectural style associated with that method. With employ the architectural style associated lead to designs that the integrity and struc- of much software, one way of preserving the long service life a single design method. to develop and maintain it by using ture of a system is software systems) that can be task that normally goes with subsequent maintenance ones that may be usefully supported by using a systematic and structured approach to approach structured and a systematic by using supported be usefully that may ones behaviour consistent need to ensure the For the latter, maintenance. and development for imply the need diverse elements also between to facilitate integration and the need to describe the struc- level of being able at least to the of standardization, some degree for the use of design candidates systems are less obviously While such tures involved. elements and possibly representation scope to employ the there is certainly methods, ideas. more strategic some of the SDC08 9/18/07 10:56 AM Page 181 AM Page 10:56 9/18/07 SDC08 computer, without needing to understand the under- computer, without needing to understand ++ loop, and not with how that is to be achieved in terms of skip instructions and loop, and not with how that is to be Each programming language therefore provides a <a href="/tags/Virtual_machine/" rel="tag">virtual machine</a>, whose archi- Each programming language therefore provides a virtual machine, whose The user of such a virtual machine structures his or her ideas around the The user of such a virtual machine The concept of a virtual machine is not a new one, although it is not usually The concept of a virtual machine is Each design method provides a particular form of ‘Design Virtual Machine’ provides a particular form of Each design method turing of the system, and should ensure that all of the factors involved in a problem of the factors involved ensure that all the system, and should turing of and considered by the designer(s). are properly weighed the system, as originally planned, and so to help preserve its integrity. (However, as (However, integrity. its help preserve and so to planned, originally as the system, the that it is important to occur for this observed, have (1986) and Clements Parnas than the actual one process rather the idealized design should reflect documentation used!) load’ involved in the ‘cognitive aid with managing a method should The use of in the logical struc- of errors reduce the likelihood a system. This should designing the resulting design model has to be translated into a lower level of abstraction by the the resulting design model has to be translated into a lower level of abstraction designer and the programmer together. registers. They are therefore using a Java machine. tecture and form are determined by the features and semantics of the programming machine language. In the same way, a design method provides the user with a virtual level indeed; that can be used to express ideas about program forms at a very high although unfortunately, owing to the imprecise semantics of current representations, ideas behind this. It is then the job of some ‘interpreter’ to translate behavioural model that it provides. level, and ultimately to that of the bare com- this into the form of a machine of lower when using Java, programmers are concerned puter architecture itself. For example, determining that they need the features of (say) a only with making decisions such as while ber of virtual machines, to allow programmers to access the resources of a computer ber of virtual machines, to allow programmers example, a file may be treated as a sequence of at different levels of abstraction. (For a sequence of blocks on a disk.) Programming characters, a sequence of records, or the programmer works with what is effect- languages also provide virtual machines: ively a Java computer, or a C and processors. Figure 8.3 illustrates the basic lying architecture of registers, buses ticular classes of problem.) While the concept of an architectural style forms one of the ticular classes of problem.) While the the form of the set of design elements as well key components of a DVM, determining that will be used for the eventual implemen- as defining the run-time environment an architectural style. tation, a DVM is rather more than just terms, a virtual machine provides a layer of applied to design methods. In computing machine. An operating system provides a num- abstraction above that of the physical stand its structure, the maintenance team can choose to recreate all or part of it from the maintenance team can choose to stand its structure, for medium or large systems.) that is quite impossible to consider scratch – an option by the designer to develop his turn supplies the framework needed (DVM), which in designers may be able to solution. (One reason why experienced or her model of a they have developed their own DVMs for par- work in an opportunistic manner is that While each of these points is particularly significant for large systems, they are valid points is particularly significant for While each of these and the extent to which it is The lifetime of an item of software, for smaller ones too. related to its size. (The only in maintenance, are not directly subsequently modified it proves impossible to under- with a smaller system is that if advantage of working n</p><p>The rationale for method 182 SDC08 9/18/07 10:56 AM Page 182 AM Page 10:56 9/18/07 SDC08 The support that design methods provide 183 The use of virtual machines in the design process. The use of virtual machines In the ideal, the DVM should be matched to the virtual machine provided by the In the ideal, the DVM should be matched to the virtual machine provided The DVM that is embodied in a particular design method is characterized by such The DVM that is embodied in a particular This is performed by following the process part of the method: as Figure 8.4 This is performed by following the process; since this determines how the design models the basic strategy of the method itself, will be elaborated. the architectural style implied by the forms of design element used; the architectural style implied by the of the modelling process; the viewpoints used in the various phases are established by the form of the design the relationships between these that many object-oriented programming languages. For example, it could well be argued many object-oriented programming languages. For example, it could well was that it that one of the problems created by the introduction of the Ada language part of the framework used by the designer. based upon eventual implementation form that is to be used. While a DVM that is well onto defining sequences of actions to be performed on data structures may map best to use many imperative languages, it is unlikely to help with determining how provided in the packaging features of a language, or a feature such as inheritance, as n about the general form of the solution Together these create a set of assumptions (sequential, parallel, data-centred, object-centred . . .) that in turn form an essential factors as: n n n (often termed ‘logical’ design or ‘analysis’). The model produced is then translated into (often termed ‘logical’ design or ‘analysis’). which is effectively another level of DVM with the ‘design plan’ (physical design), initial DVM, and with structures that are much more precise characteristics than the form. A further process is required to translate closer to the eventual implementation can then be translated by machine and even- this into a programming language, which on the physical machine. tually leads to the execution of the system shows, the task really involves two levels of DVM. One is used for architectural design shows, the task really involves two levels Figure 8.3 SDC08 9/18/07 10:56 AM Page 183 AM Page 10:56 9/18/07 SDC08 model that is provided for task and the package The link between the DVM and the virtual machine levels used on a computer. The link between the DVM and the virtual So from a management viewpoint, using a recognized design method will provide: So from a management viewpoint, using a recognized design method will The design methods that provide the topics of Chapter 13 and the following chap- The design methods that provide the methods are (not surprisingly) linked to The management benefits of using design a framework that helps with identifying important progress milestones. a framework for recording decisions and reasons in a systematic manner; and a set of procedures that should ensure consistency in the structure of a design, it easier to in the structure of the interfaces between design components, so making use a team of designers on a large project; n n n ters have been selected precisely because they provide a set of very different DVMs. ters have been selected precisely because in common is that they all assume that the Perhaps the main feature that they possess imperative programming forms. final system will be implemented using benefits. In particular, the documentation of many of the same issues as the technical of the system and for its maintenance. a system is important both for the development incorporated a virtual machine that was not well matched to that of any existing incorporated a virtual machine that design method. Features such as the that addressed such issues as packaging and par- parallel operations required a DVM resolved in a completely satisfactory manner. allelism, a problem that has yet to be aspects as the set of viewpoints used, the strategy, architectural assumptions, etc.) aspects as the set of viewpoints used, the Figure 8.4 embodied within it, helping to determine such (Each method has a design virtual machine</p><p>The rationale for method 184 SDC08 9/18/07 10:56 AM Page 184 AM Page 10:56 9/18/07 SDC08 Why methods don’t work miracles 185 as process . product One analogy that it may be helpful to repeat here concerns the use of a recipe for One analogy that it may be helpful to repeat here concerns the use of a recipe A design method provides the designer with a framework within which to organ- A design method provides the designer The need to design for change was strikingly demonstrated when the British gov- for change was strikingly demonstrated The need to design All of the above issues become even more important when we consider the extent when we consider even more important above issues become All of the or how tax rebates will be calculated. Designing software is therefore rather like or how tax rebates will be calculated. Designing software is therefore domain, designing a recipe – it requires the designer to possess insight into the problem notion of providing guidance. For an actual design task, the designer’s choices and notion of providing guidance. For an actual design task, the designer’s prob- decisions will need to be resolved solely on the basis of the needs of the particular lem that requires to be solved. be produced cooking. A recipe is a process that determines how a particular dish will be drawn, – much as a computer program is a process that determines how a graph will otherwise of specific software design methods. otherwise of specific software design a set of recommended representation forms ize the development of a design. It provides issues that are significant for that DVM. It pro- that can be used to give insight into the design process should follow, and advice on the vides guidance on the steps that the making design choices. However, none of this criteria that should be considered when hence the emphasis must very much be on the guidance can be problem-specific, and The preceding sections have explored some of the major reasons for using design The preceding sections have explored design problems. However, it is important to methods to help with solving software not offer a panacea that will automatically appreciate that a design method does chapters, we examined the nature of the design remove all problems. In the first two difficult to impose any structure on its form, and process, and the reasons why it is so to be kept in mind in assessing the usefulness or the points that were made there need Whereas software designed to cope with income tax rates will normally allow for such Whereas software designed to cope with VAT rates change only very infrequently changes, because they tend to occur annually, some hapless design team. – with embarrassing consequences for 8.3 miracles Why methods don’t work later modifications. in 1991. The billing software the rate of Value-Added Tax (VAT) ernment changed with a split rate of VAT – one utility to issue its bills could not cope used by one major that. So all bills covering that a given date, and a new rate after rate applying until set at the new rate, with refunds to follow! period were issued with VAT charges in terms of the available choices, and so much of the work is likely to involve adapt- choices, and so much of the work in terms of the available strongest benefits that a design In this context, one of the ation of existing structures. plan for change, and to think is that it encourages the designer to method can offer Some methods do this subsequent developments and extensions. ahead in terms of use should lead the designer to so, but, whatever the method, its explicitly, others less to encourage consideration of in a structured manner that is likely explore the solution In particular, the use of a design method helps with structuring the design the structuring helps with method a design the use of In particular, as the design well rather than develop- existing systems, time modifying designers spend their to which can tasks that is likely to be performing time, a designer For much of the ing new ones. original design work. than undertaking rather as ‘perfective maintenance’ be regarded unconstrained unlikely to be completely the designer is a totally new system, Even for SDC08 9/18/07 10:56 AM Page 185 AM Page 10:56 9/18/07 SDC08 The purpose of this section is not to encourage the idea that design methods The purpose of this section is not to encourage the idea that design To make their forms as prescriptive as possible, design methods are based on To make their forms as prescriptive One way in which it is possible to increase the amount of guidance from a method One way in which it is possible to increase Because a software design method provides a form of ‘process’ that is used to design method provides a form of Because a software A design method intended for producing recipes might be able to provide some might be able for producing recipes method intended A design how to lay out the instructions to the cook (for example, terms to use and/or appro- instructions to the cook (for example, how to lay out the priate forms of measure); tables and so on; the best use of photographs, about possible variants. making suggestions should not be used, but rather to point out that they have limitations and that these should not be used, but rather to point out that they have limitations and 1988; Visser and Hoc, 1990). So a design method that is described purely in terms 1988; Visser and Hoc, 1990). So a design method that is described purely to expert of sequential actions can provide only a very inadequate approximation necessary in behaviour, although this might be partly offset by the iterations that are as designers design activity. (A further factor that may offset this disadvantage is that, so employ gain expertise, they may be better able to adapt a method to their needs, and parallel activities where their use would be appropriate.) defining a set of carefully itemized sequences of actions that should be performed by defining a set of carefully itemized sequences only practical way of describing the process part a designer. Indeed, it is usually the the complexity of writing and comprehending of a method – as an analogy compare of execution with that of writing and compre- programs that contain parallel threads observed design practices suggest that experi- hending sequential programs. However, on several different threads of action in parallel, enced software designers may work levels of abstraction (Guindon and Curtis, and that these may also be at different However, even this will be limited in the extent to which it can be usefully carried out. However, even this will be limited in narrow down the problem domain until the (In the ultimate, of course, we could problem!) In practice, most methods are aimed at method would be only suited to one to optimize their use: hence the benefits of famil- reasonably wide domains so as to try iarity with the method. believing that a design process is itself a recipe – but that is not so at all, as the above believing that a design process is itself is something that is output from the design example demonstrates. Instead, a recipe for the design process itself. process, rather than being the model domain of problems. By concentrating upon slightly is to focus it upon a particular systems, it is possible to give (say) data-processing problems, or information-retrieval of the decisions that the designer needs to make. somewhat tighter guidance for some But it cannot be more specific than this. Decisions about detailed issues – such as the specific than this. Decisions about But it cannot be more used, the length of time in the and the amounts of each to be choice of ingredients upon the nature of the dish to be used – must all depend oven, the oven temperature the recipe. not upon the format used for developing and the materials, easy for the inexperienced to fall into the trap of design another process, it is all too n n n to be aware of the potential that is present in the basic materials, and to know the and to know basic materials, in the is present that the potential aware of to be this (whether the process execute that will the system of the capabilities upon bounds or a computer!). be a cook described, and would presented and should be organized, as to how a recipe guidance provide advice on: be able to</p><p>The rationale for method 186 SDC08 9/18/07 10:56 AM Page 186 AM Page 10:56 9/18/07 SDC08 Problem domains and their influence 187 One question that arises here is whether the problem characteristics should deter- One question that arises here is whether the problem characteristics should Sometimes a method may be very specialized. An example is the design of com- Sometimes a method may be very specialized. The basis for model-building can vary quite considerably, but usually involves can vary quite considerably, The basis for model-building Almost all software design methods expect the designer to begin the design pro- design methods expect the designer Almost all software time ordering of actions information flow data structure actions data objects function mine the design approach and the eventual architectural style of the system, or whether mine the design approach and the eventual architectural style of the system, ive, so that a design method that is targeted largely at one class of problems might ive, so that a design method that is targeted largely at one class of problems to quite a still prove useful with other problems that can be considered as belonging be meeting different class. An example of such a design method, and one that we will for later, is JSP. This method is essentially intended for use with designing algorithms types of data-processing problems, but it can sometimes be used to help solve other problem too. processing problems will be likely to incorporate models of data structures or informa- processing problems will be likely to tion flow. languages there are some very well-established pilers. For imperative programming tools) that can be used for constructing com- techniques (with supporting software situation, and most problem domains are pilers. However, this is a relatively unusual domains are not necessarily mutually exclus- much more general in form. In addition, n may utilize a range of possible forms.) The form (Of course, some of these descriptions in determining how well the method will map of this initial model is a major factor For example, real-time problems will normally onto particular problem domains. timing issues in some way; while data- require that the initial model incorporate n n n n form of the solution that is derived from it, including its architectural style. that is derived from it, including its form of the solution one or more of the following of the original problem into mapping the characteristics viewpoints: n The concept of a problem domain figured in the preceding section, and this section problem domain figured in the preceding The concept of a to the design process. implications of the concept as applied elaborates a little the problem that is to be solved. form of model of the real-world cess by building some DVM, and hence is highly is essentially based on the underlying The form of this model will strongly influence the therefore, the chosen method method-specific. Ultimately, need to be recognized. Unfortunately the purveyors of courses and textbooks on on textbooks courses and of purveyors the Unfortunately to be recognized. need their about expectations exaggerated of encouraging guilty sometimes are methods in perspective. be able to keep these it is important to wares, and 8.4 their influence and domains Problem SDC08 9/18/07 10:56 AM Page 187 AM Page 10:56 9/18/07 SDC08 . An example of a batch sys- is that they are event-driven. For , 1995). repeatable et al. and reactive systems deterministic are characterized by the use of multiple threads of execution are characterized by the use of multiple the main feature is that all the operating characteristics of the sys- the main feature is that all the operating batch systems Any attempt to classify problem domains in other than a very general way will Any attempt to classify problem domains Of these, the only legitimate argument is really the first and, indeed, if we con- legitimate argument is really the first Of these, the only problem domain that is arises from this concept of the An important point within the problem, so that a solution might utilize one or more processors. For within the problem, so that a solution might utilize one or more processors. the over- such systems, the process of design may need to consider such issues as synchron- heads of process scheduling, as well as the need for <a href="/tags/Mutual_exclusion/" rel="tag">mutual exclusion</a> and ization between processes. An obvious example of such a system is a screen editor, for which the operations An obvious example of such a system that are generated externally, by the user. A of the process depend upon the events of such systems is that the speci- commonly encountered subsidiary characteristic events will often include explicit requirements fications of the required responses to about timing. Concurrent systems when considered as sequential flows of data. Such a system should therefore per- when considered as sequential flows form operations that are are determined by the nature of the input tem is a compiler, all the actions of which that compilation should be deterministic! source program. It goes without saying The principal characteristic of always asynchronous and non-deterministic. such systems, the events are almost In it begins processing one or more data streams. tem are essentially determined when arise because of the contents of the streams, Any changes in these characteristics unlikely to have both batch and reactive aspects, either of these forms could well have unlikely to have both batch and reactive aspects, either of these forms could concurrent features. These classifications should not be considered as mutually exclusive: while a system is These classifications should not be considered as mutually exclusive: while n n usually lead to difficulties, because real problems are rarely easily categorized in a usually lead to difficulties, because general domains can be identified, and there are simple manner. However, some rather three in particular that are useful. n relevant to the remaining chapters of this book. Because the domains of application for chapters of this book. Because relevant to the remaining is generally impractical to seek are essentially ill-defined, it software design methods methods, along similar lines methods’ evaluation of design any form of ‘comparative have a well-defined syntax and for programming languages, which to those performed semantics. of being ‘in vogue’ and hence may be preferred within an organization. and hence may be preferred within of being ‘in vogue’ issues, this is not really compatibility as being one of the ‘domain’ sider the need for become a major hurdle and is architectural mismatch can easily inconsistent. Indeed, and avoid (Garlan certainly one to anticipate the choice of preferred architectural style should determine the design approach? the determine should style architectural preferred of the choice prag- approach, ‘pure’ the more or certainly ‘ideal’ well be the may the former While in rarely constructed Software is latter more strongly! may favour the matic factors with existing software of compatibility so that the needs from other software, isolation with gain expertise and programmers Equally, designers to be considered. may need fac- is a major if time to delivery particularly important which may be certain styles, often have periods particular styles too cannot be ignored; fashion tor. Unfortunately,</p><p>The rationale for method 188 SDC08 9/18/07 10:56 AM Page 188 AM Page 10:56 9/18/07 SDC08 Problem domains and their influence 189 and content of data will guide the designer’s actions. and content of data and content of the data guide the designer’s actions. the designer’s of the data guide and content occur if an approaching missile is ignored for too long, while occur if an approaching missile is ignored form existence will Some design criteria and related design methods. In the first case a design method is required that allows the designer to check thor- In the first case a design method is required A somewhat different approach to classifying problem domains is to consider how consider is to domains problem to classifying approach different A somewhat the event will be highly significant (this may be the detection of a gas leak, or an significant (this may be the detection the event will be highly with the need to pro- or an aircraft that is too close), together approaching missile, nature of the data itself and a time interval determined by the cess the data within by new data. before it is replaced information, hotel bookings, and so on), and there is no time constraint beyond bookings, and so on), and there is information, hotel within a particular time the necessary volume of transactions that of processing interval. Problems where the where the occurrence of of the domain of real-time systems, This is more typical Problems where the Problems systems, in which as transaction-processing occur in such applications Examples may be financial (where the data the data correctly is to process the key criterion oughly for correct behaviour, and to verify this in some way. The second case also has oughly for correct behaviour, and to that correct performance of the eventual system these needs, but adds the requirement will require design practices that help to must be guaranteed. Each of these domains most critical, as illustrated in Figure 8.5. The focus attention on the aspects that are forms these might take. next chapter begins to examine what debiting the wrong bank account by several million pounds may well be considered debiting the wrong bank account by important thing is to generate a response within catastrophic!). In the second case the needs to be a correct one, but an approximation a critical time interval. The response may suffice: disaster because there is not time to ensure an ‘inexact’ response that fires two counter-missiles, be acceptable. that one will be accurate enough, will In the former case, the important thing is for the system to generate a correct response In the former case, the important thing delay in processing is involved on occasion, but (it will not be disastrous if some small Figure 8.5 n these influence the designer’s goals. To illustrate this, consider the distinction between the distinction consider this, To illustrate goals. the designer’s influence these design problem. two classes of the following n SDC08 9/18/07 10:56 AM Page 189 AM Page 10:56 9/18/07 SDC08 IEEE Psychology of Pro- software design method are likely to be. software design method any (2), 251–7 SE-12 , clichés , or part part (Hoc J.-M., Green T.R.G., Samurçay R. and Gilmore D.J., eds). Academic Press heuristics representation process batch reactive concurrent a a a set of gramming Trans. Software Engineering Further reading Summary This is a review of research involving observations of expert designers of software and the strat- This is a review of research involving observations of expert designers of software of these egies that they use when designing systems. While it does not examine the relationship be approxim- actions to specific design methods, it does identify the design practices that should ated through the use of a design method. This paper starts from a recognition that software design is not a precise and systematic process, This paper starts from a recognition that to document a design as though it had been produced and argues that we should, however, seek a valuable discussion of the issues of the docu- by such an ideal process. The paper provides mentation of design features. software design strategies. In Visser W. and Hoc J.-M. (1990). Expert problem domains were identified. <a href="/tags/Rational_design/" rel="tag">rational design</a> process: How and why to fake it. Parnas D.L. and Clements P.C. (1986). A n n n and their roles have been discussed. The rationale for using a design method has also been con- been discussed. The rationale for using a and their roles have for ‘domain knowledge’ when knowledge’ may provide a substitute sidered, and how ‘method this way, it has tried to determine at the nature of the design process in necessary. By looking on the form and applicability of what the limitations of the structure of design methods, the nature of prob- As a final step before a fuller consideration the characteristics of the lem domains was considered. In particular, n n n This chapter has considered the nature of the software design process in terms of its components design process in nature of the software has considered the This chapter these with a structure. potential for providing and of the been identified: components have following three principal process itself, the In the design</p><p>The rationale for method 190 SDC08 9/18/07 10:56 AM Page 190 AM Page 10:56 9/18/07 SDC08 Exercises 191 ). Is Unix tion about its design that you would like to have available to you, and rank these in descending tion about its design that you would like to order of importance. apply at the time of execution (the preferences of the drinker, the amount of tea or coffee execution (the preferences of the drinker, apply at the time of that are not based on the Find examples of similar everyday processes available, and so on). the relevant operations. kitchen and identify by another person, list five forms of informa- e-shopping purposes that was originally written (b) of a user’s directory (such as the utility program used to list the contents A system (c) language. An interpreter for a programming (d) A multi-user operating system. (e) in travel agents’ offices. seat reservation system with terminals An airline batch, reactive or concurrent? batch, reactive (a) machine. A bank autoteller Exercises 8.3 interactive ‘client program’ used for Faced with the need to understand and modify a simple 8.2the conditions that executed in a manner influenced by Making tea (or coffee) is a process 8.1 domains of one or more of the systems in terms each of the following How would you classify SDC08 9/18/07 10:56 AM Page 191 AM Page 10:56 9/18/07 SDC08 SDC08 9/18/07 10:56 AM Page 192 SDC09 9/18/07 10:59 AM Page 193</p><p> chapter 9 193 Design Processes and Design Strategies</p><p>9.1 The role of strategy in 9.3 Design by top-down methods decomposition 9.2 Describing the design 9.4 Design by composition process – the D-Matrix 9.5 Organizational influences upon design</p><p>Each design method embodies a design strategy within its process part, which gives a sense of direction to the procedures of the method and forms one of the elements that make up its basic philosophy about designing. Following a discussion about the roles of strategy in design, this chapter introduces some simple process modelling forms which can be used to help with describing the design processes themselves. It then goes on to examine some of the more widely adopted strategies, together with the principles that underpin these. Strategies are not necessarily wholly based upon technical factors, and so we also examine how they can be influenced by the needs of organisational users of software. clichés , or part part General procedural model of the software design process. heuristics The process part of a method is closely entwined with the representation part, The process part of a method is closely We begin with a reminder of the form used for describing the structure of a design of the form used for describing We begin with a reminder representation process set of described in Chapters 5 and 7. In Chapter 8 it was further observed that the set of these described in Chapters 5 and 7. In Chapter the Design Virtual Machine (DVM) that is used in a method are important in defining the type and form of design model(s) that embodied in a method, since they determine when using the method. a designer is encouraged to produce on how the models should be developed. We since it provides ‘procedural’ guidelines n n n forms of representation have already been The properties of some widely used the more detailed study of specific software design methods in the remaining chapters study of specific software design methods the more detailed of this book. in Chapter 8. There it was in Chapter 2 and further developed method, first introduced in terms of the following design method could be described suggested that a software principal components: 9.1 strategy of in methods role The way, and identi- in a rather general of design methods examined the nature Chapter 8 this to possess. In might be expected that a design method components fied the major and a bit further, are developed roles of these components ideas about the chapter, our process parts of some in the strategies encapsulated to examine the principal we begin needed to undertake the groundwork This completes design methods. major software Figure 9.1</p><p>Design processes and design strategies 194 SDC09 9/18/07 10:59 AM Page 194 AM Page 10:59 9/18/07 SDC09 The role of strategy in methods 195 Expanded view of the procedural model of the software design process. Expanded view of the procedural model of Figure 9.1 shows this procedural model of the software design process in a sym- Figure 9.1 shows this procedural model an oblong to denote a representation form; an oval to denote a procedural step; an arc to denote the sequence of steps. of Figure 9.1. (Note that our notation possesses the important property of being of Figure 9.1. (Note that our notation possesses the important property hierarchical, as discussed in Chapter 5, in that the description of any transformation that step can be expanded further using the same three components.) The iterations n n n form These can be seen more fully in Figure 9.2, which shows a slightly expanded now look more closely at the nature and form of the process part, while in later chap- now look more closely at the nature together when we look at examples of design ters the three components are brought of heuristic that are associated with them. methods and examine the specific forms use of this form throughout the rest of this book. bolic fashion, and we will be making a design method are: The basic symbols it uses to describe Figure 9.2 SDC09 9/18/07 10:59 AM Page 195 AM Page 10:59 9/18/07 SDC09 strategy is one where the designer modifies the structuring for their modifies the structuring for is one where the designer is one which does not usually involve any change of viewpoint, is one which does not usually involve elaboration step transformation step This general model, in which a sequence of procedural steps make up the process This general model, in which a sequence of procedural steps make up the It is important to recognize that both types of step involve creative actions, It is important to recognize that both These two forms have quite distinctive roles and characteristics, which can be have quite distinctive roles and characteristics, These two forms Back in Chapter 2, in a brief and introductory discussion about the form of the typ- discussion about the and introductory 2, in a brief Back in Chapter An or reorganizing the design model within but is more concerned with restructuring include expanding the bubbles in a DFD, the current viewpoint. (Examples might The purpose of an elaboration step is usu- or grouping states within a Statechart.) to the model, or to obtain greater insight into ally either to add further information restructuring, and as such it may be an the current state of the design plan through transformation step. essential preliminary to a successful A of reinterpreting it using in some way. Typically this consists model of the ‘system’ to produce a constructional (ultimately, of course, the aim is a different viewpoint fairly major design deci- will require the designer to make some model). Such a step one. sions and is clearly a strongly creative emphasis upon the use of the viewpoints model, so making a more explicit distinction emphasis upon the use of the viewpoints model, so making a more explicit between transformation and elaboration steps. that we discuss later in this section are more likely to be embodied in the procedures that we discuss later in this section are more likely to be embodied in the employed in the elaboration steps of a method. the notations part, is one that we will use extensively in analysing design methods, and introduce shown in Figures 9.1 and 9.2 will be used for this. In the next section we will places more a slightly more ‘formal’ notation that complements this, and which although the forms that the creativity takes are somewhat different. The transfor- although the forms that the creativity designer to be able to bridge their ideas across two mation process typically requires the while the elaboration process is more concerned or more different sets of properties, (or the potential for forming these), while also with recognizing patterns and structures transformation. Figure 9.3 illustrates possibly anticipating the needs of subsequent We might also note that the issues of these distinctions in an abstract manner. When we come to examine some examples of design methods, we will see that When we come to examine some step, usually preceded and followed by many of these have only one transformation from a methodological aspect are whether the elaboration steps. Important factors late in the sequence of steps, and the number (and transformation step appears early or types) of viewpoint that may be involved. n n cesses and strategies in rather more detail, it is useful to examine this categorization in rather more detail, it is useful cesses and strategies steps of any design method, is because each of the procedural more closely. This as being one of those two employed, can usually be classified regardless of the strategy forms. described as below. occur between phases of the design process are not shown explicitly: the model is con- the model shown explicitly: are not process the design phases of between occur actions, of sequencing the detailed than rather overall strategy with describing cerned the the experience of problem and the needs of a specific will be driven by since these designer. a ‘transformation’ distinction between we made the part of design methods, ical process pro- consider design that we need to ‘elaboration’. Now one concerned with step and </p><p>Design processes and design strategies 196 SDC09 9/18/07 10:59 AM Page 196 AM Page 10:59 9/18/07 SDC09 The role of strategy in methods 197 positions. Arguments are often paired, with one supporting a issues. to steps. A step is performed because a set of commitments has positions. artifacts. The artifact provides evidence for the argument. artifacts. An issue may be raised to review the property of an artifact. artifacts. An issue may be raised to review artifacts. In ‘derivation’, a new artifact is created. In ‘revision’, a new artifacts. In ‘derivation’, a new artifact object to support cite issues. This may occur automatically, but the issue may not have to be issues. This may occur automatically, respond to contribute Contrasting transformation and elaboration design steps. Contrasting transformation review raise modify Their model is based on the use of five entity types (the boxes) and eight binary Their model is based on the use of These models were largely chosen because they are convenient forms for aiding the These models were largely chosen because Arguments position and the other opposed to it. Arguments Positions been made. Steps addressed immediately. Issues Positions Arguments Steps version of an existing artifact is created. Figure 9.3 n n n n n n n and an example of this is shown in Figure 9.4. and an example of this is shown in Figure operate as follows (Potts, 1989). relationships (the arcs). The relationships n analysis of the procedural aspects of design methods. Although we do not have scope analysis of the procedural aspects of models of the actual procedural steps, the ability in this book to utilise more detailed we need to review particular processes. As an to describe these can be useful when model, that developed by Potts and Bruns example of such a more detailed process Lee, 1991) does provide the means of performing (Potts and Bruns, 1988; Potts, 1989; involved in making individual design decisions, a more detailed analysis of the factors In Potts (1989) this model has been used to analyse the initial stages of the JSD In Potts (1989) this model has been used to analyse the initial stages a useful method, and to model the processes involved. This form therefore provides SDC09 9/18/07 10:59 AM Page 197 AM Page 10:59 9/18/07 SDC09 A Potts and Bruns model of the processes involved in design steps. A Potts and Bruns model of the processes There is also a historical perspective to this issue of how the design process is There is also a historical perspective to this issue of how the design process Where strategy does play a particularly important part is in determining the form Where strategy does play a particularly important part is in determining The design transformation and elaboration steps in a method can be considered as The design transformation and elaboration performed. David J. Koepke (1990) has recorded his research into the evolution of performed. David J. Koepke (1990) has recorded his research into the tional and behavioural characteristics and likely forms of implementation. While of the initial model that a designer will create in order to describe the problem. form of the almost all design methods claim to begin by modelling the ‘real world’, the very widely, Design Virtual Machine (DVM) that is used for this description can vary and can make use of a wide variety of viewpoints. supplement to our basic process model, since it can be used to elaborate on the form supplement to our basic process model, model. of specific components from the process which are in turn guided by the strategy that is embodying local tactical decisions, issues, for their part, are generally concerned adopted by a particular method. Strategic of a particular problem, specific construc- with large-scale factors such as the domain Figure 9.4 (After Potts (1989) © 1989 IEEE)</p><p>Design processes and design strategies 198 SDC09 9/18/07 10:59 AM Page 198 AM Page 10:59 9/18/07 SDC09 The role of strategy in methods 199 ) is object , 1988). et al. methods, which generally take a ‘top-down’ view of the design methods, which generally take a ‘top-down’ methods, for which the structure of the design process is strongly methods, for which the structure of methods, whereby the basic design model is built up from the identi- methods, whereby the basic design model -based methods, where a specific problem domain provides a class of prob- Clearly, many factors have influenced the development of design methods, and for Clearly, many factors have influenced Software design methods are not influenced by technical issues alone, of course. Software design methods are not influenced The form of module employed in a design model is clearly related to the ideas employed in a design model is The form of module A major factor in the development of thinking about software design has been the about software design of thinking in the development A major factor influenced by the requirement that it should conform to non-technical requirements influenced by the requirement that it that are based on the form of the organization; template lems that can be tackled using a fairly standard strategy. decompositional through a process of sub-division; process, developing the design model compositional fication of ‘entities’ of some form; organizational that reason they are difficult to classify in any very systematic manner. For the pur- that reason they are difficult to classify we will use the following broad groupings in poses of the rest of this chapter, though, into a design method: order to discuss how strategy is incorporated the exception of the last, which is addressed in the next chapter), and makes an initial the exception of the last, which is addressed in the next chapter), and makes classification of methods in terms of them. n (with The rest of this chapter examines the characteristics of each of these strategies n n n ever larger and more complex (Curtis ever larger and more complex (Curtis be a rather more difficult goal to achieve through procedural forms but, since the late be a rather more difficult goal to achieve architectural style has attracted consider- 1980s, applying these to the object-oriented style, the basic module concept (the able attention and effort. In such a nature and properties than the subprogram. correspondingly more complex in its and national influences, as well as There are environmental, cultural, organizational expectations and need as systems have become the continually increasing scale of user largely gone in parallel. Changes in the form of module employed have reflected the Changes in the form of module largely gone in parallel. and how those structures about how systems should be structured, evolution of ideas with making effective Early thinking about design was concerned might be achieved. on partitioning system func- strengths, and so was focused use of the subprogram’s Wirth’s (1971) classic paper. well summarized in Niklaus tionality into sub-tasks, the principle of information-hiding has proved to Structuring a design solution around subprogram mechanism, which then provided the basic design element that could be which then provided the basic subprogram mechanism, as that of information- process. Only later did such concepts modelled in the design view of how modularity from which to develop a quite different hiding provide a basis logical manner. might be used in a the evolution of the two has style introduced in Chapter 6, and about architectural software design ideas and has described how thinking about software design has devel- design has software about thinking how has described ideas and design software included is that it work of this element important A particularly and evolved. oped to obtain their impres- the field, in order of the pioneers of with some making contact recollections. sions and In the earliest interpreted and defined. module has been the concept of a way that the development of through the modularity was achieved goal of physical stages, the SDC09 9/18/07 10:59 AM Page 199 AM Page 10:59 9/18/07 SDC09 (short D-Matrix of design states. Its chief description with the viewpoints model that was elaboration process – the D-Matrix process and transformation Despite its rather formal and mathematical appearance, we should emphasize that Despite its rather formal and mathematical appearance, we should emphasize Before reviewing the major design strategies, we now examine a ‘viewpoints- Before reviewing the major design On the whole, existing design practices do not help greatly with either of these On the whole, existing design practices This is generally a reasonable practice to adopt, particularly for such issues as reasonable practice to adopt, particularly This is generally a Before proceeding, however, one other point should be mentioned here: the rela- the here: be mentioned should other point one however, proceeding, Before designer to focus to encourage the methods) tend (and associated Design strategies to incorporate them into the later stages of design refinement, by which time archi- into the later stages of design refinement, to incorporate them with their needs; have been made that are inconsistent tectural decisions may using the experience gained process from a much earlier stage, to repeat the design with the greater complexity design for the basic problem to help from producing a of the fuller problem. attraction for our purposes is that it offers a very compact notation that can be used to attraction for our purposes is that it offers a very compact notation that can describe particular design steps. the state of the ‘design model’ at any point in its evolution (Budgen, 1995). The D- the state of the ‘design model’ at any point in its evolution (Budgen, 1995). to describe Matrix is totally independent of any specific methods; indeed it can be used record quite not only method processes, as we will do in later chapters, but also to opportunistic sequences of design activities. this notation is solely concerned with providing a The forms used for modelling a software design process discussed in the previous The forms used for modelling a software the sequence of steps that make up a par- section are largely concerned with identifying we introduce a formalism that seeks to unite ticular design process. In this section, the concepts of use what we have termed the introduced in Chapter 5. To do so, we is intended to provide an abstract description of for ‘Design Matrix’) notation, which exceptions is a relatively unexplored field in <a href="/tags/Design_theory/" rel="tag">design theory</a>. exceptions is a relatively unexplored the procedural steps of a method. centred’ notation that will aid with modelling 9.2 the design Describing As always with design, there is no hard and fast rule about which of these strategies As always with design, there is no hard such as project deadlines may push the may be the most appropriate. Constraints but, where significant HCI elements are involved, designer towards the former choice element, this may lead to considerable distor- or where error-handling is an important tion of the design structure. field in its own right, and designing for issues. HCI design is now a rather specialized n n stage in the design process, when the design model is being refined and elaborated. process, when the design model is being stage in the design in the initial model may lead to since any attempt to include these exception-handling, faced with the following alter- complex. The designer is then it becoming excessively how to incorporate these issues: natives when determining tionship between strategy and such ancillary aspects as the design of the user interface the user design of as the aspects ancillary and such strategy between tionship strategies. of error-handling and the design a model of a problem. in building up of the eventual system core activities on structuring interactions (HCI), human–computer the organization of such issues as As a result, later deferred until a are generally conditions, of error (exception) and the handling</p><p>Design processes and design strategies 200 SDC09 9/18/07 10:59 AM Page 200 AM Page 10:59 9/18/07 SDC09 Describing the design process – the D-Matrix 201 th design element. i design elements, with full descrip- design elements, with n (for example, a set of STDs) can then be regarded (for example, a set of STDs) can then denote the viewpoints (the last of these was denoted denote the viewpoints c and d , f , b ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ representations } f d s b n n c n n n ,..., D ,..., s 2 ...... cc ff bb 12 , D dd 12 12 12 s 1 i i i b f d c i in Budgen (1995) individual subscripts are used to identify ). Similarly, numerical DD D DD D DD D DD D At the beginning of the design process itself, the requirements specification will At the beginning of the design process itself, the requirements specification Specific design So, an example of such a matrix, describing So, an example of At any given point in the design process, the current state of the ‘design model’ is in the design process, the current state At any given point D ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ s { D D D D as being projections from the set of attributes that are described along a single row, as as being projections from the set of attributes in the set: element. So this can be described as a matrix with one column (and hence no sub- element. So this can be described as a matrix with one column (and hence scripts), as in: Of course, since any one diagram may omit the states of certain elements, not all of Of course, since any one diagram may omit the states of certain elements, we will these will necessarily be present in such a projection. However, in practice, design be more interested in columns and matrices than in rows when modelling processes. were a single usually describe the black box properties of the system as though it represents the attributes that describe the properties of the represents the attributes that describe rows, the superscripts rows, the superscripts of attributes, and their description, will of course be dependent upon the design their description, will of course be of attributes, and employs. and the architectural style that this approach adopted for each of the elements (which by a matrix. This has a column therefore represented four rows that represent the objects, processes, etc.), and might be subprograms, Rather than ordering the element within one of the viewpoints. attributes of each 9.2.1 formalism The D-Matrix specifica- any design (or requirements) notation is that assumption for this The basic elements’ (or ‘require- for a set of ‘design the specifications composed from tion can be of in terms of a set be described element can itself where each ments elements’), viewpoints (func- with the four major associated that describe the properties attributes set of the elements, the The actual form and construction). <a href="/tags/Data_model/" rel="tag">data model</a> tion, behaviour, by where the column design elements. as: each element, will have a form such tions available for SDC09 9/18/07 10:59 AM Page 201 AM Page 10:59 9/18/07 SDC09 th i th design element i are used to indicate that there are no data to indicate that there are used c ∅ and d ∅ 3 3 3 3 i i b d i c f i D D D D 2 2 2 2 i i b d i c f i D D D D ⎞ ⎟ ⎟ ⎟ ⎠ c d f b 1 1 1 1 i i i i i i f d c b b f d c i i If we begin with a very global view of the design process as a whole, then we can If we begin with a very global view of the design process as a whole, then The only constraint that this imposes (for pragmatic reasons) is that a given The only constraint that this imposes To conclude this introduction to the basics of the notation, we need to consider to the basics of the notation, To conclude this introduction R R ∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎝ D D D D D D D D</p><p> and produces a complete design description. Using the elements we have already met and produces a complete design description. Using the elements we have in the previous section, this can then be expressed as 9.2.2 transformations design Describing we will Since we will be providing examples of these in later sections and chapters, this notation only provide a fairly brief description of these here, in order to show how can be deployed. specification consider it as consisting of a transformation which takes a requirements abstraction needs to be described in terms of the same set of sub-elements in each abstraction needs to be described in this does not create any real problems when of the different viewpoints. In practice methods, although it does limit our ability to describing the practices of design describe some opportunistic design sequences. (and of course, there is scope for the reverse when we group a set of elements into a (and of course, there is scope for the ‘super-element’). by a set of columns that represent the properties of the sub-elements. These are in by a set of columns that represent index value in the subscript, so that if the turn distinguished by using a second sub-elements (say), we would now have the element were to be replaced by three columns the matrix that is currently representing the the matrix that is currently modelling or constructional attributes present in the specification (which of course attributes present in the modelling or constructional be true!). may not necessarily are created when we employ to cope with the abstractions that how it can be adapted form. With one constraint, such as the DFD or Statechart a hierarchical representation replacing the column in by only a slight extension, which involves this can be achieved Here the empty set symbols empty set symbols Here the </p><p>Design processes and design strategies 202 SDC09 9/18/07 10:59 AM Page 202 AM Page 10:59 9/18/07 SDC09 Describing the design process – the D-Matrix 203 will be kept for non-specific D steps, and these will be denoted steps, and these will , where the superscript indicates that this is the , where the superscript i transformation T ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ and and f d b n c n n i n E ...... elaboration cc ff bb 12 dd 12 12 12 DD D DD D DD D DD D ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → A typical elaboration step. D</p><p>⎞ ⎟ ⎟ ⎟ ⎠ c d f b In our first example, the designer expands the DFD shown in Figure 9.5(a) into In our first example, the designer expands As discussed earlier, the process parts of procedural design methods generally con- the process parts of procedural design As discussed earlier, R R ∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎝</p><p> th step of the process. (Use of the general design symbol (Use of the general design symbol th step of the process. by the transformation symbols by the transformation i that the ‘design transformation’ involved is in some way a mathematical procedure involved is in some that the ‘design transformation’ convenient shorthand that can We are simply using it as a related to matrix algebra. design methods encour- the manner in which particular software help to make explicit develop a design solution. age the designer to of sist of a sequence Again though, we should not assume that this use of mathematical formalism implies use of mathematical assume that this we should not Again though, that shown in Figure 9.5(b), by restructuring one of the bubbles into three bubbles. that shown in Figure 9.5(b), by restructuring how such a step is represented in this particu- Since we are using our notation to show about the reuse of the index value 3 for a lar case, we will not be too concerned this would be significant in practice! Assuming different element, although obviously ‘step’, then the step of elaborating Figure 9.5(a) that this is the designer’s third design our notation as: into Figure 9.5(b) will be described in steps, such as those arising in opportunistic processes.) To conclude our introduction arising in opportunistic processes.) steps, such as those simple examples of elabor- we therefore examine two very to the D-Matrix concepts, ation and transformation steps. Figure 9.5 SDC09 9/18/07 10:59 AM Page 203 AM Page 10:59 9/18/07 SDC09 ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ 5 5 5 5 ∅ dd 44 ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ 5 5 5 5 fffff ccccc bbbbb ddd 1234 123 1234 1234 DDDDD DDDDD ∅∅∅∅∅ ∅∅∅∅ 0 ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ → 4 fffff T bbbbb ddddd ccccc 1234 1234 1234 1234 DDDDD ∅∅ ∅∅ ∅∅∅∅∅ ∅∅∅∅∅</p><p>⎛ ⎜ ⎜ ⎜⎜ ⎜ ⎝ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ 5 5 5 5 → 3 E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ A typical transformation step. (Transforming the functional model of Figure 9.5(b) A typical transformation step. (Transforming fffff fff bbbbb ddddd ccccc bbb ddd ccc 1234 1234 1234 123 123 123 1234 123 DDDDD DDD ∅∅∅∅∅ ∅∅∅∅∅ ∅∅∅∅∅ ∅∅∅ ∅∅∅ ∅∅∅ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛</p><p> specific examples, we will mainly be using it to illustrate fairly simple or general design specific examples, we will mainly be using it to illustrate fairly simple or general steps such as the two above. While obviously the D-Matrix is rather cumbersome when used with larger and very While obviously the D-Matrix is rather cumbersome when used with larger a sub-program unit. This is shown in Figure 9.6, and the transformation step (which a sub-program unit. This is shown in hierarchy and data flow mechanisms) is involves making decisions about invocation design model is considered to consist of both demonstrated below. Note that the new the DFD and the Structure Chart. For our second example, the designer takes the DFD created above and, as their fourth For our second example, the designer Chart, with each DFD ‘bubble’ becoming design step, restructures this into a Structure into a constructional viewpoint.) Figure 9.6</p><p>Design processes and design strategies 204 SDC09 9/18/07 10:59 AM Page 204 AM Page 10:59 9/18/07 SDC09 Design by top-down decomposition 205 Decompositional solutions to a simple problem. (a) Solution 1. (b) Solution 2. In its most basic form, the success of this approach of finding a good solution will the success of this approach of finding In its most basic form, Figure 9.7 valent, but structurally very different. Figure 9.7 provides just such an example of how valent, but structurally very different. a given problem. It may be that these two we can easily find two ways to decompose ‘divide and conquer’ has also sometimes been used. ‘divide and conquer’ problem is described, since this on the way in which the original be highly dependent choice of subtasks. Indeed, it is the basis for the designer’s initial forms the model that unstable, in that small differ- this approach is therefore inherently can be argued that can lead to solutions that are functionally equi- ences in the decomposition of a task emphasis among the implementation forms, a natural design strategy was one in which implementation forms, a natural design emphasis among the tasks, with this subdivision program was subdivided into smaller the main task of a sufficiently elemental the resultant subtasks were considered being continued until been elegantly summarized in as subprograms. This strategy has to be implemented ways to implement this Wirth (1971), which suggested practical a paper by Niklaus for this strategy; the phrase used the term ‘stepwise refinement’ approach. Wirth 9.3 decomposition top-down by Design has a long pedi- the design of software approach to (decompositional) The top-down such widely available, to become languages of the earliest programming gree. Most for describing powerful mechanisms provided quite and FORTRAN, as assembler but rarely the use of subprograms, of a program through structuring action-oriented an Given such data structures. and using complex the means of creating provided SDC09 9/18/07 10:59 AM Page 205 AM Page 10:59 9/18/07 SDC09 of a model that is expressed elaboration ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ d n f b n n c n ...... ff cc bb dd 12 12 12 12 DD D DD D ∅∅ ∅ ∅∅ ∅ ⎛⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → n E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ fff ccc bbb ddd 123 123 123 123 Because of its long history and the relative ease with which it can be applied, the Because of its long history and the relative ease with which it can be applied, We will return to a discussion of how this strategy can be applied in Chapter 11. We will return to a discussion of how One other consequence of using this strategy that should also be mentioned is the One other consequence of using this The top-down strategy also illustrates one of the characteristic features of the also illustrates one of the characteristic The top-down strategy This instability arises because, when following a top-down strategy, the important because, when following a top-down This instability arises DDD DDD ∅∅∅ ∅∅∅ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜</p><p> methods, and ways of avoiding some of its more undesirable features have been devel- methods, and ways of avoiding some of its more undesirable features have other design oped and used in the methods that are based upon it. Indeed, even where and again, we will be reviewing this process more fully in Chapter 11. of design top-down strategy has played quite an important role in the development mainly in terms of the functional and constructional viewpoints. So a D-Matrix mainly in terms of the functional consist of progressing from a model with a few description of each step will normally elements, as in, for example elements (columns) to one with many the use of a refinement process implies the need to explicitly check for, and resolve, the use of a refinement process implies a simple example of how such duplication can any such duplications. Figure 9.8 shows decomposition. easily arise during such a process of the first two sections of this chapter, we can view In terms of the concepts discussed in one of the process involved as being largely there are no generally applicable criteria that can be used to determine how small a there are no generally applicable criteria elemental. task should be to be considered as suitably strategy consists of a sequence of (essentially problem of duplication. Because the there is potential for full or partial dupli- divergent and disconnected) refinements, operations are defined. The scope for this is, cation of functionality when the low-level is the responsibility of more than one person. So of course, even greater if the design decomposition. of a ‘wicked problem’, we When discussing Rittel’s definition design process itself. as being the lack of a ‘stopping characteristics of such a problem identified one of the process is complete. This can use to determine that the design rule’ that the designer evident in functional decomposition, since feature of the design process is particularly decisions about basic structures have to be made at the beginning of the design pro- structures have to be made at the decisions about basic through the following of any poor decisions will be propagated cess, so that the effects a later stage of design, and even may lead to significant problems at steps. This in turn a top-down strategy, it is par- redesign a system. When using to the need to totally as possible at each stage of to explore the design options as fully ticularly important structures will converge following further decomposition, but this cannot be guaran- be but this cannot decomposition, further following converge will structures that a D-Matrix note here usefully might alone. (We strategy of the by the use teed on its emphasis lies two solutions, since between the would not distinguish description and design elements, about the of state information the presence or absence describing part relationships is about the them. While information between not the relationships does D-Matrix model elements, the states of the individual making up the of the detail of course.) of any use of abstraction way – a limitation this in any explicit not show</p><p>Design processes and design strategies 206 SDC09 9/18/07 10:59 AM Page 206 AM Page 10:59 9/18/07 SDC09 Design by composition 207 list end of the Add record to list in name order Sort existing list of records into a new key Search for record with next two different activities two different Same operation is used in list end of the Add record to Create new list of records Example of duplication of low-level functions when using a decompositional Example of duplication of low-level functions record Read one The reverse of this approach is to use a compositional strategy for building the The reverse of this approach is to use a compositional strategy for building The SSA/SD (Structured Systems Analysis and Structured Design) method, evolved The SSA/SD (Structured Systems Analysis tions of a set of particular entities or objects that can be recognized in the problem tions of a set of particular entities or objects that can be recognized in entities. The itself, together with a description of the relationships that link these In a top-down strategy for design, the emphasis is heavily focused on identifying the In a top-down strategy for design, the emphasis is heavily focused on identifying problem that operations that need to be performed by the system. So the model of the although results is based almost entirely on consideration of the functional viewpoint, the refinement of the model may make use of other viewpoints. descrip- designer’s model. In this, a model of the problem is constructed by developing criticisms of top-down design. Even in more recently developed methods, such as criticisms of top-down design. Even still a significant top-down aspect to the process SSADM (Longworth, 1992), there is model itself. 9.4 composition by Design identify the major functional modules of the system, with the design of these then being identify the major functional modules elaborated using a quite different strategy. 1988; Gane and Sarsen, 1979) is an example by Yourdon and coworkers (Page-Jones, enlarged version of this strategy. Chapter 13 will of a widely used method based on an steps incorporate ways of handling these major show how the recommended process Figure 9.8 structure. a system, it is not uncommon for the initial strategies are to be used for developing decomposition, using a top-down strategy to design steps to consist of a functional SDC09 9/18/07 10:59 AM Page 207 AM Page 10:59 9/18/07 SDC09 The compositional design strategy. An important feature is the design of the strategy. An important feature is the The compositional design It is reasonable to consider the process of using a compositional strategy as rather It is reasonable to consider the process of using a compositional strategy JSP (Chapter 14) is another design method that can be regarded as using a composi- JSP (Chapter 14) is another design method We can again model these processes using the D-Matrix, but now the process is We can again model these processes In a method that uses a compositional strategy, such as JSD (Chapter 15), and the In a method that uses a compositional ever, it can also be argued that this ‘intuition’ is partly a matter of familiarity, since ever, it can also be argued that this ‘intuition’ is partly a matter of familiarity, (imperative) programmers are generally more experienced with function-oriented a data-modelling viewpoint, by assembling a set of descriptions of the structures of the a data-modelling viewpoint, by assembling a set of descriptions of the structures of entity than input and output data streams. While these are rather less concrete forms in the those used in the two methods referred to above, the basic strategy involved design process is still a compositional one. 1994). How- less directly intuitive than the top-down strategy (Vessey and Conger, well as elaborating more complex combinations of viewpoints. Indeed, as we will see well as elaborating more complex combinations that employ such models, the philosophy behind when we come to examine methods processes that are largely sequences of elabor- this strategy tends to result in design being essentially ‘spread out’ across a number of ation steps, with any transformations in the process. steps, rather than forming explicit steps the model of the problem is created using tional strategy. In the case of JSP, however, interactions occurring between them. While the type and form of entity and inter- interactions occurring between them. they do in the two examples cited above), action may differ considerably (as indeed design model by grouping elements together is the overall strategy of composing the the same. of the matrix to create new abstractions, as more likely to be one of grouping columns nature of the entities used in the model will vary with the method, as will the view- nature of the entities used in the model 9.9 shows a schematic view of this strategy. points chosen for describing them. Figure 16), the relevant entities are normally identified ‘object-oriented’ approaches (Chapter the problem. A complete and detailed model of by analysing an initial description of the descriptions of the entities and the the solution is then developed by elaborating Figure 9.9 interfaces between the elements of the model.</p><p>Design processes and design strategies 208 SDC09 9/18/07 10:59 AM Page 208 AM Page 10:59 9/18/07 SDC09 Organizational influences upon design 209 process between the design and the ori- process between the verification , in that their use will tend to lead to similar solutions for a problem, will tend to lead to similar solutions , in that their use in terms of the transformation steps involved, with a more gradual pro- steps involved, with a more in terms of the transformation stable even A significant feature of such organizations is that they are highly likely to provide A significant feature of such organizations is that they are highly likely to International agencies, as well as central and local government bodies, are major International agencies, as well as central and local government bodies, are These points will be examined as part of the descriptions of specific methods given These points will be examined as part If compositional methods are more complex and less directly intuitive than those and less directly intuitive more complex methods are If compositional better able to provide a good better able to provide trail’ between solution since there is usually an explicit ‘audit ginal specification, objects. objects and problem more the structure of the solution since the design strategy relates regardless of the user, the problem (Détienne, 2002); to the structure of more methods; development than is common for top-down gression of design their staff with career structures that are geared to overall organizational needs, and their staff with career structures that are geared to overall organizational customers for software-based systems. These range from specialized defence real-time customers for software-based systems. These range from specialized defence are very systems to applications for stock control or taxation. Many of these systems technology, large; they are difficult to specify; the requirements may change with teams or legislation or internal reorganization; and they may be produced by in-house by outside contracting agencies. For our purposes, an organizational design method can be considered as one in which For our purposes, an organizational method is strongly influenced by a set of non- the form of the process part of the and structure of the organization using the technical factors, arising from the nature affect the representational part so directly, method. While these factors do not usually of extending or formalizing it in some way. To their influence may still have the effect the rationale that lies behind their adoption understand the nature of such a method, and use must be considered. in the following chapters, in order to show how well this view of the compositional in the following chapters, in order to strategy is justified. 9.5 upon design influences Organizational modularity and information-hiding (Parnas, 1972) in the structuring of a designer’s modularity and information-hiding on ‘grouping’ that occurs in the elaboration solution. This arises from the emphasis elements by considering different relations of a design model, with scope to group structures, shared data objects, function, and so between them, including shared data to achieve (if not impossible) through the use of a on. This is a process that is difficult top-down strategy. n strategy is that it gives more opportunity A particular benefit of the compositional the use of such important design concepts as for using multiple viewpoints to exploit n n programming languages, and therefore have acquired greater experience with a with a experience greater have acquired therefore and languages, programming be offset bias can that this expect therefore We can of systems. view function-oriented borne out by experi- view seems to be method, and this in a compositional by training 1997). and Kemerer, ence (Fichman require more discip- and so perhaps top-down approach, that are based on a methods also: that they are use, it can be argued line in their SDC09 9/18/07 10:59 AM Page 209 AM Page 10:59 9/18/07 SDC09 There are a number of methods that can be classified as having an organizational There are a number of methods that To help with control of the increasing number of large software-based projects of the increasing number of large To help with control The British Civil Service is an example of just such an organization, and it is and it is such an organization, an example of just Civil Service is The British MASCOT (Modular Approach to <a href="/tags/Software_construction/" rel="tag">Software Construction</a>, Operation and Test) is MASCOT (Modular Approach to Software Construction, Operation and sector. intended for use in real-time systems, and originated in the UK defence a rep- (Strictly, MASCOT is not a method as we have defined the term, having only resentation part and no well-defined process part.) duced for use with data-processing projects by central and local government agen- duced for use with data-processing projects cies in the UK (Longworth, 1992); to SSADM; MERISE, which is a French equivalent Design), which has been developed on HOOD (Hierarchical Object-Oriented for use in designing Ada-based systems; behalf of the European Space Agency SSADM (Structured Systems Analysis and Design Method), which has been pro- SSADM (Structured Systems Analysis standardization of documentation allows for better management of maintenance; standardization of documentation allows and control of projects, based on the use there is scope for better planning, costing directly to current practices. of past experience, which can be related there is minimum disruption of a project when staff changes occur; disruption of a project when staff changes there is minimum not lead to a change of technical direction; a change of project manager should not seem to have been common practice in the USA, nor elsewhere, as far as can be not seem to have been common practice in the USA, nor elsewhere, as ascertained. n methods does These are all examples from Europe, as the development and use of such n n ones. Perhaps the major negative aspect is that they tend to be overly bureaucratic, ones. Perhaps the major negative aspect options may not be adequately explored, and also with the attendant risk that creative be lost. that the overall technical direction can element. These include: n n n features of such methods to offset these positive There are, of course, some negative responding growth in emphasis upon the use of ‘standard’ methods for analysis and in emphasis upon the use of ‘standard’ responding growth an organization (and prefer- a standard method or strategy within design. The use of a number of benefits: ably beyond it) has n n years. Each transition between grades or posts will therefore occur at an externally between grades or posts will therefore years. Each transition project that they might of the state of any software-based determined time, regardless it does embody the main this view is perhaps a little simplified, be involved in. While that are used by such organizations. principles and practices into the 1990s, a cor- there was in the 1980s, continued needed in such organizations, hence are not directly related to project needs. As a result, staff at all levels may be all levels staff at a result, needs. As project related to directly are not hence that are at times management) the project team (and a project and out of in transferred of the project. of the state or wholly independent by factors largely determined ser- During a civil as in other countries. in Britain as well by similar bodies mirrored well grades, and may through a series of expect to progress he or she may vant’s career, of (say) two or three for fixed intervals of positions to occupy a number be required</p><p>Design processes and design strategies 210 SDC09 9/18/07 10:59 AM Page 210 AM Page 10:59 9/18/07 SDC09 Further reading 211 Comm. (4), 221–7 14 , Comm. ACM strategy; and the structures and rationale. strategy decompositional (12),1053–8 15 , At a technical level, in terms of the strategies involved in their use, these methods use, these in their involved the strategies terms of level, in technical At a organizational top-down, or compositional ACM Further reading Summary lowing chapters are concerned with describing and assessing a number of widely used design lowing chapters are concerned with describing each case. methods, relating them to these issues in and that design methods can further be classified according to whether they consider the effects and that design methods can further be classified of software design methods in this manner, the fol- Having examined the conditions for classifying This too is considered a classic paper in terms of its influence on software design (and the design This too is considered a classic paper in terms of its influence on software design the use of of programming languages). It introduces the concept of information-hiding through for design a worked example, before proceeding to discuss the consequences of such a strategy practices. This can be considered one of the classic papers in the area of software design. It is primarily This can be considered one of the classic strategy for detailed program design, and is based concerned with the use of the top-down around a worked example. used in decomposing systems into modules. Parnas D.L. (1972). On the criteria to be Wirth N. (1971). Program development by stepwise refinement. Wirth N. (1971). Program development n From this, it can be seen that the major division in terms of design strategy lies between the that the major division in terms of design From this, it can be seen n n This chapter has provided the basic material needed for the study of a number of design the basic material needed for This chapter has provided of the principal technical strat- In particular, it has outlined the forms methods in greater detail. examined some additional ways used in software design methods, and has egies that are currently its processes can be modelled. of a design method can be classified and in which the attributes differ quite considerably, according to their domain of application. In that sense, there- that sense, In of application. domain to their according quite considerably, differ of independent as being essentially category can regard the ‘organizational’ fore, we or compositional and organizational, be both top-down so that a method can strategy, and organizational. SDC09 9/18/07 10:59 AM Page 211 AM Page 10:59 9/18/07 SDC09 design decisions; and the design decisions; and constructional design decisions. (Behaviour doesn’t fit quite so design decisions. (Behaviour .) Would a compositional approach be better? If so, .) Would a compositional design decisions; the choice of the subprograms and design decisions; the flower-beds data-modelling functional and vegetable plot , lawn computers. (b) a Local Government Authority; (c) business packages for personal a small (three-person) software developer producing be likely to change between these? Why would the order of the common factors a compositional one? What criteria do they use in selecting objects to pack into boxes, and a compositional one? What criteria do they particular order? in organizing the packing of the van in a organizations: likely to be used in each of the following (a) a large petrochemical company; any larger packaging units (such as classes) as any larger packaging as choice of data structures process and then try write a program, keep a note of the development well.) When you next related actions to make this the D-matrix form. (You may need to group to describe this using manageable.) into you expect this to proceed? why, and how would performed by subprograms we might consider decisions about the tasks detailed design). Here as (procedures, methods) (For the purpose of this exercise, assume that the space for the garden is a rectangle 20 space for the garden assume that the of this exercise, (For the purpose strategy, and task using a top-down you set about this 25 metres.) How would metres by might be the first-level decomposition (As a suggestion, be the criteria to use? what would Exercises 9.4 the software design practices that are List in order the factors that you think might influence 9.3 their work on a top-down basis or When anyone moves house, do the removal men organize 9.2 (since this is to describe the development of a program The D-matrix notation can be used 9.1 house. garden for a new and layout of the the organization Consider the task of designing</p><p>Design processes and design strategies 212 SDC09 9/18/07 10:59 AM Page 212 AM Page 10:59 9/18/07 SDC09 SDC10 9/18/07 11:04 AM Page 213</p><p> chapter 10 213 Design Patterns</p><p>10.1 Design by template and 10.3 Designing with patterns design reuse 10.4 Patterns in the wider design 10.2 The design pattern context</p><p>Codifying design experience for reuse by others is not solely embodied in procedural forms such as design methods, and the concept of a design pattern offers an important alternative (and complementary) approach to recording design experience. In this chapter we begin by examining the wider issues of reuse in software design and establish some criteria for a ‘template-based’ approach to be practicable. We then examine the nature and form of design patterns as used for Object-Oriented design, identify some of the implications of their use in terms of design practice, and finally consider how easily the concept can be expanded to use with other architectural styles, and what factors might aid or limit this. (sometimes heuristic , 1995), such templates, when used for , 1995), such templates, when used construct is generally advocated. Similarly, et al. while , is fairly well-established (even if still not particularly well concept (Gamma , major problem in terms of adapting this concept for use with , major problem in terms of adapting the idioms design pattern At the level of detailed program design, the idea of ‘solution patterns’, often At the level of detailed program design, the idea of ‘solution patterns’, An alternative way to reuse experience of what has worked for others when faced to reuse experience of what has worked An alternative way be very well-identified, well-defined, and tightly constrained; and be very well-identified, well-defined, that each need a design solution; contain a significant number of problems of unknown length, some form of some form when manipulating data structures of known size, allowing for counting, of supplementary text. referred to as that codified). At a very basic level of ‘coding-as-design’, the problem characteristics are familiar determine which form of looping construct a programmer should employ data streams enough ‘templates’ to most programmers. (For example, when reading ditions are met in the case of the example of the arched bridge: crossing streams is ditions are met in the case of the example streams needing to be crossed; and it is possible a well-defined need; there are lots of Indeed, one might argue that this last factor to describe the template by a drawing.) has been a, if not with software that we reviewed in Chapter 7 are software. The descriptive forms used of specific solutions than for portraying their organized more for describing the details diagram still depends quite heavily upon the use general forms, not least because any n n accepted form of constructional description that and further that there should be some template. (We can easily see that these con- could be used for describing the design etc. Regardless of detailed form, all of these could still be readily recognized as fitting etc. Regardless of detailed form, all bridge.) However, prior to the development into the ‘pattern’ of the form of an arched of the in nature. They were also relatively few in software design, were largely informal for developing and using a template are that the number, since the basic requirements problem domain should: with similar problems is through the concept of some form of ‘design template’. Such is through the concept of some with similar problems that others have acquired an abstraction of the knowledge a template then provides of recurring problem. (A rather solutions for a particular type about how to structure the development of the arched of this from another domain is more visual example established, this model could be adapted and bridge. Once the basic idea had been bridges, large, small, single or multiple arches, extended to create a whole variety of might be adopted by a designer when faced with a problem having specific character- a problem having when faced with adopted by a designer might be termed a of a method that we have istics. While the component to address the question of how a ‘cliché’) does provide some scope also referred to as heuristics for most methods well-defined classes of problem, the to approach certain they do exist, they are still nor even recorded and, even when are neither well codified apt to be rather general. 10.1 reuse design and template by Design designer could reuse in which a software principal ways 6 we examined the In Chapter been a widely-adopted methods have While design of other designers. the experiences nature makes them general-purpose for this, their dominant mechanism and rather that form of solution the particular guidance about for giving detailed unsuitable</p><p>Design patterns 214 SDC10 9/18/07 11:04 AM Page 214 AM Page 11:04 9/18/07 SDC10 Design by template and design reuse 215 the form because widget, which displays a list of candidate ListBox toolset enable the development of systems that have a visual development of systems that have a toolset enable the Tk loop is regarded as being the most suitable to employ.) Equally, at a rather at Equally, to employ.) suitable the most as being is regarded loop In addition, for the idea of the design template/pattern to be effective as a means In addition, for the idea of the design All of these examples do tend to place the relevant ‘template’ in a fairly recogniz- All of these examples do tend to place In a somewhat different way, window-based user interfaces provide another way, window-based user In a somewhat different At more abstract levels of design, the one good example of wide reuse of design example of wide the one good abstract levels of design, At more for repeatedly across applications, but in different guises. Contention for a resource, for repeatedly across applications, but in systems, and in printer managers.’ example, appears in hotel reservation ‘People who work with design patterns observe that certain patterns manifest ‘People who work with design patterns standardized (at least at the conceptual level) to meet the criteria that we identified at standardized (at least at the conceptual level) to meet the criteria that we use of design the beginning of this section. In the following sections we will look at the of sharing experience (rather than facilitating reuse by a single designer), it needs to be of sharing experience (rather than facilitating reuse by a single designer), to record and supported by some form of ‘pattern book’ mechanism that can be used does pre- describe the template. Here, the invisibility and ill-defined form of software or tem- sent something of a problem. So it is perhaps not surprising that the pattern until the plate concept was not successfully realized in the context of software design sufficiently emergence of an architectural style that was both widely adopted and also In that sense, the evolution from template to pattern removes the domain-specific con- In that sense, the evolution from template of architectural style is probably the best way straint, and so the (broad) terminology to describe patterns. broader concept of a ‘pattern’ is one that does cut across domains and, in the case of broader concept of a ‘pattern’ is one so provides it with an important element of software especially, the fact that it does in the quotation below, taken from Mellor and ‘added value’. This point is illustrated Johnson (1997). ticular forms of widget. The user may, for example, expect to have the option of select- ticular forms of widget. The user may, ing an input file through the use of a of using such a widget for the task of file files, and here the ‘template’ is the convention is a recurring need, it is well defined, and the wid- selection. (Once again, file selection that enable the solution to be described.) get set provides a standard set of constructs user interfaces). However, the somewhat able context (building bridges, developing example of template use, at least in terms of user interface design. Widget sets such as use, at least in terms of user interface example of template that provided in the with the user’s expectations. In with other systems, and hence style that is consistent widgets themselves, but rather template does not consist of the this case, the design adopts for assigning functionality to par- comprises the conventions that the designer compiler from scratch by using a general-purpose design method, since the basic rules by using a general-purpose design compiler from scratch understood. (The adoption of of compilers are particularly well for the organization by the availability of tools to ‘pattern’ is further encouraged such a compiler-writing in turn exist as lexical analysis and parsing, which perform such tasks into developing such reusable enough to merit putting effort of compilers is standard components.) of to be that needs structure the basic level, abstract more and slightly advanced more must then be adapted pattern which is a recognizable for interrupt-handling employed processor architec- of a particular the specific features mapped on to both if it is to be characteristics. the particular device ture and new to develop a would now begin No-one is that of compiler-writing. experience SDC10 9/18/07 11:04 AM Page 215 AM Page 11:04 9/18/07 SDC10 will need to identify both the characteristics of the will need to identify both the characteristics was briefly introduced in Section 6.4, and we begin was briefly introduced design pattern , 1977): pattern description et al. The non-physical and invisible qualities of software present some obstacles when The non-physical and invisible qualities the pattern describes a recurring problem; to that problem; it also describes the core of a solution many times without actually using it in the solution is one that can be reused exactly the same way twice over. in the preceding section, so it is perhaps not surprising that the ‘patterns movement’ in the preceding section, so it is perhaps not surprising that the ‘patterns style (object only developed with the evolution of a widely-adopted architectural we seek to employ the pattern concept. If we employ it at the more detailed level of we seek to employ the pattern concept. If we employ it at the more detailed (for example, program design, then recurring problems can be recognized fairly readily provides a handling interrupts or reading files of data), partly because their context framework that helps with recognition. (Again, for the example of interrupt-handling, we seek to this context could be the structures of a particular operating system.) When we observed employ it on a larger scale then such frameworks are less readily found, as crossing a particular river at a given point. Determining the number of arches to use crossing a particular river at a given creative decision, albeit one that is made within and their individual spans remains a should also note that in this case particularly, the context of a particular pattern. We the pattern is not just through the idea of the the design ‘experience’ provided by in the various exemplars of its use that can be arched bridge, but is also contained that occurred with constructing these. found and the knowledge of any difficulties problem and the general solution to it. Adaptation of the general solution to meet the problem and the general solution to task for the designer, much as the programmer specific local need remains a creative is best employed for a problem must still decide who knows which looping construct context of their particular program and its how best to organize it to fit the specific example of the arched bridge, the designer of data structures. For our more physical about how they will employ the form for such a bridge must make local decisions n n n So any form of 10.2.1 The pattern concept that make up a pattern, as by recapping the basic elements It is useful to begin by <a href="/tags/Christopher_Alexander/" rel="tag">Christopher Alexander</a> ideas about patterns developed described in the original (Alexander The concept of the The concept of the of the pattern. We then ourselves of the basic characteristics this section by reminding can be codified and catalogued the ways in which design patterns go on to examine to look at some examples of architectural style, and then within an object-oriented their use. patterns for object-oriented design, consider the consequences of their successes, and successes, of their the consequences consider design, for object-oriented patterns other for use with adopted to be approach is for this there what scope consider finally architectural style. forms of 10.2 pattern The design</p><p>Design patterns 216 SDC10 9/18/07 11:04 AM Page 216 AM Page 11:04 9/18/07 SDC10 The design pattern 217 of encapsulation . We should note methods in the patterns literature): Erich Gamma, Richard , that provides an abstraction of a part-solution that: , that provides an abstraction of a part-solution -oriented design patterns -oriented design GoF (there may be more than one object of a given type); (there may be more than one object that are provided by the object as its interface to the outside that are provided by the object as its in that it responds to external events; which is encapsulated within the object; identity methods of the part-solution, that it incorporates the notion of of the part-solution, that it incorporates state abstract data type to describe this form of design knowledge, and considers programming of design knowledge, and considers to describe this form behaviour schema , 1995). A key text for any student of design patterns is the 1995 book by the ‘Gang of A key text for any student of design patterns is the 1995 book by the For the purposes of this chapter, the key features of an object are that it provides For the purposes of this chapter, the In brief, an ‘object’ can be viewed as being an evolutionary development of the In brief, an ‘object’ can be viewed as As we noted in Chapter 6, the pattern concept is also one that fits well with some is also one that fits pattern concept in Chapter 6, the As we noted exhibits possesses an possesses a abstraction of pattern thinking ended there – for example, while their book provides a catalogue of pattern thinking ended there – for example, while their book provides have been of some 23 design patterns, at the time of writing over 200 patterns implementation objects that model their behaviour. For most purposes, however, the implementation objects that model their behaviour. For most purposes, objects design patterns community has concentrated on describing implementational objects. that provide reusable elements of solutions rather than on describing problem Four’ (often abbreviated to development Helm, Ralph Johnson and John Vlissides. This is not to imply that the state information, and that it provides externally accessible state information, and that it provides is essentially a constructional solution-centred here too that, while the object concept problems can themselves be modelled one, some have argued that many ‘real-world’ one approach to object-oriented design is to in terms of ‘real-world’ objects. Hence develop a solution by providing corresponding identify these real-world objects and an n n its state can only be achieved through the use of where the inspection/modification of those external of this idea. world. Figure 10.1 shows a simple illustration in earlier chapters, and in this chapter we again adopt the view that only those char- in earlier chapters, and in this chapter use of design patterns will be considered here. acteristics of specific relevance to the concept of the n 10.2.2 object Describing has been one of the major the evolution of the ‘object concept’ In architectural terms, discussion of this will be pro- 1980s and 1990s. While our main developments of the needed to consider some of its characteristics vided in Chapter 16, we have inevitably in order to indicate the plan that they would later employ. Such plans could be thought the plan that they would later employ. in order to indicate Détienne (2002) uses the patterns owned by particular designers. of as rather informal term orientation), within which such higher-level patterns could be recognised (Gamma (Gamma be recognised could patterns higher-level such within which orientation), et al. and Soloway (1985), In Adelson of designer behaviour. characteristics of the observed the their subjects was in the actions of they recognized forms of behaviour one of the that they were a designer recognized occurred when for plans’. This use of ‘labels it and so ‘labelled’ knew how to address that they already a subproblem encountering expertise to be partly based upon the possession of a set of constructional schemas, based upon the possession of a expertise to be partly schemas that map the pro- reinforced by a set of domain-specific which may be further on to certain types of problem. gramming schemas SDC10 9/18/07 11:04 AM Page 217 AM Page 11:04 9/18/07 SDC10 . GoF (1996). Their view is et al. focus upon design patterns GoF (1996) use a framework that is much more con- et al. was along two ‘axes’, which were as follows. was along two ‘axes’, which were as patterns describe the way that classes or objects interact, and how patterns describe the way that classes . The purpose describes what a pattern is used for, and is usually . The purpose describes what a pattern takes a wider view of pattern applicability, including for: patterns are concerned with object creation; patterns address the way in which classes or objects are composed; patterns address the way in which classes GoF . This describes whether the pattern is primarily one that addresses the . This describes whether the pattern et al. A simple illustration of the ‘object concept’. purpose scope behavioural responsibility is allocated between them. creational structural In contrast, Buschmann Within a catalogue, design patterns can be classified in various ways. The one Within a catalogue, design patterns use of classes or the use of objects (where we can regard classes as being the ‘tem- use of classes or the use of objects (where we can regard classes as being and plates’ from which objects are instantiated). Most patterns deal with objects, we will not attempt to discuss the use of class patterns in this book. described as being one of the following three types: described as being one of the following n n n cerned with design hierarchy. Whereas the Buschmann This catalogue structure is shown schematically in Figure 10.2. 2. Their pretation of the role of patterns is presented in Buschmann pretation of the role of patterns is presented from architectural styles to programming one which spans a rather wider context and complementary view to that of the idioms, and so provides an interesting adopted by the 1. Their catalogued. However, their book does lay down many of the foundational elements of catalogued. However, their book does slightly more academically-oriented inter- this approach to design. A rather different, Figure 10.1</p><p>Design patterns 218 SDC10 9/18/07 11:04 AM Page 218 AM Page 11:04 9/18/07 SDC10 The design pattern 219 . pattern description template . GoF (1996) suggests that the following core set of head- et al. where patterns ‘support a suitable decomposition of sub- where patterns ‘support a suitable decomposition which is concerned with component collaboration (a bit like which is concerned with component (architectural patterns relating to the form of the overall system); relating to the form of the overall (architectural patterns which is concerned with (obviously) communication between which is concerned with (obviously) describes patterns that ‘guard and control access to services or com- describes patterns that ‘guard and control (idioms that describe the broad structure of code). (idioms that describe the broad structure where patterns address the organization of collections of objects where patterns address the organization Pattern classification scheme used by the ‘Gang of Four’. Pattern classification ’s concept of ‘behaviour’). (design patterns that relate to the detailed form of subsystems); (design patterns that relate to the detailed GoF (1995) and Buschmann If we now turn to the issue of how the patterns themselves are codified, normal If we now turn to the issue of how the patterns themselves are codified, Management (roughly structural again). Communication system components. tural’ being used in a similar sense as by the tural’ being used in a similar sense as Organization of work the Access control as a form of structural grouping. ponents’, which we can again recognize programming Structural decomposition cooperating parts’, with the term ‘struc- systems and complex components into architectural style design ings provides a fairly good description of a pattern (both of these texts use slightly ings provides a fairly good description of a pattern (both of these texts fuller sets of headings). from the above is that there is no particular consensus about how to categorize design from the above is that there is no particular consensus about how to categorize patterns! practice is for design patterns to be described using a in Gamma Again, there is no real standard for this, and a comparison of the forms used et al. n n 10.3. For the moment, the main observation We will return to this issue in Section n n n adopt a scheme of grouping patterns under the For the case of design patterns, they following set of role-based headings. n Figure 10.2 n n SDC10 9/18/07 11:04 AM Page 219 AM Page 11:04 9/18/07 SDC10 is et al. construc- and the and Buschmann behavioural et al. or Bu to indicate which of these two GoF (223)) ) identifies any patterns that address similar problems ) identifies any patterns that address ) is a description of the situation in which a pattern might ) is a description of GoF ) provides a real-world illustration of a particular design ) provides a real-world ( See Also Context (or provides a set of guidelines for implementing the pattern, and guidelines for implementing the pattern, provides a set of identifies other names (if any) that might be used for the pattern that might be other names (if any) identifies identifies any design trade-offs that might be involved in using the identifies any design trade-offs that (or Motivation is a set of examples to be found in existing systems, ideally taken from is a set of examples to be found in existing (207), Bu(263)) provides a detailed description of the solution using graphical notations description of the solution using graphical provides a detailed (or is the design problem that the pattern is intended to address. pattern is intended problem that the is the design is the way that the pattern addresses the problem, and any design principles and any design the problem, that the pattern addresses is the way GoF ( used to identify and (ideally) describe the essence of the pattern. essence the describe and (ideally) to identify used viewpoints). Proxy Chain of Responsibility pattern as well as any constraints that its use might impose in terms of system struc- pattern as well as any constraints that ture or behaviour. Known uses more than one domain. Related Patterns way. or which complement this one in some Consequences Structure to describe it in terms of both the (usually employed tional Implementation might arise. notes about any possible pitfalls that behind this. Example how the pattern addresses this. problem and shows Applicability situations. includes any hints for recognizing such be employed, and Name as Also known touch). (a rather pragmatic elsewhere Problem Solution involved in the subtleties of design pattern use. (Note that the convention in books such as Gamma we have to identify the page where the description of a given pattern begins. Here extended this slightly by using the prefix so provide a texts is involved.) These two are relatively uncomplicated patterns, and ourselves too good basis for illustration of the basic concept, without a need to get 10.2.3 patterns of design Examples patterns: In this subsection we examine two example n n For our purposes, this common subset should be quite adequate especially as, when For our purposes, this common subset specific patterns, we will be mainly concerned looking at the following examples of more abstract design issues. with those headings that relate to the n n n n n n n n n n n</p><p>Design patterns 220 SDC10 9/18/07 11:04 AM Page 220 AM Page 11:04 9/18/07 SDC10 The design pattern 221 remote and, like a cache ). ), or where different of the object, and to let the user of the object, and . The core set of headings from set of headings . The core virtual proxy , whereas under the scheme used in under the scheme , whereas protection proxy offers a rather different example which et al. representative Access Control Object Structural offer the example of a complex image in a word process- offer the example of a complex image ), involve significant overheads in object creation, as with the ), involve significant overheads in object GoF Proxy is concerned with access to relatively complex objects which Proxy is concerned with access to relatively a remote database ( may be in a different space, such as proxy example of the graphical image ( access rights may be involved ( Figure 10.3 illustrates the idea of proxy using a class diagram. Normally, the client requests will be serviced by the proxy, which relays these to the original where necessary. Figure 10.4 demon- strates this role in terms of a sequence diagram that describes one possible way of working. image on the screen, it may be possible to employ a much simpler image on the screen, it may be possible (such as position and proxy object that ensures that key properties in the screen image. So this boundaries) are correctly represented an outline box to represent example of a proxy may just display text flow, positioning, etc. the image so that the user may adjust or if it is necessary to However, if further information is needed, be invoked in the original via manipulate the image itself, these can the proxy. Buschmann to remote databases to is based upon optimizing repeated accesses complex. Here, the proxy obtain images which may be large and of a plays a role which is closer to the concept where the predomin- cache, it is clearly most effective in situations than for updating. ant access forms are for reading rather (loading time, space, communication, etc.). As such, the use of communication, etc.). As such, (loading time, space, distributed relevant when developing proxy may be particularly systems. a This is to provide thing. The with the proxy rather than the real object communicate and ensures same interface as the actual object proxy provides the additional object, while possibly performing correct access to this necessary, it access protection rules. Where tasks such as enforcing of instances of the ‘real’ may organize the creation and deletion object. The the overhead of loading the ing document. Rather than incurring object to produce an (potentially) large and complex drawing Proxy Surrogate of access to problem where direct provision Proxy addresses the some form represent a significant overhead in an actual object will it is classified as it is classified et al. classify this pattern as classify this GoF Structure Applicability Solution Also known as Problem Section 10.2.2 can then be used to describe this as follows. used to describe this can then be Section 10.2.2 Name Example Buschmann Buschmann Proxy The SDC10 9/18/07 11:04 AM Page 221 AM Page 11:04 9/18/07 SDC10 (175)) patterns are GoF ( provide examples here, with et al. Decorator (139)) and and Buschmann GoF ( GoF Adapter Since this aspect is not directly relevant to the theme of this book, Since this aspect is not directly relevant we omit such a detailed level of discussion. Both the the latter being the more extensive and varied and, in particular, relating more strongly to web-based forms of implementation where this pattern is quite widely employed. The both concerned with interfacing issues. There is some discussion of these in both reference texts. Perhaps the most obvious is the correspondence to the use of a cache in a situation where an object is extensively updated. In this context, The proxy design pattern (sequence diagram). The proxy design pattern (class diagram). The proxy design pattern Related Patterns Consequences Figure 10.4 Implementation Known Uses Figure 10.3</p><p>Design patterns 222 SDC10 9/18/07 11:04 AM Page 222 AM Page 11:04 9/18/07 SDC10 The design pattern 223 (it is not discussed in our (it is not discussed ), and some of these may be ), and some of these Applicability Object Behavioural as GoF (as described under (as described under the case that the set of possible receivers is only determined dynam- the case that the set of possible receivers ically at run-time. that describes the structure Figure 10.5 provides an object diagram of Chain of Responsibility. Figure 10.6 provides a sequence dia- gram describing this (rather inevitably, this is not particularly com- plex, even though in this case we have made the last handler in the chain respond to the request!). Again, we omit any details of this. However, we should note that implementation does require each object in the chain to share a common interface for handling requests and also for obtaining access to the next element in the chain. analogy to the idea of ‘broadcast’ used with networks here.) analogy to the idea of ‘broadcast’ used of objects until one of them The request is passed along a chain accepts and handles it. a chain. An event corres- Windowing systems often contain such button may be passed to the ponding to the pressing of a mouse object, and on to an element window manager, on to the window one of them accepts and in the window (such as a button) until handles the event. one to employ wherever In essence, this pattern is an appropriate need not, know which object the issuer of a request does not, or object-oriented systems often is to handle it. (Implementations of of a message are bound require that the sender and receiver for this need.) It may also be together early, which is inappropriate Chain of Responsibility (none) one of needing to avoid the Here the problem to be addressed is receiver, so allowing coupling of a request (event) to a particular respond to it. (There is some more than one object the chance to the proxy may offer few benefits and even impose a slight over- a slight impose and even benefits offer few may the proxy which access, to object indirection a level of adds Proxy also head. implementational but may add some benefit (largely), is a design overheads. proxy pattern provides a good example of where the ideas from ‘conventional’ of where the a good example pattern provides proxy Implementation Structure Example Applicability Also known as Problem Solution This pattern is classified by the This pattern is classified style of example to that of hence offers a somewhat different other reference), and proxy. Name software merge with those of the ‘web’ in its various forms. Although there can be there can various forms. Although of the ‘web’ in its merge with those software different roles for design principle is common to form than the other, the basic more relevant to one both. Chain of Responsibility The SDC10 9/18/07 11:04 AM Page 223 AM Page 11:04 9/18/07 SDC10 , since it is much proxy handler_3 object accepts a request. no of course). As such, it illustrates the handler Request handler_2 (163)) pattern has been identified as being one (163)) pattern has been identified as being behavioural GoF ( offers an interesting contrast to provide a set of examples of this, mainly from graphical provide a set of examples of this, mainly handler_1 GoF Composite Chain of Responsibility does reduce the coupling in a system and Chain of Responsibility does reduce of the chain during sys- provides scope for dynamic modification one possible issue tem execution. In terms of design consequences, to consider is what is to happen if The contexts. The Chain of Responsibility. that can be used in conjunction with Client The chain of responsibility pattern (class diagram). The chain of responsibility The chain of responsibility pattern (sequence diagram). The chain of responsibility pattern (sequence Chain of Responsibility we can use patterns when designing software. Before that though, we briefly digress to we can use patterns when designing software. Before that though, we briefly examine the complementary concept of the design anti-pattern. more concerned with patterns of behaviour than with the way that objects are more concerned with patterns of behaviour than with the way that configured (hence its classification as topic of how way that patterns may take quite different forms, and so leads on into the Known Uses Related Patterns Consequences Figure 10.5 Figure 10.6</p><p>Design patterns 224 SDC10 9/18/07 11:04 AM Page 224 AM Page 11:04 9/18/07 SDC10 Designing with patterns 225 . experiences. good (1995) and Buschmann (a concept which underpins et al. design anti-pattern reuse of design patterns. In the early chapters catalogues , 1998). et al. why wrong solutions are adopted, rather than on the forms of the wrong solu- are adopted, rather than on the forms why wrong solutions (1996) very much function as This emphasis is quite understandable, since technical solutions are rarely com- understandable, since technical This emphasis is quite here is that For our purposes, the main message As described in Long (2001), design anti-patterns are ‘obvious, but wrong, solu- (2001), design anti-patterns are As described in Long pletely wrong in themselves, although a given solution may be the wrong one to adopt although a given solution pletely wrong in themselves, patterns emphasizes solution So, while the literature on design in a particular context. and motivation, the anti- recognizing the influence of context structures, although motivation. patterns literature chiefly emphasizes the catalogue provides a source of ideas, it provides information that helps with plan- the catalogue provides a source of ideas, it provides information that helps of working ning and with anticipating any possible consequences, but the design task which looked at the wider context of software design, we observed that catalogues are which looked at the wider context of software design, we observed that catalogues most of more common in other domains and uncommon for software design, where catalogue the literature addresses design processes. Unfortunately, much as a garden little real aid full of glorious colour photographs of healthy, thriving plants provides shade and to the task of planning a new garden, beyond telling us which plants like Possession of how tall the various varieties (may) grow, so it is with design patterns. available, and consider one of the consequences of pattern use, which is how these are available, and consider one of the consequences most effectively indexed. 10.3.1 How to use patterns such as Gamma Books that describe design patterns, et al. 10.3 patterns with Designing pattern is, and examined examples of how Having established just what a design next obvious question is ‘how do we use design they are structured and organized, the In this section we examine such guidance as is patterns to solve design problems?’. the whole rationale for patterns) is not automatically a ‘good thing’. While reuse of the whole rationale for patterns) is workable solutions, represents desirable prac- experience, especially where it concerns larger context which may itself act to increase tice, it does always occur within a to some of these issues when we later come to or reduce the benefits. We will return examine component-based design practices. tions themselves (Brown tions themselves (Brown of the design pattern, this has led to the concept of the this has led to the concept of the of the design pattern, tongue-in-cheek, paper John problems’. In a very readable, if rather tions to recurring focusing on the processes of examples of this concept, largely Long provides a number to put more emphasis upon the anti-patterns literature does tend involved. Indeed, the reasons 10.2.4anti-pattern design The of the design pattern) by the concept (as exemplified about software reuse Thinking can find ways to reuse upon how we tends to focus understandably experiences we should also promulgate important that it is sometimes But of course, the that others avoid if only to ensure design solutions too, attempts at of unsuccessful than the concept less well codified although much So, not surprisingly, same pitfalls. SDC10 9/18/07 11:04 AM Page 225 AM Page 11:04 9/18/07 SDC10 .) Their basic advice is very GoF GoF so that a client object need so that a client object , which is not to deny the use- , and that by studying patterns, , and that by studying learned (1996) advocate a rather different strategy, (1996) advocate a rather different et al. patterns). design or , even if over longer periods than we commonly employ when thinking employ when than we commonly over longer periods , even if architectural The authors in Buschmann How then do we use catalogues of design patterns? Well, the catalogues of design patterns? Well, How then do we use selected category. ( be able to recognize where a pattern would provide a suitable solution; be able to recognize where a pattern the pattern within the particular solution. have an understanding of how to employ be over-used. acquire a ‘vocabulary’ of design patterns; programming to an interface, not an implementation programming to an a particular request, as long actual object that is used to service not be aware of the adhere to the interface specification; as its form and behaviour inheritance favouring object composition over class but rather to observe that it should not fulness of inheritance as a reuse mechanism, 4. Compare the problem description with the available set of patterns taken from the 1. Specify the problem (and, if possible, any subproblems involved). 2. Select the category of pattern that is appropriate to the design activity involved 3. Select the problem category appropriate to the problem. although the basic conditions for pattern use are the same as those specified above. although the basic conditions for pattern given problem in the same way that the patterns They argue in favour of classifying a identifying the set of potentially useful pat- themselves are classified, as a step towards scheme of classification is that it appears terns. (One thing in favour of their suggested than that adopted by the more suited to supporting such a process process can then be summarized as follows. n n forms a useful and important step towards While indexing and cataloguing of patterns to support the other two is rather more problem- the first of these goals, finding ways of pattern use may be helpful. atical, although provision of case studies From this, we can recognize that the minimum conditions for the successful use of pat- From this, we can recognize that the terns will require that the designer should: n n n will determine the exact form that it takes.) will determine the that patterns need to be much along the lines works, and also a familiar- both insight into why the pattern the designer will acquire situations where it can be used enable he or she to recognize those ity with it that will principles of: advise the designer to follow the two to effect. They also out how to produce a particular plan of action is still a creative activity. (Actually, (Actually, activity. still a creative action is plan of particular a to produce out how exhibit and do evolve gardens one, since not a bad is gardening with the analogy behaviour take some plants of the garden, and shade new sections Trees grow about software. etc. Like the software adjacent sections, but then take over established, time to become future state, while to envisage some requires them the gardener’s planning designer, that of the materials and the quality both the conditions control of having inadequate</p><p>Design patterns 226 SDC10 9/18/07 11:04 AM Page 226 AM Page 11:04 9/18/07 SDC10 Patterns in the wider design context 227 GoF all of learn patterns during the design using patterns in any consistent way; and would seem to provide better support for the design process would seem to provide better support et al. indexing new patterns has acted to expose two weaknesses in the ‘pattern concept’, Unfortunately, as already demonstrated, there is (at the time of writing) no widely Unfortunately, as already demonstrated, Finally, of course, the more ‘implementational’ guidelines advocated by the the more ‘implementational’ guidelines Finally, of course, Of course, we should not assume that there is always going to be a suitable pat- not assume that there is always Of course, we should Since their categorization structure includes architectural styles as well as design styles includes architectural categorization structure Since their the lack of any well-established practices for process. the difficulty of n est in seeking new design patterns. Indeed, it can be argued that the enthusiasm for est in seeking new design patterns. Indeed, it can be argued that the enthusiasm writing namely: n itself. 10.4 context design in the wider Patterns and the attractive nature of the concept The enthusiasm of the pattern community, areas of design), has led to considerable inter- (which appeals to experience in related agreed scheme for indexing patterns. There are also no empirical studies into the use agreed scheme for indexing patterns. establishing the most effective ways of index- of design patterns that might assist with than ease of cataloguing). In the absence of such ing patterns for ease of use (rather the two schemes examined in this chapter, the knowledge, we can only say that of one of Buschmann 10.3.2 patterns and classifying Indexing it a self-limiting aspect that is clearly difficult to The concept of patterns carries within as more patterns are identified and added to the overcome. This is the problem that, ability of the individual designer to corpus of pattern knowledge, so the to address this is to index patterns in some way, these becomes strained. The only way one outlined above can be adopted. so that a design process similar to the framework’ is likely to produce exactly the opposite of what is intended. So step 5 in to produce exactly the opposite of framework’ is likely may well need to recognize is an important one, where the designer the above process pattern for a given problem. that there is no ‘ready-made’ when using this strategy. are still applicable patterns and idioms, the above process is potentially one that could be employed from the above process is potentially one patterns and idioms, in Figure 10.7. We might detailed program design. This is illustrated top-level down to is perhaps unexpected, given use of a top-down strategy, which also note that it implies a compositional concept. that patterns are essentially all problems into a ‘pattern a process. Indeed, trying to force tern when using such 5. trade-offs). the design (assess liabilities benefits and Compare 6. problem. that most fits the the pattern variant Select of the previous an iterative recycling which is essentially a seventh step too, (There is patterns.) to any existing no match be found steps should SDC10 9/18/07 11:04 AM Page 227 AM Page 11:04 9/18/07 SDC10 5 3 4 2 6 1 variant Specify pattern Pattern problem liabilities category Problem category of pattern Choice of document Assessment with problem classification Problem and Select pattern Select problem Select category Compare pattern pattern categories Compare benefits/ Patterns Patterns repository knowledge Requirements A process model for designing with patterns. Figure 10.7</p><p>Design patterns 228 SDC10 9/18/07 11:04 AM Page 228 AM Page 11:04 9/18/07 SDC10 Patterns in the wider design context 229 as a means of transferring knowledge about which comes from using a pattern seems to more which comes from design pattern , 2001) is overall one that is supportive of the idea that the is supportive of the overall one that , 2001) is flexibility lead to good designs. The act of designing software requires a lead to good designs. The act of designing et al. always One last question that we need to consider is how widely the pattern concept can One last question that we need to consider In that sense too, design patterns are no more a ‘silver bullet’ than are design design patterns are no more a ‘silver In that sense too, So, patterns are clearly a useful addition to the designer’s vocabulary and skill-set. a useful addition to the designer’s So, patterns are clearly Although there are many books about patterns (including books that cover quite (including books about patterns there are many books Although ware engineering practices can be said to have been subjected to any effective empirical evaluation. Summary that the pattern concept is applicable across different architectural styles, but that it is that the pattern concept is applicable will develop where there is a community that is only likely that pattern repositories by writing patterns. sufficiently motivated to share ideas 1999)). However, there is no particular argument that suggests that this is in some way 1999)). However, there is no particular this is the one where the need has been greatest. the ‘only’ architectural style; simply repositories available on the web tends to reveal a Indeed, while looking at the pattern design, there is a growing set of design preponderance of patterns for object-oriented styles or, at least, with forms of implementation patterns that are used within other objects. From this, we can perhaps conclude that are not particularly centred around we can design entirely by using patterns as it would be to expect that the use of design we can design entirely by using patterns methods will and the pattern concept is clearly one of these. wide vocabulary of ideas and techniques, styles. Much of the basic development has be applied across different architectural style (which, equally, is one that has proved been centred upon the object-oriented procedural forms for design methods (Budgen, particularly intractable for the use of Indeed, it can be argued that even if patterns are not widely employed in practice (pos- that even if patterns are not widely Indeed, it can be argued paragraph), simply studying trade-offs referred to in the previous sibly because of the thinking about design, and will the development of clearer them will itself encourage benefits of experience. convey some of the practice. It would be as naive to expect that methods, or any other systematic design than offset the greater complexity that tends to result from using a pattern rather than complexity that tends to result from than offset the greater flexibility and the complexity Indeed, this trade-off between an optimized structure. be explored more fully. is one that clearly needs to that arises from generality modified. Given the frequency with which the need for modification arises in software frequency with which the need for modified. Given the added development, the use of patterns can often result in designs that are more easily maintained and maintained that are more easily result in designs can often use of patterns *is specific to design patterns and their use. Few widely-used soft- In fairness, this is by no means a problem that Our discussion of the use of the with two design experiences has examined both the concept and also its application, along applicability examples as (rather outline) illustration. We have also briefly considered the wider style. of the pattern idea, beyond its use simply within the object-oriented architectural Neither of these weaknesses invalidates the concept, but they do raise the question of the question do raise but they concept, the invalidates weaknesses of these Neither patterns. stock of an ever-increasing is to have useful it how empirical evalu- in the way of systematic been little to date areas), there has specialized study that has been The one such the pattern concept.* effectiveness of ation of the (Prechelt conducted SDC10 9/18/07 11:04 AM Page 229 AM Page 11:04 9/18/07 SDC10 IEEE Patterns patterns to using be used in a system where an input positional event may be used in a system where an input positional pattern might be used in a web-based client-server system that pro- pattern might be used in a web-based client-server proxy chain of responsibility at http://hillside.net/patterns being probably the best starting point. This site lists a being probably the best starting at http://hillside.net/patterns contains a number of papers on patterns, including a rather reflective one by James contains a number of papers on patterns, patterns, it is sometimes hard to avoid the feeling that a ‘write-only’ mentality prevails that a ‘write-only’ mentality to avoid the feeling is sometimes hard patterns, it patterns is perhaps understandably a more interesting task than developing better ways task than developing a more interesting perhaps understandably patterns is Identify the benefits and limitations that result from their use. Identify the benefits and limitations that How might the handlers for these be originate with a mouse, a keyboard or a touch-screen. prioritised? elements that might benefit most from its use. vides a web mail service, and identify the Would these be sufficient to make it worthwhile? new using Exercises Further reading 10.2 How might 10.3 Suggest how the Coplien (Coplien, 1997). 10.1 the use of patterns? In what other spheres of design activity can you readily recognise Home Page papers and tutorials. including pattern repositories, books, wide range of information, not be entirely surprising, since is very book-centred (maybe this should The patterns literature of patterns), and to date there are very few tutorial the books are often themselves catalogues of pattern use. The January 1997 issue of papers or papers that report experiences Software solve problems may benefit from further refinement and development. solve problems may but also rather mixed in terms of about patterns is quite extensive, The information available to patterns, with the There are various websites that are devoted quality and quantity. The patterns community is an enthusiastic, if often rather evangelical, one. That said, while writ- said, while one. That evangelical, often rather if an enthusiastic, is community The patterns ing of to explore and evaluate seems to be a need useful, there still much! To really become rather too concept is undoubt- So, while the pattern and classify patterns. ways to index the most effective for repertoire, the process software designer’s addition to the edly a valuable</p><p>Design patterns 230 SDC10 9/18/07 11:04 AM Page 230 AM Page 11:04 9/18/07 SDC10 SDC11 9/18/07 11:05 AM Page 231</p><p> part 3 Design Practices</p><p>Chapter 11 Stepwise Refinement 233</p><p>Chapter 12 Incremental Design 241</p><p>Chapter 13 Structured Systems Analysis and Structured Design 257</p><p>Chapter 14 Jackson Structured Programming (JSP) 289</p><p>Chapter 15 Jackson System Development (JSD) 315</p><p>Chapter 16 Designing with Objects 341</p><p>Chapter 17 Component-Based Design 401</p><p>Chapter 18 A Formal Approach to Design 419</p><p>Chapter 19 Whither Software Design? 441 SDC11 9/18/07 11:05 AM Page 232 SDC11 9/18/07 11:05 AM Page 233</p><p> chapter 11 233 Stepwise Refinement</p><p>11.1 The historical role of stepwise 11.3 Strengths and weaknesses of refinement the stepwise strategy 11.2 Architectural consequences</p><p>Historically, this can be regarded as the first form of ‘design method’ to be used for software design on any scale. Although much of its importance lies in its influence upon the form and strategy employed in many later methods, its universality has also meant that it has been used widely for software development, and so it does merit a short chapter in its own right. We review both its role and form, and consider some of the con- sequences that arise from its use. ,* the 8 chessboard and 8 × , in each of which and where the later m > n that describe how the func- eight-queens problem c i D refinement steps ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ d f n c n b n n D such a mapping could be created through such a mapping could ...... d 22 how ff d cc bb 12 12 1 12 DD DD D ∅∅ ∅ ∅∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ has probably formed the most important mechanism formed the most has probably → i ...) ...) ). E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ d f m b m c m m steps, of the form shown below (where steps, of the form shown below (where ...... ff dd bb cc elaboration 12 12 12 12 DD D DD D ∅∅ ∅ ∅∅ ∅ stepwise refinement ⎛ ⎜ ⎜ ⎜ ⎜ ⎝</p><p>In the conclusion of Wirth (1971), five lessons about this process were identified, In the conclusion of Wirth (1971), five In this approach, a top-down ‘process of successive refinement of specifications’ In this approach, a top-down ‘process So it is not surprising that some of the first ideas about how the characteristics of that some of the first ideas about So it is not surprising a task is divided into a number of subtasks, accompanied where appropriate by a a task is divided into a number of subtasks, involved. In other words, and using the further refinement of any data structures process of stepwise refinement consists of a notation introduced in Chapter 9, the set of of the elements stages will also contain some details to constructional ones). tional elements are to be mapped on queens which are hostile to each other. Find a position for each queen (a configuration) such that no queen may queens which are hostile to each other. Find a position for each queen (a configuration) such that queen). be taken by any other queen (i.e. such that every row, column, and diagonal contains at most one * be stated as follows: Given are an 8 This problem is attributed to C.F. Gauss, and can sions about data representation as long as possible’. (That said, his discussion about sions about data representation as long segment of the paper.) the data structures occupies quite a large and these can be paraphrased as follows. 1. Program construction consists of a sequence of latter phrase is significant, since Wirth sought to consider how both function and data latter phrase is significant, since Wirth process, although subsequent thinking would could be structured within the same upon the question of function. This may appear to have placed much more emphasis to the classical be partly because in his example solution was performed at a relatively late stage refinement of ideas about data representations that, because it could be difficult to foresee the in the process. Indeed, Wirth argued be needed, it was ‘advisable to delay deci- operations on the data that might eventually of subprograms. In a pioneering paper, as already mentioned in Chapter 9, Niklaus a pioneering paper, as already mentioned of subprograms. In the question of Wirth (1971) addressed into smaller problems (usually decomposition of the problem a process of gradual termed sub-tasks and of data into data structures’. The led to ‘the decomposition of tasks into cedure, function or method cedure, function languages. Indeed, it has organization in many programming for providing structural this by providing special for <a href="/tags/Computer_hardware/" rel="tag">computer hardware</a> to support long been the norm transfer and restoration of control. instructions for the its structure, were largely abstracted, in order to aid thinking about software could be functionality on to a set ways of mapping the overall program concerned with finding 11.1 refinement of stepwise role historical The the been faced with of software has the designer early days of computing, Since the and powerful that is enormously using a medium complex problems need to address is its detailed form the way in which in terms of yet is also ill-defined flexible, and pro- a subroutine, (whether termed the subprogram As already observed, organized.</p><p>Setpwise refinement 234 SDC11 9/18/07 11:05 AM Page 234 AM Page 11:05 9/18/07 SDC11 Architectural consequences 235 functional Structure Chart that are based upon specific cri- that are based upon were addressed more effectively) introduced in Myers (1973), and scale , 1974), did provide criteria that could be , 1974), did provide criteria that could coupling et al. design decisions resulting from this process will determine the ease with the ease determine will this process from resulting that relates to the problem in hand. In Wirth’s paper problem in hand. In Wirth’s paper that relates to the that were subsequently presented in Parnas (1972) provide in Parnas (1972) subsequently presented that were notation modularity information hiding information ), and examined some of the ways in which coupling between modules could ), and examined some of the ways in The role of stepwise refinement as a foundational element of the highly influential The role of stepwise refinement as a Myers argued that the ‘primary goal in designing a modular program should be to Myers argued that the ‘primary goal The ideas about such criteria put forward by David Parnas in the following year The ideas about such criteria put forward teria. This lesson reflects the recognition that designing is not an analytical process, the recognition that designing teria. This lesson reflects of a range of factors need to assess (and re-assess) the influences and that there is a at each design step. even such a relatively small problem without observes the difficulty of describing purpose. needing to create a ‘long story’ for the this was an Algol-like extension, since his example was relatively close to the extension, since his example this was an Algol-like as the The later development of such ideas programming level. notations, reflect this indeed of many other diagrammatical (Section 7.3.1), and particular lesson. which a program can be adapted to meet changes in the requirement or context. in the requirement changes to meet adapted can be a program which are very much the changes illustrated in the paper, this idea is demonstrated Although indeed, the ideas problem and, involved in the original of the functionality extensions about structure. the choice of modular for determining coherent strategy a much more The strategy and processes of any design method implicitly assume one or more forms The strategy and processes of any design method implicitly assume one or cannot adapt of ‘target’ architectural style – which is not to say that human ingenuity Since then though, it has still continued to be used in various roles, and often as a prim- Since then though, it has still continued to be used in various roles, and often Some of ary technique used to decompose a top-level task into more manageable units. the consequences of this role are examined in Section 11.3. 11.2 consequences Architectural one another’. He advocated the use of ‘strong modules’, which performed a single, one another’. He advocated the use what later became known as well-defined function (essentially describing cohesion in Chapter 4, we will not repeat them here. arise. Since these issues were reviewed issues of ‘structured design’ school (in which its own right largely faded out in the mid-1970s. means that interest in developing it in concealed! However, the idea of module concealed! However, the idea of module in the more developed design thinking involved in later used as one of the foundations the ‘structured design’ school (Stevens used with the process of stepwise refinement. that the modules are highly independent from decompose the program in such a way While this paper is undoubtedly a seminal one, it can be argued that, although centred While this paper is undoubtedly a seminal no criteria that a designer could employ upon the concept of modularity, it provided at any stage (Shapiro, 1997). for comparing possible choices of modules the ideas of stepwise refinement, since the key (1972) were somewhat in conflict with how a module performed a task should be kept axiom was that information about 5. and in terms of books such as this one, The last lesson is an interesting one 3. The need for a 4. Each refinement embodies a set of 2. of degree The SDC11 9/18/07 11:05 AM Page 235 AM Page 11:05 9/18/07 SDC11 archi- considerfirst- considernextcolumn considernextcolumn removequeen call-and-return . Then in the following architectural style. We can see this if . considernextcolumn reconsiderpriorcolumn main main , and , although no new operations are invoked by this; , although no new operations are invoked , which now makes use of two further operations, , which now makes use of two further pipe-and-filter removequeen regress , regress trycolumn and expand trycolumn setqueen regress trycolumn setqueen regress setqueen , Two steps in the eight-queens solution. trycolumn , Indeed, where the higher level units in a call-and-return style of solution have roles Indeed, where the higher level units in a call-and-return style of solution have While a hierarchical process such as stepwise refinement is readily associated with While a hierarchical process such as The first step has established an algorithm that uses five operations: The first step has established an algorithm expanded the detail for reconsiderpriorcolumn expanded the detail for and considerfirstcolumn considerfirstcolumn that involve little more than co-ordinating and sequencing the lower units, it may well that involve little more than co-ordinating and sequencing the lower units, be worth considering the use of a a hierarchical constructional form such as the subprogram, the link is by no means an a hierarchical constructional form such as the subprogram, the link is by of hierarchy essential one. Indeed, if we consider the rather different interpretation then here, used by Michael Jackson in his Structure Diagram notation (Section 7.2.5), nodes being the only nodes of interest are those at the ends of the branches, with inner simply abstractions of these. n to expand these particular operations at this (The detailed reasoning behind choosing stage is explained in the paper.) of Structure Chart) the effects of one of his design transformations. of Structure Chart) the effects of one column step he has done two things: n this as and when necessary! In the case of stepwise refinement, a this as and when necessary! In the case the emphasis placed upon function as the tectural style is implicitly assumed through Figure 11.1 illustrates this using Wirth’s primary basis for making design decisions. and shows (as an informal ‘call graph’ style own solution to the eight-queens problem, Figure 11.1</p><p>Setpwise refinement 236 SDC11 9/18/07 11:05 AM Page 236 AM Page 11:05 9/18/07 SDC11 Strengths and weaknesses of the stepwise strategy 237 intermediate code intermediate executable code executable intermediate code intermediate parse tree compiler parse tree syntax analysis analysis semantic stream of lexemes stream of lexemes A simple compiler organised as call-and-return. A simple compiler organised A simple compiler organised as pipe-and-filter. A simple compiler organised source text However, since the elements of a pipe-and-filter solution may well themselves be However, since the elements of a pipe-and-filter The choice between such forms of solution may depend upon many factors. One The choice between such forms of solution lexical analysis code generation Figure 11.2 before examining the limitations of stepwise refinement, we should at least briefly before examining the limitations of stepwise refinement, we should at review its strengths. 11.3 strategy of the stepwise Strengths and weaknesses interested Perhaps it is inevitable that, in a book of this form, we are likely to be more not least in identifying the weaknesses of particular design practices than the strengths, However, because the advocates of methods provide plentiful arguments for the latter. constructed using a call-and-return style, we can regard this as further reinforcing the constructed using a call-and-return style, styles are compatible with the use of stepwise above argument that both of these is the implementational mappings that are refinement! In such a case, all that differs process. High-level refinement steps lead to used for different levels of the and then lower-level refinement steps, applied to identification of the filter processes, them using subprograms. each of these processes in turn, structure mediate between the pipe-and-filter and data-centred repository styles.) One of the mediate between the pipe-and-filter is that it may be better able to incorporate such benefits of a pipe-and-filter solution one of the problems of call-and-return, ideas as information hiding. This highlights about data is not easily confined within which is that, when using this style, knowledge particular elements. is strongly partitioned into the lower units, with the main body doing little more is strongly partitioned into the lower traditional pipe-and-filter format shown in than sequencing these, so that the more alternative to employ. Figure 11.3 is clearly quite a practical access issues. (Indeed, Shaw and Garlan (1996) of these is the data design and data of such features as shared symbol tables and argue that, due to the incorporation employ an architectural style that is inter- attributed parse trees, modern compilers Figure 11.3 11.2 shows a (rather simple) model of a compiler. Figure we consider the traditional a call-and-return style. In this, the functionality model of a compiler, expressed in SDC11 9/18/07 11:05 AM Page 237 AM Page 11:05 9/18/07 SDC11 step- , which Wirth did not try to address <a href="/tags/Scalability/" rel="tag">scalability</a> of lower-level units. which, although inconvenient, does not render the pro- which, although inconvenient, does duplication that can arise from making key decisions at early stages (which to that can arise from making key decisions instability lack of a stopping rule nature of the process. While creative ‘leaps’ can and do occur when designing While creative ‘leaps’ can and nature of the process. Perhaps the main conclusion from this section is that stepwise refinement, while it Perhaps the main conclusion from this Duplication of functionality is only one aspect of scalability. A related issue is Duplication of functionality is only Turning now to the issue of weaknesses, we begin by reminding ourselves of the issue of weaknesses, we begin by Turning now to the Undoubtedly one of the strengths is the relative simplicity of the design process, of the design relative simplicity is the strengths one of the Undoubtedly upon the is the emphasis less widely recognized, strength, perhaps A second some extent is countered in stepwise refinement by its emphasis upon the ability to some extent is countered in stepwise is managed adequately); backtrack, providing that the process the cess invalid in any way; and the problem of the Summary problems that are strongly functional in their emphasis), it becomes less satisfactory for larger problems that are strongly functional in their emphasis), it becomes less satisfactory problems and for those that involve more than a minor element of data modelling. Stepwise refinement has been examined as a design strategy in its own right. From this we Stepwise refinement has been examined as a design strategy in its own right. well-specified can see that, while applicable within a limited range of problem size (and with complexity of data access and manipulation can lead to further duplication and com- complexity of data access and manipulation approach to design. plexity, requiring a more data-centred effectively employed on a limited scale (often is an eminently practical strategy, is most that are not data-centric in nature. In the as an initial design phase), and on problems benefits of stepwise progression can be realized next chapter we see how some of the process steps. using larger and more self-contained The last of these relates to the issue of The last of these relates to the issue was also relatively small and particularly in his 1971 paper. (His chosen problem well-specified.) large systems. Zahniser (1988) argues that where the way that the data is employed in to ‘transient data’ or ‘control data’), then the ‘resident data’ is involved (as opposed n n books, not least because case studies of design are already ‘long stories’ and adding case studies of design are already books, not least because makes them even longer!) episodes of backtracking identified in Chapter 9. These of a top-down strategy that were limiting characteristics included: n wise development has its benefits process which favours a gradual software, the stepwise of ideas and (if suitably it encourages an orderly development too. In particular, manner. An important of managing backtracking in a controlled documented) a means is a normal feature of any accept (as Wirth did) that backtracking element of this is to much emphasis in design text- aspect of design is rarely given design process. (This although even that can be partially illusory, as Wirth observed when commenting on commenting when observed as Wirth illusory, be partially that can even although eight-queens problem. solution to the to describe his story’ that was needed the ‘long to the need the functional viewpoint, is placed upon the emphasis Indeed, although the does mean that in later stages, viewpoint, at least the data modelling consider relative. of the process is indeed simplicity</p><p>Setpwise refinement 238 SDC11 9/18/07 11:05 AM Page 238 AM Page 11:05 9/18/07 SDC11 Exercises 239 (4), 221–227 14 , Comm. ACM architectural style can lead to the use of ‘global data structures’. architectural style can lead to the use of call-and-return For any programming language of your choice, consider what mechanisms are provided in For any programming language of your choice, the language to avoid the need for this. a) motor cars b) hi-fi systems c) e-commerce systems web-based work for each of these. Explain why you think it would or would not through media other than ‘traditional’ forms of software? In particular, how would it be than ‘traditional’ forms of software? In through media other of: suited to the design Exercises Further reading 11.2 Use of a 11.1 to be realised for use in designing systems that are How well is stepwise refinement suited Wirth N. (1971). Program development by stepwise refinement. by stepwise Program development Wirth N. (1971). useful for its narrat- things, is particularly that, among other clear and lucid paper An eminently explained. behind it, is clearly with the reasoning design step, together ive form. Each SDC11 9/18/07 11:05 AM Page 239 AM Page 11:05 9/18/07 SDC11 SDC11 9/18/07 11:05 AM Page 240 SDC12 9/18/07 11:10 AM Page 241</p><p> chapter 12 241 Incremental Design</p><p>12.1 Black box to white box 12.2 Prototyping in stages 12.3 An example – DSDM</p><p>In a book such as this, where software design activities form the principal object of study, it is easy to develop a rather compartmentalized view of design activities and of the context within which they are performed. This chapter considers how design activities are organized within a more dynamic context, where they need to be interleaved with other develop- mental tasks, and where they may be constrained by having only limited time available for completion. In such a context, the control of design activities becomes of paramount importance. Indeed, when we examine an example of a design method that supports this style of development, we find that its main elements are those concerned with the organization of the processes involved. , or , with Agile Methods , or XP, representing the ‘outer Rapid Application Development <a href="/tags/Extreme_programming/" rel="tag">Extreme Programming</a> , and the approaches used for RAD are sometimes termed , and the approaches used for RAD In Chapter 3 we identified some reasons why an incremental development process In Chapter 3 we identified some reasons why an incremental development Incremental development is often termed Incremental development is often termed In practice, it is widely recognized that this is a rather unrealistic situation, widely recognized that this is a rather In practice, it is The title of this section (which, as we will demonstrate, is probably not very accur- (which, as we will demonstrate, The title of this section working software over comprehensive documentation; working software over comprehensive negotiation; customer collaboration over contract a plan. responding to change over following individuals and interactions over processes and tools; individuals and interactions over processes might be adopted, which included situations where: Of course, taken to the extreme, both Agile Methods and procedural development Of course, taken to the extreme, both Agile Methods and procedural into unstruc- practices can be abused and misused. The agile approach can degenerate and tured ‘hacking’ of code, while the procedural approach can become bureaucratic of both document-bound. However, an awareness of the strengths and limitations with an forms should be a part of any software developer’s knowledge-set, along appreciation of how they are best (and least-suitably) deployed. n n n RAD the development practices of 2002). In terms of the philosophy that underpins limits’ of such approaches (Boehm, they favour: Agile Methods, Boehm suggests that n izational reasons. So, the development of any design solution is very likely to involve izational reasons. So, the development customer throughout the design process. The some degree of interaction with the conventional procedural design approaches, difference this then highlights is between that this creates for the design solution, and which try to minimize the perturbations to incorporate this interaction as a fully-fledged incremental approaches, which seek control and manage its effects. element of the design process and so although it is one that is often necessitated by contractual or other factors. There are that is often necessitated by contractual although it is one specification can be very comprehensive and inclusive requirements situations where a uncommon. In addition, of development, but these are relatively provided at the start of any sizeable software system, the over the period needed for the development dramatically, for both technical and organ- requirements may evolve or even change approaches to the task of designing software. approaches to the through the term ‘in stages’. key tenet of incremental development ate) emphasizes the design is the idea that we all procedural approaches to software Implicit in almost is agreed with the customer of ‘requirements specification’ that begin with some form model, and eventually from the basis for developing a black box and which then forms that conforms to that specification. this a white box model 12.1 stages in box white to box Black of an ‘aside’ as representing something can be considered this chapter In some ways, form the dominant practices that context of the design viewed from the when it is an important issue Yet it deals with following chapters. the preceding and theme of our in many of assumptions adopted of the underlying highlights some and, indeed,</p><p>Incremental design 242 SDC12 9/18/07 11:10 AM Page 242 AM Page 11:10 9/18/07 SDC12 Black box to white box in stages 243 (Boehm, emergent , 1999), and et al. spiral model , whether it be a risk that a given solution , whether it be a risk risk that was discussed in Section 3.3, where this was described From the designer’s point of view, we can identify two major technical reasons From the designer’s point of view, The adoption of an incremental development process is therefore likely to be an incremental development process The adoption of developments are concerned, an organization may be unwilling to invest heavily in developments are concerned, an organization may be unwilling to invest need may terms of staff effort until convinced of the likely benefits. Here, the key exploratory prototyping and as ‘enhancing the information that is provided from the <a href="/tags/Requirements_analysis/" rel="tag">requirements analysis</a> to some functional specification activities’, with the distinction that here we are extent undertaking the second of these tasks. new Time is probably the most likely form of resource constraint although, where of the eventual system may need to be explored with the customer. (This is less of the eventual system may need to doesn’t know what they want, than one likely to be a situation where the customer feasible, especially if there are severe time where they don’t know what is really a role corresponds roughly to the idea of constraints on implementation.) Such there may be a need to demonstrate that an idea is feasible; an idea is that demonstrate a need to may be there establish a market purposes, to essential, for business necessary or even it may be rapidly as possible; position as a product before a market exists for establish whether may wish to the ‘customer’ to large-scale investment. committing 2. To develop a working solution (white box) within a set of resource constraints. 1. a situation where the purpose To develop the ‘black box’ model for the system, in new services may need to be introduced rapidly in order to meet legislative or other new services may need to be introduced re-shaping itself to meet new business changes. If the organization is continually to support the business will need to evolve in opportunities, then any software used parallel with the business itself. might be adopted. why an incremental design approach vices or products.) Such organizations are sometimes characterized as being vices or products.) Such organizations can be defined as one that is ‘in a state of con- in nature. An emergent organization always in transition’ (Truex tinual process change, never arriving, is regarded as being a ‘normal’ state of the busi- hence is one where continual change ‘dot com’ organizations are often seen as ness context. While the internet-centred may be so, a more extensive domain of this form being of this form and, indeed, many dealing in financial markets of any type, where is probably that of those organizations ‘waterfall’ forms that tend to be implicitly embodied in procedural design methods. tend to be implicitly embodied in ‘waterfall’ forms that needs to maintain its position situations where an organization favoured in those minimizing time-to-market is a markets, and where in volatile and rapidly-changing applies whether the software is itself being particularly important constraint. (This it is being used to market an organization’s ser- marketed or whether, as is more likely, Underlying all of these is the concept of Underlying all of these or that no real market may of missing out on a market opportunity; is not feasible; one Boehm’s is also an important element in actually exist. Risk evaluation forms a key activity in Figure 3.2, and in which risk 1988) that was shown Incremental development performed at each step of development. which needs to be rather than the more linear assume a lifecycle model of this form, processes effectively n n n SDC12 9/18/07 11:10 AM Page 243 AM Page 11:10 9/18/07 SDC12 as being a key distinguishing feature of an as being a key distinguishing feature control , 1999). et al. One issue that can easily become blurred where incremental development is One issue that can easily become blurred where incremental development Incremental design is an approach that is less commonly encountered in conven- Incremental design is an approach that Since the role of the individual tends to be emphasized in this type of development, Since the role of the individual tends Last, but certainly not least, alongside the evaluation of risk, and planning for Last, but certainly not least, alongside Moving on to the design process itself, our first observation is that the use of an design process itself, our first observation Moving on to the well be to deliver a solution on time, even with some elements of functionality of some elements with time, even on a solution be to deliver well or curtailed. missing employed is the distinction between design and implementation. Indeed, this was employed is the distinction between design and implementation. Indeed, Certainly, an touched upon in Chapter 3 when we discussed the use of prototypes. counterparts. This is not to argue that it is not a valid engineering approach, given counterparts. This is not to argue that it is not a valid engineering approach, only makes adequate planning and control, but rather that it is an approach which dynamically sense when used with a medium such as software, and within the type of organ- changing context often met in software-based business use and in the emergent izations that such software makes possible. rather than writing the knowledge down in plans.’ Certainly the availability of indi- rather than writing the knowledge down to be one of the risk factors to be considered viduals with appropriate skills does need an approach. when deciding whether to adopt such As a technique it is unlikely to find much favour tional forms of engineering design. the central span of the bridge, we’ll work out with civil engineers (‘after we have built any more than with their chemical or electrical how to construct the approaches’), tain control of it within this more unconstrained context becomes an important task. tain control of it within this more unconstrained agile approaches require the employment of one question that it raises is whether whose skills are in short supply) to lead a ‘premium people’ (in the sense of people As Boehm observes on this issue: ‘agile methods development team (Boehm, 2002). on the tacit knowledge embodied in the team, derive much of their agility by relying in the way that the design process needs to be organized in order to provide the degree in the way that the design process needs Section 3.3 looks at this issue more closely of control necessary to meet the constraints. to incremental design. where we study a particular approach change, we can regard the issue of incremental development provides more ‘degrees incremental approach. By its nature, need to organize the design process so as to main- of freedom’ than is usual, and so the extensive use of ‘plug-and-play’ extensions to a system, a theme that we will return to extensions to a system, extensive use of ‘plug-and-play’ is to recognize that a system is an important technical factor in Chapter 17. Indeed, possible. Maintaining the ‘sep- change, and to facilitate this as far as being designed for matter of attention to detailed needed for plug-and-play is more a aration of concerns’ of a specific architectural style. one that is affected by the choice design, rather than to design does affect the act of designing is Where the use of an incremental approach system, since such organizations are characterized by a ‘continuous redevelopment organizations are characterized by system, since such perspective’ (Truex particular design strategy or approach is not closely tied to any incremental design style is not important. Achiev- This is not to say that architectural architectural style. framework which enables change’ requires an overall ing the goal of ‘continuous For the rest of this chapter we are largely concerned with the second of these roles second of these roles with the we are largely concerned of this chapter For the rest our emphasis upon in keeping with since this is more development, for incremental of the emergent with the notion is also more in keeping design activities. It studying ever creating a ‘final’ or expectation of no real likelihood where there is organization,</p><p>Incremental design 244 SDC12 9/18/07 11:10 AM Page 244 AM Page 11:10 9/18/07 SDC12 Prototyping 245 to a problem, by developing it in advance of large-scale imple- to a problem, by developing it in advance . This role is distinguished by the use of the prototype for evaluating . This role is distinguished by the use . This is the form closest to our idea of ‘incremental development’ of . This is the form closest to our idea . In this role a prototype is used to help with clarification of user solution Profile of an incremental design process. Profile of an incremental to the need to modify the wider work practices of an organization. One purpose to the need to modify the wider work practices of an organization. One a set of might be to help with developing an analysis of users’ needs by providing of performance and resource needs, evaluation of the effectiveness of a particular of performance and resource needs, evaluation of the effectiveness of a of proto- form of user interface, assessment of an algorithm and so on. This form be imple- type is essentially intended to be a ‘throw-away’ item, and might well itself. mented in a quite different form to that which will be used for the final system Exploratory lead requirements and possibly with identifying how introducing the system might ments step by step as these become clearer with use, and changing the system to fit ments step by step as these become clearer to develop a product and the prototype them. In this form, prototyping is used gradually evolves into the end product. Experimental a possible may be manifold, including the assessment mentation. The reasons for doing this Evolutionary is adapted gradually, by changing the require- a system. The software for a system Figure 12.1 n n In Chapter 3 we examined Floyd’s classification of the reasons why prototyping might In Chapter 3 we examined Floyd’s classification (Floyd, 1984). To recap these briefly, the three be employed in software development roles she identified were as follows. n and, indeed, when we examine the form of DSDM in Section 12.3, we will see that its and, indeed, when we examine the form type of structure. This then leads us on to the organization broadly conforms to this the issue of prototyping more fully. topic of the next section, where we examine 12.2 Prototyping incremental approach is likely to involve some interleaving of design stages with imple- is likely to involve some interleaving incremental approach be ‘detailed design’ activities, the design stages are likely to mentation. However, architectural design decisions established by a set of overall occurring with a context phases begin. Figure 12.1 illustrates this point that are made before the incremental SDC12 9/18/07 11:10 AM Page 245 AM Page 11:10 9/18/07 SDC12 . Design reviews, both with other team members . Design reviews, both with other team . story-board . exploratory ++ and the , 2002). et al. At a lower level, prototypes can be built with a variety of tools, depending upon At a lower level, prototypes can be built with a variety of tools, depending An intermediate level of prototype is one provided by using a more formal no- An intermediate level of prototype At a very abstract level, one of the prototyping forms sometimes used in system At a very abstract level, one of the Of course a prototype need not actually be an item of software, especially where Of course a prototype need not actually One of the characteristics of incremental design is that it usually involves some of incremental design is that One of the characteristics The evolutionary role fits with the notion of the emergent organization that was role fits with the notion of the emergent The evolutionary For the purposes of this chapter, we can see that the two roles of prototyping that the two roles of we can see that of this chapter, For the purposes possible models for them to use and assess. Essentially this form of prototype is also is of prototype this form Essentially assess. to use and for them models possible <a href="/tags/Infor/" rel="tag">infor</a>- the as enhancing be considered and it can item, ‘throw-away’ to be a likely specification and the functional requirements analysis from the mation provided activities. are some popular mechanisms for building exploratory prototypes, especially where are some popular mechanisms for building exploratory prototypes, especially one the user interface is an important element of a system. As always with software, between these. The use of such semantically well-defined forms is not only able to pro- between these. The use of such semantically well-defined forms is not only support, vide a valuable prototyping mechanism in itself, but also, with suitable tools languages can result in the automatic generation of outline code in implementation such as Java and C or <a href="/tags/Perl/" rel="tag">perl</a>/tk their purpose. Scripting languages such as Visual Basic, <a href="/tags/Tcl/" rel="tag">tcl</a>/tk and perl regard the story-board as a form of ‘design execution’ mechanism, and hence as a high- regard the story-board as a form of ‘design of avoiding one of the hazards of prototyping level prototype. It also has the benefit delivered as the eventual product! identified earlier, in that it cannot be diagrammatical forms such as <a href="/tags/Petri_net/" rel="tag">Petri Net</a> tation than that of the story-board. Executable 1991) and Statecharts (Harel and Gery, Graphs (Birrell and Ould, 1985; Stevens, for modelling system states and transitions 1997) can provide powerful mechanisms (Preece design is the notion of the element of incremental design, and the story- and with end-users, form an important ideas about system behaviour without needing to board is a useful means of conveying of this idea is shown in Figure 12.2. We can get into technical detail. An example address anything from very specific aspects of some element of a system through to the address anything from very specific aspects system. functionality or behaviour of the complete the use of a system are being considered. Indeed, such aspects as possible scenarios for extensively in the design of human-interactive prototypes are commonly used quite include such forms as mock-ups of the layout or systems, and the forms employed may simply to gauge responses from eventual users format of user interfaces, intended So in a context where the incremental design process is continuous and on-going, the the incremental design process is So in a context where a continuous process of evolu- may closely approximate to development of software tionary prototyping. who may or may not with the ‘customer’ (or with ‘end-users’, degree of interaction a role for the exploratory prototype, which may be the customer.) Here we can see evolutionary a context there is really no the preceding section. Indeed, in such briefly described in of the ‘current state’ of a sys- an ‘end product’, only the notion notion of there being modifying a previous state (not of the system is then achieved by tem. Each new state new implementation. state’), or even by creating a completely necessarily the ‘current are most likely to be extensively employed in incremental development forms are the forms are incremental development employed in likely to be extensively are most </p><p>Incremental design 246 SDC12 9/18/07 11:10 AM Page 246 AM Page 11:10 9/18/07 SDC12 An example – DSDM 247 Dynamic Systems , generally known as DSDM. This originated in 1994, and is , generally known as DSDM. This An example of a simple story-board. DSDM is quite unlike any of the other design methods that we examine in this DSDM is quite unlike any of the other design methods that we examine So having examined some of the reasons why an incremental design approach may So having examined some of the reasons Indeed, throughout the DSDM lifecycle, there are two distinctive elements that emerge Indeed, throughout the DSDM lifecycle, there are two distinctive elements very strongly: evolution, the ‘current’ version of the DSDM method is 4.1. process, book. It is almost entirely concerned with managing and controlling the RAD other class- and makes no assumptions about design strategy, notations or any of the the DSDM ical ‘method features’. This is not to say that these issues are ignored in form. design process, simply that DSDM makes no assumptions about their particular In this section we examine an example of how a ‘design method’ that is based around In this section we examine an example that we will examine is the an RAD strategy is structured. The method Development Method DSDM Consortium (the associated trade- managed by the ‘not-for-profit’ UK-based which is mainly made up of representatives mark has a reversed second ‘D’ character), time of writing, following a typical process of from the business community. At the for organizing the feedback needed for incremental design, we now need to consider for organizing the feedback needed In the next section we examine an example of one how the process might be structured. DSDM method. approach to RAD, in the shape of the 12.3 – DSDM An example person’s implementation language is another person’s prototyping tool, and so the list person’s implementation language is is really an endless one. then briefly considered some of the mechanisms be the appropriate one to adopt, and Figure 12.2 SDC12 9/18/07 11:10 AM Page 247 AM Page 11:10 9/18/07 SDC12 This can be seen as being undertake and perform; and undertake The DSDM process is based upon people As mentioned above, DSDM has a very As mentioned above, DSDM has a that underpin DSDM, since these principles pro- that underpin DSDM, principles needs upon design decisions. needs upon category. This is not to say that it would never be used by (say) that it would never This is not to say category. , who ‘guides the developers in their activities to ensure that the , who ‘guides the developers in their business , who is tasked with representing a particular user view (which might stem , who is tasked with representing a particular ambassador In the rest of this section we seek to examine DSDM from two aspects. The first section we seek to examine DSDM In the rest of this ture are also considered as important criteria. The DSDM view is that, once the ture are also considered as important criteria. The DSDM view is that, functionality has been established, the solution can be re-engineered as necessary. (We should also note that the resulting products can be interim design documents, as well as prototypes or executable code.) Fitness for business purpose is the essential criterion for acceptance of deliverables. at DSDM places the main emphasis upon ‘delivering the necessary functionality to those the required time’. In that sense, it again takes a very different approach of struc- employed in the methods discussed in the following chapters, where issues partially a corollary of the previous principle. For active user involvement to work partially a corollary of the previous principle. need for frequent consultation with higher- effectively, it is essential to avoid the level management. products. The focus is on frequent delivery of an activity-focused one. There is also an favouring a product-focused view over of time for performing various activities. emphasis upon allocating short periods opment process. Two examples of very specific user roles encouraged in DSDM are opment process. Two examples of very the meet the needs of the business’; and the solution being developed will accurately advisor support, etc.). from marketing issues, the IT operational to make decisions. DSDM teams must be empowered Active user involvement is imperative. seen as being active participants in the devel- strong ‘people’ element and users are the roles, responsibilities and activities that that and activities responsibilities the roles, of the effect 4. 3. 2. DSDM is based around nine principles, which are invoked as necessary in order to DSDM is based around nine principles, process should be structured. In brief, these decide on the way that the development are as follows. 1. that the DSDM practices are concerned with the complete development life-cycle, from are concerned with the complete that the DSDM practices although, as usual in this through to planning maintenance establishing requirements that are concerned with concern ourselves with those elements book, we will chiefly and design’. described under the headings of ‘analysis the roles generally 12.3.1 principles The DSDM software engineers but, in terms of emphasis, it is far more concerned with business it is far more concerned terms of emphasis, engineers but, in software ones. issues than with technological set of of these concerns the The second aspect that we for its particular structure and practices. vide the rationale these principles are inter- development cycle, which is where examine is the DSDM We should also note particular approach to systems development. preted to create its n n that factors mean compartments, these be placed in neat as such things can As much the sometimes term in what we considered as belonging a method can be DSDM as Systems Information</p><p>Incremental design 248 SDC12 9/18/07 11:10 AM Page 248 AM Page 11:10 9/18/07 SDC12 An example – DSDM 249 this pro- manage Basically this means that configur- Basically Rather than being a separate ‘end of Rather than being in the process. In a more conventional In contrast to ‘traditional’ approaches, In contrast to ‘traditional’ time too) can be regarded as being variable para- too) can be regarded as being variable quality While iteration is a normal element in any development process, development in any element is a normal iteration While Obviously this philosophy is one that very much constrains the set of domains for Obviously this philosophy is one that very much constrains the set of domains This distinction is an important one. While, in principle, all of these attributes This distinction is an important one. The first of these is the importance of The first of these is the importance of The main concern here is to involve stakeholders, implying that change control The main concern here is to involve possible, so that short-term redirection of a procedures should be kept as ‘light’ as understanding, rather than as the out- project can be achieved through a shared developers and users. come of an adversarial conflict between high level, but allow more detailed aspects to evolve as necessary. more detailed aspects to evolve as high level, but allow throughout the lifecycle. Testing is integrated acceptance testing of only implied in the waterfall model) user project’ activity (as process. software proceeds throughout the development partially-complete between all stakeholders is essential. A collaborative and co-operative approach ation control is an essential and all-pervasive element of the DSDM development essential and all-pervasive element ation control is an to backtrack to reuse necessary, it should always be possible context. As and when step in development. the basis for the next incremental an earlier version as baselined at a high level. Requirements are occupy several volumes of of system requirements may where the documentation the requirements at a the DSDM approach is to freeze very detailed specification, Iterative and incremental development is necessary to converge on an accurate on to converge is necessary development incremental and Iterative solution. business procurement pro- an organization’s this into easy to incorporate it is not always with the aim of an expectation, explicitly makes this however, cedures. DSDM, through its use. in the system continuous improvement achieving are reversible. during development All changes didn’t have time to complete the module which allows the aircraft’s landing gear to didn’t have time to complete the module which allows the aircraft’s landing within a be lowered, but go ahead with the test flight anyway’). On the other hand, understandably they seek to fix this parameter, while regarding delivery time as a vari- understandably they seek to fix this parameter, while regarding delivery time of fixed time able. In contrast, the DSDM processes are geared around working to a set element. intervals, and the deliverable functionality is regarded as being a variable would which a RAD approach such as this can most effectively be employed. No-one (‘we advocate DSDM as the most suitable strategy for producing avionics software are fixed, and the deliverable functionality is allowed to change. Figure 12.3 illustrates are fixed, and the deliverable functionality this difference. (which ought really to include of them be fixed. Since a key element of most cess generally requires that one or more models of system functionality at an early stage, design methods is that they develop ciples are embodied in the process, we need to examine two other aspects of the ciples are embodied in the process, form important concepts for the method. ‘DSDM philosophy’, both of which the functionality that the system is intended to approach to software development, that are needed to achieve this are varied provide is fixed, and the time and resources this emphasis is inverted, the time and resources as necessary. In the DSDM approach Enumerating these principles does reinforce the earlier point that the focus of attention Enumerating these principles does reinforce and people. Before going on to see how the prin- in DSDM is really upon business aims 8. 9. 7. 5. 6. meters of the development process needed for a system, the need to meters of the development process needed SDC12 9/18/07 11:10 AM Page 249 AM Page 11:10 9/18/07 SDC12 rules’ (DSDM</p><p>Resources MoSCoW . This is a process ‘by which</p><p>Time Functionality <a href="/tags/Timeboxing/" rel="tag">timeboxing</a> vary time and resources (b) ‘Traditional’ methods: fix functionality, (b) ‘Traditional’</p><p>Resources rules provide a mechanism for prioritization within DSDM activit- rules provide a mechanism for prioritization Time describes important requirements which would be mandatory if more is the category that includes those requirements that are fundamental to</p><p>Varying the design constraints (time, functionality and resources) Varying the design constraints Functionality MoSCoW vary the functionality delivered (a) DSDM: Fix time and resources, (a) DSDM: Fix time and The An important concept in DSDM is that of An important concept in DSDM is that time were available, but for which some degree of workaround can be achieved in time were available, but for which some degree of workaround can be achieved the short term. Must have effectively the system, such that it will be unusable if they are not met. This category identifies the minimum usable subset of system functionality. Should have describe the following four categories of priority. n n role of the MoSCoW rules, which provide the second key element of DSDM philo- role of the MoSCoW rules, which provide sophy that we examine here. is to be produced by the due date (within the ies. If a deliverable (in whatever form) to be prioritized to ensure that the essential work timebox), then the requirements need elements are omitted. The rules therefore is completed, and that only less critical tinuous prioritisation and flexing of requirements using the tinuous prioritisation and flexing of is a process, rather than an object of some Consortium, 1999). (Note that timeboxing then refer to individual ‘timeboxes’!) In essence, form although, of course, DSDM does project control and to ensure that a project team the role of timeboxing is to maintain point in time. It is also the mechanism used to has a clear focus and deadline at any development by providing the means of deter- control the fixed-time aspect of RAD for an increment. This last aspect is the mining the acceptable degree of functionality might be acceptable. (The latter is a bit simplistic of course, the degree of functional- might be acceptable. (The latter is a has to be acceptable to supplier and end-user, but ity available for an early release still explicitly when deciding when a release can be DSDM does consider such factors quite made, as we explain below.) and immovable date through con- defined objectives are reached at a pre-determined Figure 12.3 advantage by getting a new financial service context where (say) gaining a marketplace then some limitations in the initial facility out first is the all-important consideration,</p><p>Incremental design 250 SDC12 9/18/07 11:10 AM Page 250 AM Page 11:10 9/18/07 SDC12 An example – DSDM 251 requirements are , and in that sense their framework is the category that forms the ‘waiting list’ that forms the is the category can be considered as developing the ‘black box’ assesses whether DSDM is a suitable approach to use on a looks at how the business processes of the organization are (or is the category of requirement which can be safely left out of the out of the left be safely which can of requirement category is the Functional Model Iteration Feasibility Study Business Study The DSDM process is generally described as being a The DSDM process is generally described development phases, that can be summar- The basic framework incorporates five Returning briefly to the use of these rules within timeboxing, we can also see that the use of these rules within timeboxing, Returning briefly to model of the system. given project. will be) affected by the project and prioritizes the requirements accordingly. within individual project activities such as workshops, or prototype development, within individual project activities such their objectives. to set deadlines for these and to specify at the ‘top’ level, to establish the date for final system delivery and the set of over- establish the date for final system at the ‘top’ level, to will be met at that point; all requirements that for a particular increment and to define the within project cycles, to set an end date related deliverables; Could have Could not but are to have, are nice which features other words, In deliverable. current of the system. for the functioning essential this time have but won’t have Want to addressed in the future. that can be of requirements ized as follows. 1. The it is less prescriptive than the processes that we will examine in the next few chapters. it is less prescriptive than the processes of a specific design strategy, we have not (For that reason, coupled with the absence the D-matrix notation.) attempted to model this process using 3. The 2. The reader is advised to consult the DSDM literature described at the end of this chapter.) reader is advised to consult the DSDM different phases of the development process, and we now move on to examine these. different phases of the development 12.3.2 process The DSDM the organization of DSDM’s particular Having discussed the ideas that underpin examine how the process is itself structured. (We approach to RAD, we now go on to of its management, and for those aspects the do not have space to discuss any details n will operate in a hierarchical fashion, with From this, we can also see that timeboxing However, it can be argued that the really key use smaller timeboxes within larger ones. the prototyping activities that occur within the of timeboxing is to provide control of which will include: n n Of course, the assignment of requirements to categories can be quite a difficult process categories can be quite requirements to the assignment of Of course, places upon a collaborative where the emphasis that DSDM and, again, this is that all is important. Users who insist approach to development to prove useful members of a ‘must have’ category are unlikely (by definition) in the development team! of the development process, can be employed at various levels this is something that n n SDC12 9/18/07 11:10 AM Page 251 AM Page 11:10 9/18/07 SDC12 , Train users , together Implement Implementation & guidelines User approval Review Feasibility Prototype business Feasibility Report design Review design Identify prototype prototype Design and build iteration design Create prototype plan Agree provides a mix of ‘white box’ solutions and proto- provides a mix of ‘white box’ solutions phase provides the final deliverables, which will phase provides the final deliverables, study Feasibility for development, giving more detail to the arguments of the Implementation Review prototype study Business Identify prototype functional The DSDM development process. model iteration Outline Plan <a href="/tags/Functional_design/" rel="tag">Functional Design</a> and Build Iteration Create prototype functional The Feasibility Study is expected to deliver a (short) In the rest of this section we expand briefly on the activities that each phase incor- In the rest of this section we expand include user training and evaluation. typed elements. plan Agree with an report. Optionally, it may also be appropriate to develop a This is concerned with examining both the nature of the problem and the prac- This is concerned with examining both the nature of the problem and places ticality of using the DSDM approach to meet its needs. The DSDM literature basis considerable emphasis upon keeping this phase short, on the quite reasonable systems that that RAD approaches such as DSDM are intended for use in developing are needed urgently. make a sequence, the form of DSDM makes it possible for them also to form a larger make a sequence, the form of DSDM cycle of iteration. the key design decisions are made. porates, and identify where some of Feasibility Study 5. Finally, the these are organized and interact. From this, we Figure 12.4 illustrates the way in which form a sequence, while each of the follow- can see that the first two phases effectively iterative in form. While in principle these three ing phases is seen as being individually 4. The Figure 12.4</p><p>Incremental design 252 SDC12 9/18/07 11:10 AM Page 252 AM Page 11:10 9/18/07 SDC12 An example – DSDM 253 , bring- Facilitated Workshop ), that will be more or less complete in terms . Since this document identifies both the archi- . Since this document identifies both , developed by using the MoSCoW rules. document, which is rather similar to the Feasibility document, which . Functional Prototypes Business Area Definition System Architecture Definition Development Plan Prioritized Requirements List The main outputs from this phase are models (which may include models in the The main outputs from this phase are So, at the end of this phase, the initial design framework should be established So, at the end of this phase, the initial The outcomes from this phase are important, and include the first elements of this phase are important, and include The outcomes from A The the main elements, this phase can be regarded tectural style to be employed and also step of the method. The developers are as incorporating the architectural design reuse existing components as a part of this also encouraged to look for scope to activity. The Report. A form of class diagrams, or data models using one of the data-modelling forms) and form of class diagrams, or data models using one of the data-modelling prototypes (termed Functional Model Iteration the ‘black box’ activities that aim to As described above, this essentially encompasses the given business context. So the emphasis describe what the system is to do within needs, but without going into detail about of this phase is on modelling the business and performance. non-functional aspects such as security and, as a consequence, related decisions about the development platform and develop- and, as a consequence, related decisions While, like everything else, these are change- ment tools should also have been made. likely to have fairly significant effects. able, clearly alterations to them are n n what we can consider to be design decisions. The four key outcomes in the form of to be design decisions. The four what we can consider phase are: deliverables from this n n the Feasibility Study. This element is strongly collaborative, since it needs considerable This element is strongly collaborative, the Feasibility Study. and how its working possess knowledge about the organization input from staff who and agreeing business needs the project. A vehicle for identifying will be affected by favoured by the DSDM process is the that is particularly and users. ing together developers which can be regarded as exploratory in nature, and which provides a demonstration provides which nature, and in as exploratory regarded can be which be a it could be software; need not this prototype Indeed, is possible. a solution that forms. or take other the previous section) (as described in story-board Study Business for as were given for the same reasons of short duration, is expected to be Again, this This is the completion phase of DSDM, with a strong emphasis upon testing incorpor- This is the completion phase of DSDM, with a strong emphasis upon testing a prototype, ated within it. The main output produced is still classified as being of user interface, with basic levels of functionality too. Design and Build Iteration SDC12 9/18/07 11:10 AM Page 253 AM Page 11:10 9/18/07 SDC12 organizations, the continual need to reinvent the business means that its system All of these make DSDM a rather interesting subject of study, both as a method All of these make DSDM a rather interesting In some ways, the characteristics of the target domains where DSDM is likely to In some ways, the characteristics of emergent Summary ‘wicked problem’). However, retaining control of what is effectively an opportunistic development ‘wicked problem’). However, retaining control of what is effectively an opportunistic Incremental systems development offers the opportunity to address software development needs Incremental systems development offers the opportunity to address software development we have seen, that cannot be fully itemized or identified when development begins. Indeed, as for of a requirements are likely to be in a continual state of change (arguably, a further characteristic users, in whatever form this might be appropriate. users, in whatever form this might be for incremental development, and also as one in that provides a degree of formality a role. which prototyping plays so important be effective are also quite well defined. The close attention to business processes means be effective are also quite well defined. projects within individual organizations than for that it is more likely to be used for emphasis upon shortening ‘time to market’ that producing ‘shrink-wrap’ solutions; the can offer much to organizations that face runs throughout its processes and techniques hence which need to ensure the availability of new rapidly-changing market-places and upon making a system accessible to end- systems; and there is also a strong emphasis pared to more ‘traditional’ approaches to design. These include the emphasis upon pared to more ‘traditional’ approaches a RAD context); the strong emphasis upon user management and control (essential in the fixing of delivery time and varying of func- involvement throughout the process; view of architectural style; and the extens- tionality (timeboxing); the non-prescriptive is covered in much more detail in the DSDM lit- ive use of prototyping (this last aspect here). erature than we have been able to do 12.3.3 in retrospect DSDM describe the essential features that describe methods, we can only As with all chapters book. However, based upon that, we can see a of DSDM in the space available in this of DSDM are particularly distinctive when com- number of areas where the features As always with RAD, the distinctions between this step and the previous one can be the distinctions between this step As always with RAD, management element is identify, which is where a strong process rather difficult to is more one of getting the incre- a method. In many ways, this phase important in such documentation needs. Again, it use, including any training and ment into productive training, are collaborative in that these latter tasks, especially is considered important to need. that any training is appropriate nature, so as to ensure although it may well incorporate the key functionality of the system. For our purposes, system. of the functionality the key well incorporate it may although can so the output and to be made, are likely decisions design detailed where the this is likely to contain more this is also box’ model, although as being a ‘white be considered approaches. with other design than is normal of an implementation elements Implementation</p><p>Incremental design 254 SDC12 9/18/07 11:10 AM Page 254 AM Page 11:10 9/18/07 SDC12 Further reading 255 (1), 64–69 35 , . Addison-Wesley (2/3), 95–103 52 , IEEE Computer J. of Systems & Software DSDM: Dynamic Systems Development Method modern IS development approach. Further reading Boehm B.W. (2002). Get ready for Agile Methods, with Care. Boehm B.W. (2002). Get ready for Agile As observed at the beginning of the chapter, the material in this chapter is rather different from of the chapter, the material in As observed at the beginning upon management of processes and following chapters, not least in its focus that of the preceding is an important part of designing, decision-making. Such management rather than technical chapter is its predominance in this differentiates the material of this although what particularly type of design approach. and Mayhew (2000) below) and, perhaps even more important, upon user commitment. The user commitment. important, upon perhaps even more (2000) below) and, and Mayhew also very relevant to these issues. solutions within a fixed time interval is focus upon providing such as architectural style or no- not prescriptive about technical issues In contrast, DSDM is problem. Significantly too, the to be adapted to the needs of a particular tations, leaving these determine whether or not a given is a feasibility study, intended partly to first phase of DSDM candidate for using the DSDM approach! project is a suitable process does then require a well-structured approach to the design task, in order that the develop- that the task, in order design to the approach a well-structured require does then process fit to to provide a good so that it continues into ‘hacking’, and does not degenerate ment process needs. the business illustrates the above in this chapter that has been examined of the DSDM method The example involvement (see Barrow upon user put considerable emphasis The DSDM practices issues well. ally in terms of philosophy and overall structure. encourages stakeholders to become involved, it also illustrates the diversity of practice that can encourages stakeholders to become involved, it also illustrates the diversity of practice occur in the use of DSDM. Stapleton J. (1997). version of The only textbook on DSDM available at time of writing. While covering an earlier especi- the method than the one addressed here, much of the key material is largely unchanged, wanting to learn more about DSDM. Investigating principles of stakeholder evaluation in a Barrow P.D.M. and Mayhew P.J. (2000). intended to examine the effectiveness of user participa- This paper reports the results of a survey are supportive of the idea that the DSDM method tion in the DSDM process. While the results methods and those used in procedural methods (which the author terms ‘plan-based’). Highly methods and those used in procedural methods for anyone considering the use of agile methods. readable, and provides a very useful context http://www.dsdm.org Provides information about DSDM activit- The website maintained by the DSDM consortium. support material which may be of interest for anyone ies and literature, including educational This short and very readable article looks at and contrasts the approaches employed in agile This short and very readable article looks SDC12 9/18/07 11:10 AM Page 255 AM Page 11:10 9/18/07 SDC12 experi- , evolutionary using an incremental development approach for development using an incremental against and for prototyping might be usefully employed. exploratory and ing system is too dated, and that failure to provide an upgrade is causing it to lose and that failure to provide an upgrade ing system is too dated, customers. the organization, and photographs. These will be used only within images of specialist Important needs so access does not need to be web-based. across its internal network, for rapid searches of the of digital or paper copies of images and are for rapid delivery of search strategies. index using a variety location of the user when this is information, which will be linked to the geographical of the system small and to provide rapid requested. Key needs are to keep the size that the phone company’s customers will be access to the information. It is intended from the company’s website. able to download the system to their phones Bank’s customers will be able to transfer funds between their accounts, set up and their accounts, to transfer funds between will be able Bank’s customers payments and purchase standing (annual, monthly or weekly) cancel instructions for concerned that its exist- such as foreign currency. The Bank is services from the Bank, mental described in question 12.1 above. might be interpreted for each of the systems as DSDM be helpful? would employing a ‘formal’ structure such (b) contains a large set of digital for providing access to a <a href="/tags/Digital_library/" rel="tag">digital library</a> which A system (c) to provide access to ‘local’ A system that will be embedded in mobile telephones developing the following systems. developing (a) facilities of a Bank. The access to the that will provide on-line A web-based system Exercises 12.312.3.1 in turn, consider how this Taking each of the DSDM principles described in Section 12.4 Why is this so, and Student projects often use an incremental approach to development. 12.2 of the systems outlined in question 12.1 above, identify where For each 12.1 down a list of points Write</p><p>Incremental design 256 SDC12 9/18/07 11:10 AM Page 256 AM Page 11:10 9/18/07 SDC12 SDC13 9/18/07 11:13 AM Page 257</p><p> chapter 13 257 Structured Systems Analysis and Structured Design</p><p>13.1 Origins, development and 13.4 The role of heuristics in philosophy SSA/SD 13.2 Representation forms for 13.5 Extended forms of SSA/SD SSA/SD 13.6 SSA/SD: an outline example 13.3 The SSA/SD process</p><p>SSA/SD, the design method examined in this chapter, is one that has evolved over a relatively long period of time, and also during a period when thinking about software design was in a rapid state of evolution. Partly because of this, and also because it has been extended in a num- ber of ways, this method draws upon a wide range of viewpoints, and has been applied across a wide range of application domains.</p><p>In its original form at least, the underlying design strategy can be con- sidered as adapting the basic ideas used in stepwise refinement (Chapter 11) for use with larger-scale problems. However, many other influences have helped to shape its approach, and indeed, one of the hardest choices in a book such as this is to decide just which form can be considered as the core one!</p><p>So in this chapter, the aim is to identify the main design themes and philo- sophies, and to describe these within our general framework, rather than to attempt to identify or classify all of the variations. call- , 1974; Yourdon et al. architectural style based upon main program/subprograms; this is neither To some degree this decline of interest in further development reflected both the To some degree this decline of interest in further development reflected The earlier forms of the SSA/SD design process essentially made use of a refine- The earlier forms of the SSA/SD design As a design method, this one is really a composite of two separate but related tech- As a design method, this one is really As a byproduct of this evolutionary development, there is a spectrum of variations this evolutionary development, there As a byproduct of A number of people have been closely identified with developing the various forms have been closely identified with developing A number of people very compatible with object-oriented forms, nor is its ‘monolithic’ form as attractive very compatible with object-oriented forms, nor is its ‘monolithic’ form when considering the structures of very large systems. apart, the evolution of this method effectively came to an end in the late 1980s. apart, the evolution of this method effectively came to an end in the late and also the emergence of the object-oriented model as a major architectural style, the SSA/SD ever-increasing size of software systems. Whichever strategy is employed, uses a processes are essentially geared towards developing a design solution that and-return ment of the top-down strategy for design, with the choices that are usually involved in ment of the top-down strategy for design, being moderated and constrained by consider- the functional decomposition process lesser degree, of data structure. Subsequent vari- ations of information flow and, to a approach to the analysis stages, based upon such ations adopted a more compositional and Fitzgerald, 1995). Still later developments techniques as event partitioning (Avison of the method with object-oriented ideas of have sought to combine the techniques 1991). However, this latter development design (Henderson-Sellers and Constantine, of descriptive forms that can also be used for architectural design. The second is of descriptive forms that can also oriented towards the solution-related aspects Structured Design, which in turn is almost entirely on the analysis stages alone (detailed design). Some texts concentrate others combine descriptions of the two in their (for example, De Marco, 1978), while 1988). presentation (for example, Page-Jones, variations in the detailed form of the method and notation, and its evolution over the variations in the detailed form of the of textbooks that describe its use (for example, years, have also resulted in a range 1988; Connor, 1985), but for the descriptions in Gane and Sarsen, 1979; Page-Jones, by Meilir Page-Jones (1988) will be used. this chapter the forms that are described Analysis, which is concerned with the modelling niques. The first is Structured Systems (often termed ‘analysis’), making use of a set of problem-related features of a system development of the analysis component of SSA/SD is that of Tom De Marco. analysis component of SSA/SD is that development of the analysis and design’, but to method. It is widely termed ‘structured in the details of the has been used rather liber- other methods (the word ‘structured’ avoid confusion with connotations), through- – presumably because of its positive ally by method designers preferred by some users will be employed. The out this book the longer description of both methods. approach to thinking about years. Much of the foundation for this of SSA/SD over the by Larry Constantine and Ed programs and design was developed the structuring of (Stevens with their coworkers at IBM Yourdon, in association closely associated with the 1979). A further name that has been and Constantine, 13.1 philosophy and development Origins, the the same time as developed at much design was this method for software Although differences between there are extensive next chapter, described in the JSP method of a an example SSA/SD provides strategy. In particular, in origins and them, both involved in software to the activities than that of JSP broader approach significantly that has been made the very wide use interest given contrast is of especial design. This</p><p>Structured systems analysis and systems design 258 SDC13 9/18/07 11:13 AM Page 258 AM Page 11:13 9/18/07 SDC13 Representation forms for SSA/SD 259 is a textual description of the primitive pro- is a textual description of the primitive P-Spec can also be used to record the information content of data flows. data dictionary A The functional viewpoint provided through the use of DFDs can be augmented by The functional viewpoint provided through Because of this background in the domain of data processing, most of the text- in the domain of data processing, Because of this background None of these points detracts significantly from its importance as a topic for study. as a topic importance from its significantly points detracts of these None that which is method (and hence assumed for this problem domain The basic This typically includes descriptions of all of the data forms that are mentioned in the This typically includes descriptions of all of the data forms that are mentioned The initial DFDs, P-Specs and any other forms of description that might be used. cess that is represented by a bubble in a DFD, and so can be regarded as a subsidiary cess that is represented by a bubble in a DFD, and so can be regarded as of its title, functional viewpoint. A typical P-Spec will summarize the process in terms procedural a description of the input/output data flow relating to the process, and the selection tasks that it performs, couched in terms of the basic concepts of sequence, 13.2. and iteration. An example of a simple P-Spec and its form is shown in Figure ‘analyst’) in building a model of the problem by using DFDs, elaborating this where ‘analyst’) in building a model of the to provide the necessary levels of detail. (This necessary by using child DFDs in order termed ‘levelling’ of the DFD.) Figure 13.1 process of elaboration is rather confusingly we previously encountered as Figure 7.2. shows a simple example of a DFD, which in the form of ‘process specifications’, or ‘P-Specs’ means of more detailed descriptions (sometimes termed ‘mini-specs’). A 13.2.1 Analysis Systems for Structured Representations and functional viewpoint that does not involve DFDs provide a problem-oriented (in the sense that all bubbles on the dia- making any assumptions about ‘hierarchy’ Structured Systems Analysis guide the designer (or gram are ‘equal’). The techniques of 13.2 for SSA/SD forms Representation make extensive use of two of the forms of dia- All of the many variants of this method in Chapter 7. The Structured Systems Ana- grammatical representation encountered of the Data-Flow Diagram, or DFD (described lysis techniques are centred on the use Design process makes use of the Structure Chart in Section 7.2.1), while the Structured that was described in Section 7.3.1. only a single sequential process for their solution. However, this is not a restriction process for their solution. However, only a single sequential stages of the Structured apart from the design transformation imposed by the method, is well able to cope with certainly Structured Systems Analysis Design process, and concurrent processing of information. problems that involve strategy seems to be capable of quite wide application, and it has been extended in a capable of quite wide application, strategy seems to be its usefulness for the real-time ways, mostly intended to enhance number of different Mellor, 1985; Ward, 1986; and Pirbhai, 1988; Ward and problem domain (Hatley Gomaa, 1986). that involve the use of method concern themselves with problems books describing the As a method it remains highly usable and particularly well documented, and it is also and documented, well particularly and highly usable remains method it As a con- chapter we will So within this later developments. has influenced many one that will philosophy and largely top-down as employing a regard this method tinue to ‘core’ form. examples to this confine our However, the basic of data processing. textbooks) is that assumed by most normally SDC13 9/18/07 11:13 AM Page 259 AM Page 11:13 9/18/07 SDC13 A simple example of a P-Spec (mini-spec). Example of a top-level DFD. Figure 13.2 Figure 13.1</p><p>Structured systems analysis and systems design 260 SDC13 9/18/07 11:14 AM Page 260 AM Page 11:14 9/18/07 SDC13 Representation forms for SSA/SD 261 Conventions for use with, and examples of, data dictionary entries. Conventions for use with, and examples Appropriately for a notation that is concerned with recording the details of Appropriately for a notation that is concerned with recording the details A later evolution in design practice has been to encourage the analyst to develop a A later evolution in design practice has program, together with the run-time invocation hierarchy that links them. It is there- program, together with the run-time invocation hierarchy that links them. between the fore the task of the Structured Design part of the method to bridge the gap significant form of diagrammatical notation. As might be expected, the viewpoint significant form of diagrammatical notation. As might be expected, the adopted is a constructional one, and it is provided by the Structure Chart. Chart is ‘physical design’, as is shown by the example in Figure 13.4, the Structure style. It is very much a program-oriented form of description in the call-and-return make up a chiefly concerned with describing the functions of the subprograms that to that of the DFD, since it models static relationships rather than the dynamic flow of to that of the DFD, since it models static information. 13.2.2 Design for Structured used Representations that can be used for the task of analysing the In comparison with the variety of forms Design activities mostly make use of only one structure of a problem, the Structured their structure being described in a suitably abstract manner, as demonstrated in the their structure being described in a example of Figure 13.3.) (ERDs) as a means of modelling the relationships set of Entity–Relationship Diagrams and determining their attributes in a suitably between the data elements in a problem viewpoint can be regarded as complementary systematic manner. This data-modelling Figure 13.3 should be highly abstract, and should description provided by the data dictionary 1988). (While the term ‘data dictionary’ not focus upon physical format (Page-Jones, the form of a list of the data components, with may sound rather grand, it simply takes SDC13 9/18/07 11:14 AM Page 261 AM Page 11:14 9/18/07 SDC13 Simple example of a Structure Chart. Simple example of a Some of the ways in which the basic strategy of this method has been developed Some of the ways in which the basic egy of SSA/SD, and so their use will not be explored in the description given in this egy of SSA/SD, and so their use will not be explored in the description chapter. both the problem and the solution. These include such forms as the State Transition both the problem and the solution. These include such forms as the State development Diagram, as described in Section 7.2.3, and the Control Flow Diagram, a the time- of the DFD (Ward, 1986). These forms can assist the designer with modelling a means dependent issues that predominate in a real-time system, as well as providing Once of describing the causal features that link external events to system reactions. basic strat- again, though, these forms are not central to the present description of the prime role is to supplement the design transformations, which in turn are based on prime role is to supplement the design so the outline description here will not be con- making use of the two main forms, and ancillary forms of design description. cerned with the roles performed by these previous section. The real-time design methods and enhanced were mentioned in the developed the use of further diagram- based on the SSA/SD strategy have particularly used to capture the behavioural features of matical forms, with these typically being of these is plain pseudocode, which provides a means of describing the algorithmic of these is plain pseudocode, which description of the initial structure of the elements of the design and a more detailed Chart. Depending on the nature of the procedural units identified in the Structure to make use of further representations in problem, designers may find it convenient issues, including such forms as decision trees, order to help with resolving particular 1988). While all of these can be useful, their decision tables and ERDs (Page-Jones, for Structured Design, and the next section provides an outline of the way in which this for Structured Design, and the next section is achieved. 13.2.3 forms Other descriptive the principal diagrammatical tools used in this While the forms just described are with other forms. Probably the most common method, they can also be supplemented Figure 13.4 that are used for Structured Systems Analysis and very different viewpoints and forms </p><p>Structured systems analysis and systems design 262 SDC13 9/18/07 11:14 AM Page 262 AM Page 11:14 9/18/07 SDC13 The SSA/SD process 263 Returning to the framework that is provided by the transformational model of the that is provided by the transformational Returning to the framework The form of the design process is more subtle than that of the simple top-down process is more subtle than that The form of the design to produce a Structure Chart for that transaction. to produce a Structure Chart for that error-handling, initialization, and other and refine them to include any necessary exceptions. ‘Context Diagram’). Systems Analysis is quite a large topic, which merits textbooks in its own right, it is Systems Analysis is quite a large topic, which merits textbooks in its own appropriate to add a few more comments at this stage. provided in an overview such as this.) 13.3.1 Analysis Systems 1 and 2: Structured Steps 7.2.1, Most of the basic operations involved in these steps were outlined in Section as Structured when discussing the use and the development of the DFD. However, Steps 1 and 2 are essentially those that make up the process that we are terming Steps 1 and 2 are essentially those the other three can be considered as forming the ‘Structured Systems Analysis’, while concentrates on describing the nature of the process of Structured Design. This section step 5 do not involve major design decisions, first four steps, since the actions of in the form of the final design. (To do proper although they play an important role requires a more detailed description than can be justice to the actions of step 5 also 3. units. Use Transaction Analysis to divide the DFD into tractable 4. each transaction, in order Perform a Transform Analysis on the DFD created for 5. implementation plans, Merge the resulting Structure Charts to create the basic method can be viewed as forming a set of sequential steps, with feedback occurring method can be viewed as forming a basic steps, shown in Figure 13.5, are: automatically between them. The five 1. of the problem (the Construct an initial DFD to provide a top-level description 2. by a data dictionary. Elaborate this into a layered hierarchy of DFDs, supported ations. The wider foundation that this provides assists the designer in producing a more that this provides assists the ations. The wider foundation to arise from the use of the for the eventual design than is likely consistent structure of the model helps to since the information-flow component simple top-down strategy, designer. the ‘solution space’ available to the reduce and constrain 9: the design transformations involved in this design process introduced in Chapter a plan for a program; this plan is in turn described in terms of the set of subprograms this plan is in turn described in terms a plan for a program; with the details of the inter- the relevant operations, together that are used to perform subprograms. actions between the of the system, expressed in it extends the simple description design strategy, however: information between the oper- by also considering the flow of terms of operations, 13.3 process SSA/SD The over-arching strategy original form the 13.1, in its mentioned in Section As already the classic top-down a refinement of be regarded as in this method can adopted by designer begins Chapter 11. The discussed in ‘divide and conquer’ strategy of are operations that in terms of the top-level problem a model of the constructing into is transformed of the problem then this description by the system, and performed SDC13 9/18/07 11:14 AM Page 263 AM Page 11:14 9/18/07 SDC13 Transformation diagram for SSA/SD. Figure 13.5</p><p>Structured systems analysis and systems design 264 SDC13 9/18/07 11:14 AM Page 264 AM Page 11:14 9/18/07 SDC13 The SSA/SD process 265 is the ‘traditional’ approach, in which first the is the ‘traditional’ approach, in which is a technique in which the thread of actions associated with is a technique in which the thread A context diagram for a vending machine. A context diagram having been produced (a valuable initial step), there are two A context diagram having been produced The most abstract description we can provide for a system is one in which the description we can provide for a system The most abstract As might be gathered from their names, Structured Systems Analysis is essentially Analysis Systems names, Structured their from be gathered As might a functional steps is to produce Systems Analysis of the Structured The objective ented by P-Specs. Event-partitioning a simple bubble in the DFD. The process each event is identified and used to form Top-down functional decomposition Top-down functional decomposition of ‘functional’ subtasks and then this process context diagram is divided into a set to be sufficiently simple to be repres- is repeated until the bubbles are considered n commonly used strategies that can be adopted for producing the remaining levels of commonly used strategies that can be the DFD schema. n complete system is itself the process being described. This ‘single-bubble’ description itself the process being described. complete system is ‘level zero’ diagram that encap- diagram’, and it is basically the is termed the ‘context data flows described in it are system with a single bubble; the only sulates the whole an example of such a context to the system. Figure 13.6 shows those that are external Of course, each system can have only one diagram for a readily recognizable system. context diagram. tice it is often difficult to avoid making choices that will effectively constrain some to avoid making choices that tice it is often difficult although the analyst is in the general form of the final solution, architectural choices although analysis is not strictly the former wherever possible. So, encouraged to avoid is such that it should really be process, the reality of the situation a part of the design included in this chapter. problem-driven in nature, while Structured Design is concerned with the form of the with the form of is concerned Structured Design in nature, while problem-driven that forms use of those diagrammatical process makes For that reason, each solution. levels of abstraction. for the necessary and provide its particular purpose best support the should constrain to do. Ideally this what the system is that describes specification However, in prac- as little as possible. (solution) eventual implementation form of the Figure 13.6 SDC13 9/18/07 11:14 AM Page 265 AM Page 11:14 9/18/07 SDC13 DFDs, which use more abstract terms to describe the oper- more abstract terms to describe the DFDs, which use DFDs to describe the initial system model in terms of relatively the initial system model in terms of DFDs to describe logical physical As with all apparently simple notations, actually producing a DFD requires a As with all apparently simple notations, actually producing a DFD requires Of course, there are many aspects of a problem that cannot be captured easily by Of course, there are many aspects of work inwards from these, if appropriate, otherwise outwards from the centre; begin the task of identifying operations by considering the inputs and outputs of the begin the task of identifying operations by considering the inputs and outputs system, since these are normally well defined in the user’s requirements documents; size of messages ‘lifetime’ of an item of information frequency of information flow volume of data flow drawing and so on); names for users, form numbers, concrete items (explicit constructing ations and data flow. from this point may then be either compositional, in the sense of grouping related of grouping in the sense compositional, be either may then this point from tech- using top-down or decompositional, of DFD, level a higher to form functions refine the description. niques to n degree of practice. Both De Marco and Page-Jones offer suggestions to assist the in- degree of practice. Both De Marco and Page-Jones offer suggestions to variations experienced with this task (as do most textbooks that describe the different of this method). Some of the useful practices that are recommended are: n n n be a significant factor to be considered, in addi- In some cases, the flow of control may element (Ward, 1986). tion to any consideration of the data-flow large system, where the final DFDs identify very many processes, the data dictionary large system, where the final DFDs information about the problem may also need to will be correspondingly large.) Other a complete model, such as be captured if the designer is to produce n n using the DFD as the sole basis for the designer’s model. Among other things, DFDs using the DFD as the sole basis for flow of information, and not with its form or are concerned only with describing the DFD needs to be supplemented by other forms, its persistence. For that reason, the on the problem itself. Besides the possible use of with the choice of these depending a need for some form of data dictionary. (In a P-Specs, there will almost certainly be Examples of these roles were given in Section 7.2.1. The advantage of this subdivision roles were given in Section 7.2.1. The Examples of these the first place, and it can more DFD is often easier to produce in is that the physical their problem in terms of its the users (who can directly identify easily be verified with valuable in terms of the next However, the logical DFD is more descriptive forms). also provide more insight into the design problem steps in the design process, and may itself. 1978; Page-Jones, 1988): 1978; Page-Jones, n n In producing the DFDs that form a major output from this step, the analyst (to employ from this step, form a major output the DFDs that In producing purposes (De Marco, use them for two is encouraged to usually adopted) the term </p><p>Structured systems analysis and systems design 266 SDC13 9/18/07 11:14 AM Page 266 AM Page 11:14 9/18/07 SDC13 The SSA/SD process 267 , models whereas a flowchart system statement in the program’s main body to that will eventually be used to implement the to implement eventually be used that will switch machine that this generates in terms of output from the system; that this generates in terms of output that is applied to the system to inform it about the event; that is applied to the system to inform that is performed by the system as a result of the stimulus; that is performed by the system as a that this has upon the environment. in the system’s environment that causes the transaction to occur; in the system’s environment that causes effect event stimulus activity response The later regrouping of the Structure Charts produced for each transaction may The later regrouping of the Structure Charts produced for each transaction The Transaction Analysis step can therefore be regarded as being largely concerned The Transaction Analysis step can therefore have five basic components: A transaction is usually considered to the the the the the system). label carefully (following this advice is much harder than you might think); might than you harder is much this advice (following carefully label since they will at this stage, and error conditions to handle exceptions don’t try rest of the model; obscure the used to model the (DFDs are don’t flowchart of the the operations n n n n n with architectural design choices, with its process part being chiefly concerned with the with architectural design choices, with it is not quite so simple as that, as it is also identification of transactions. However, issues about structure in anticipation of the final necessary to consider some detailed transactions. task of recombining the transformed a large design into a network of cooperating subsystems, and this is done by identify- a large design into a network of cooperating in the problem as a whole. The DFD components ing the transactions that are involved are then grouped together and used as input to a that correspond to each transaction the resulting Structure Charts are recombined to Transform Analysis step, after which system. Figure 13.7 shows this process, provide the design model for the complete in abstract form. together with those of steps 4 and 5, 13.3.2 Analysis 3: Transaction Step because this is not a major this step will be relatively brief, partly The description of for less complex systems it may even not be design transformation and partly because of this step is to separate the components of required. The main purpose of the actions Whatever the technique adopted (and however extensive the experience of the ana- adopted (and however extensive Whatever the technique than to attempt to distort a to be prepared to begin again, rather lyst), it is essential more convincing arguments for wrong. (This provides one of the model that is clearly some unfamiliar CASE tool, with paper and pencil rather than performing this task is then much lower!) time and effort of starting again since the cost in personal n n n organizing an initial CASE or event. identify which transaction should be selected in response to a particular Figure 13.8 shows a simple example of a transaction that might occur in a particular Figure 13.8 shows a simple example of a transaction that might occur in system (in this case, a banking system). more than not necessarily be a complex one. For some problems, it may involve little SDC13 9/18/07 11:14 AM Page 267 AM Page 11:14 9/18/07 SDC13 Transaction Analysis logic. Figure 13.7 (a) A complete system DFD from steps 1 and 2. (b) Step 3 Transaction Analysis divides into smaller DFDs. (c) Transform Analysis creates Structure Charts in step 4. (d) Structure Charts recombined in step 5.</p><p>Structured systems analysis and systems design 268 SDC13 9/18/07 11:14 AM Page 268 AM Page 11:14 9/18/07 SDC13 The SSA/SD process 269 con- flow, while that in a Structure Chart depicts data in the DFD. The central transform is the bubble that lies at the in the DFD. The central transform is A simple example of a transaction. A simple example of A feature of this process that sometimes gives conceptual difficulty is that the flow A feature of this process that sometimes gives conceptual difficulty is that The basic form of the operations that are involved in the Transform Analysis step The basic form of the operations that To see how this is done, we will first work through an outline description of the To see how this is done, we will first identify the operation or ‘bubble’ that acts as The first action of the designer is to flow (via subprogram invocation). The latter are added in this design step, and the flow (via subprogram invocation). The latter are added in this design step, central transform former are subsumed into the data flow that is conducted via the parameters of the former are subsumed into the data flow that is conducted via the parameters subprograms. trol arcs into invocation arcs (together with data flow), in order to form the initial draft of arcs into invocation arcs (together with data flow), in order to form the initial the Structure Chart. made. This is arrows on the arcs seem to change direction when this transformation is because the arc in a DFD depicts is depicted in Figure 13.9. A useful analogy is that used by Meilir Page-Jones (1988), is depicted in Figure 13.9. A useful analogy the DFD as being a ‘set of balloons, linked by in which he suggests that we regard up the central transform balloon, letting the strings’. To create the hierarchy, pick the central transform into the ‘main body’ of the others dangle from it, and then turn the balloons) rather hard: square off the bal- program. To stretch the analogy (and first-cut subprograms, and turn the data-flow loons, so that the ‘operations’ become with physical input/output devices). On occasion, however, it is not possible to iden- with physical input/output devices). transform, and in such a case the recom- tify a clear candidate to act as the central a further bubble in the position where the mended practice is to create one – adding occur. (While this may seem to be a slightly designer feels a central transform should given when we seek to interpret the transform odd practice, a rationale for it will be structures.) general form of this step, and will then seek to interpret the actions and operations in general form of this step, and will then the design process. terms of our more general model of the – where these are considered to have their most centre of input and output data flow take their most concrete form when interacting abstract form (on the basis that they takes the non-hierarchical model constructed to describe the problem, modelled model constructed to describe takes the non-hierarchical this to create a descrip- data between operations, and transforms around the flow of is modelled in terms of the of a computer program. This in turn tion of the structure are called (invoked), together the order in which subprograms hierarchy formed from of parameters and shared data created through the use with the flow of information structures. Figure 13.8 13.3.3 Analysis Transform Step 4: and is performed on the is the key transformation of this method, Transform Analysis is in this step that the designer to describe a given transaction. It DFD that is created SDC13 9/18/07 11:14 AM Page 269 AM Page 11:14 9/18/07 SDC13 , while the latter describes a problem The operations of the Transform Analysis step. The operations of the in terms of a hierarchy of program units. That apart, both describe a system in terms of a hierarchy of program units. Once the first-cut Structure Chart has been produced in this way, quite a lot Once the first-cut Structure Chart has been produced in this way, quite This explains why it is sometimes necessary to create a central transform in order This explains why it is sometimes necessary In order to do this, it is necessary to be able to identify exactly where in the even- In order to do this, it is necessary to While this is by no means all that is involved in the Transform Analysis step, since While this is by no means all that is involved and the Structure Chart is that the former is A major distinction between the DFD Figure 13.9 of work remains form into one that is appropriate for to be done in revising its proves to be necessary corresponds to a situation where the chief role of the main body proves to be necessary corresponds to a situation where the chief role of the Since of the final program is to organize the sequencing of the calls to the subprograms. it is such a program main body performs no specific problem-oriented operations, needs to be unlikely to be identified as a bubble in creating the DFD. This is why it the DFD so added to the DFD in the form of an ‘empty bubble’, in order to ‘complete’ manner. that the Transform Analysis operations can be performed in a consistent tual subprogram invocation hierarchy each operation will need to be positioned. Not tual subprogram invocation hierarchy concerned with physical input/output are surprisingly, the operations most closely of the Structure Chart, while the most abstract mapped onto the procedures at the base central transform and the bubbles immediately operations (as represented by the level of the chart. around it) are mapped onto the top process. A system in which this extra step to be able to perform the transformation solution can conveniently be packaged into subpro- in terms of operations (which, of course, transfer) of information around the system. It grams), and in terms of the flow (or transformation process by making a one-to-one is therefore reasonable to begin the even though this may later require refinement. mapping of bubbles to subprograms, a lot of work remains to be done to produce a proper Structure Chart that describes a lot of work remains to be done to is sufficient for our immediate purposes, since it the form of the eventual system, it it contains. We now need to con- explains the essential nature of the <a href="/tags/Transformation_design/" rel="tag">transformation design</a> process. sider the implications of this for the of the non-sequential and describes the structure</p><p>Structured systems analysis and systems design 270 SDC13 9/18/07 11:14 AM Page 270 AM Page 11:14 9/18/07 SDC13 The SSA/SD process 271 the design process the design to indicate the Context Diagram. The elaboration of the c ⎞ ⎟ ⎟ ⎟ ⎠ f b c d c c c c D ∅ ∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎝ → 0 E</p><p>⎞ ⎟ ⎟ ⎟ ⎠ d c f b Transform Analysis is therefore a complex step, and in this subsection only a very is therefore a complex step, and in Transform Analysis ∅ ∅ R R ⎛ ⎜ ⎜ ⎜ ⎝</p><p>Context Diagram then produces the top-level system description: We have used the subscript Step 1: Constructing the initial DFD effectively forms its input, we can consider this Because the requirements document of this that concentrates on the func- initial step as being to produce an elaboration is particularly evident if we consider the creation tionality of the eventual system. This being an intermediate step which has the follow- of a ‘black box’ Context Diagram as ing form: The characteristic features of this method are particularly well illustrated by using The characteristic features of this method in Chapter 9. So in this subsection we the D-matrix notation which was introduced of the processes that were described in the employ this notation to provide a summary preceding subsections. receive information), the linking may involve little more than adding a new top-level receive information), the linking may Equally, there may be some need to ration- module that selects among the transactions. there is the risk of some duplication occurring in alize the lower-level modules, since their operations. 13.3.5 process Summary of the design 13.3.4 5: Completing Step of separate transactions, Analysis step has identified a number Where the Transaction produced for the different bringing together the Structure Charts step 5 will involve between these. As already men- any overlaps or mismatches transactions and resolving essentially distinct options (as, for example, in a tioned, for systems in which these are may opt to deposit money, receive money or bank autoteller system, where the user general outline of the principal actions that it involves has been given. However, this the principal actions that it involves general outline of of the nature and form of be sufficient to provide an understanding description should to be described in a leaving the details of the various refinements this transformation, more specialized text. implementation with a hierarchy of subprograms. Almost certainly, there will be addi- there will Almost certainly, of subprograms. hierarchy with a implementation the func- output; and of any input forms the detailed sort out to work needed tional or combined between subprograms, may need to be split DFD operations tions of the met need to be and exception-handling of initialization and the needs in some cases; con- there is a need to top of all that, modules. On creation of additional through the such by considering to maintain these created, and quality of the structures sider the and information-hiding. coupling, cohesion factors as SDC13 9/18/07 11:14 AM Page 271 AM Page 11:14 9/18/07 SDC13 , m ≤ n ) is the number of elements in j ( j m ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ () () () () d f mj b mj c mj mmj ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ d f m c m b m m D ...... d 22 1, and where ff ≥ dd bb cc 12 12 12 12 j DD D DD D ∅∅ ∅ ∅∅ ∅ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ff ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ d bb cc 12 12 d n f 12 1 b n c n n DD D DD ∅∅ ∅ ∅∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ j U ...... → → 3 2 E E ff bb dd cc may differ between the two matrices. 12 12 12 12</p><p> i ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ DD D ∅∅ ∅ ∅∅ ∅ ∅∅ ∅ d f d n f n c n b n c n n n ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ b n 0 → to represent the information that is added in the Data Dictionary: that is added in the Data to represent the information ...... 1 i d E D</p><p>⎞ ⎟ ⎟ ⎟ ⎠ ff ff f dd cc bb bb dd cc b c d c c c c 12 12 12 12 12 12 12 12 th DFD. DD D DD D DD D D ∅∅ ∅ ∅∅ ∅ ∅∅ ∅∅ ∅ ∅∅ ∅ ∅ ∅ ∅ j ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎝</p><p>In this transformation step, we add the constructional information to each of our sub- In this transformation step, we add the constructional information to each matrices, which leads to a set of transformations of the following form: where the number of transactions the Step 4: Transform Analysis Step 3: Transaction Analysis set of DFDs, we can represent this (in a slightly Since this partitions our DFD into a of set notation with matrix notation! Again, this clumsy manner) by mixing elements is an elaboration step: When using a decompositional strategy we would normally expect that When using a decompositional strategy for rationalization of the elements, this is not although, since there is also scope numbering of the actual elements may be rather necessarily always the case. Also, the For this very simple demonstration we have different as a result of this refinement. design steps we should remember that the ignored this, but when modelling actual identity of element Step 2: Refine the DFD and expand Step 2: Refine the STDs or ERDs in this step) and approach (ignoring the use of If we stay with a ‘vanilla’ being developed, then this description is the main element assume that the functional However, we have included the of the functional elements. step is largely an expansion elements </p><p>Structured systems analysis and systems design 272 SDC13 9/18/07 11:14 AM Page 272 AM Page 11:14 9/18/07 SDC13 The role of heuristics in SSA/SD 273 to emphasize that this is an to emphasize that d ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ j d n b n c n ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ f n () () () d mj b mj () c mj f mj ...... elements should be preserved across this elements should be f 2 f i ddd ...... D 2 dd cc bb 12 dd 12 12 f 1 DD D DD D ∅∅ ∅ d ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ dd cc bb 12 12 12 fff 1 DD D DD D ∅∅ ∅ d ⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ → 5 E → 4</p><p> j T ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟</p><p>() () () j d mj b mj () c mj ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ f mj () () () () d f mj b mj c mj mj ...... cc dd bb 12 12 12 ff 12 DD D DD D ∅∅ ∅ dd d ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ff dd bb cc j 12 12 12 12 Indeed, the very act of identifying the central transform during Transform a further The technique of levelling, as used for developing a DFD, is probably We have already encountered one significant example of a heuristic of this type, We have already encountered one significant DD D DD D ∅∅ ∅ ∅∅ ∅ ∑ ⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝</p><p> candidate for classification as a heuristic, since the available guidelines are rules of candidate for classification as a heuristic, since the available guidelines during thumb rather than systematic rules. However, since it is a normal operation Analysis is itself a form of heuristic. There are no prescriptive guidelines for perform- Analysis is itself a form of heuristic. There are no prescriptive guidelines different in ing this task, and the results of selecting different candidates will be quite where the their structure, as is demonstrated in the simple example in Figure 13.10, seen. effects of selecting different candidates to be the central transform can be the form of the process that led to it. central transform when there is no obvious suit- which is that of devising an ‘empty’ of the use of a design heuristic to assist with able candidate. This is a prime example guidance on the restructuring of a design the design transformations, as it provides to allow a particular transformation to be model (which in itself may be quite correct) applied to it. 13.4 in SSA/SD of heuristics The role SSA/SD, and the number of variations in the form The relatively relaxed structuring of harder to classify and identify well-defined forms of the process, has the result that it is of heuristics. So the type of heuristic that of problem that can lead to the development related to the form of the solution rather than to has evolved is likely to be one that is Step 5: Completing the design process Step 5: Completing the Structure Charts, which we represents a ‘bringing together’ of For our purpose, this very simplified manner as shown below: can represent in a (One question that arises is whether the (One question that to omit these. However, since Budgen (1995) the preference was transformation. In exposition we have retained of subprogram functionality, in this they do form the basis to the use of a lower case letter them, while changing indirect description.) SDC13 9/18/07 11:14 AM Page 273 AM Page 11:14 9/18/07 SDC13 Selecting the central transform. (a) The DFD. (b) Choose bubble B. Selecting the central transform. (a) The DFD. Evidently the heuristics in SSA/SD use are very likely to appear during ‘normal’ A second heuristic of this type is known as ‘factoring’. This is a technique used for A second heuristic of this type is known to help with clarification of functions (and hence to assist with future changes); to help with clarification of functions of operations; to help identify and reduce duplication to help with reuse of code. to reduce module size (and hence complexity); the regular design transformations. This is in contrast to the use of JSP, described the regular design transformations. This is in contrast to the use of JSP, only if in the next chapter, where techniques such as program inversion are required were introduced in Chapter 4 (page 77). Clearly, any factoring that we perform will were introduced in Chapter 4 (page 77). Clearly, any factoring that we heuristics, need to take these into account. So these too might be considered as design with design in that they can be used to help resolve particular issues and to assist choices. of of the method, and so are largely concerned with assisting in the performance n n n are the concepts of coupling and cohesion, which Associated with the idea of factoring used for performing the operation, rather than with the act of performing it. used for performing the operation, rather where the operations of one module are separating out functions within a module, There are a number of reasons why we might contained in the structure of another. want to do this, some of which are: n Figure 13.10 A. (c) Choose bubble C. (d) Choose bubble element is really concerned with the rules Structured Systems Analysis, the heuristic</p><p>Structured systems analysis and systems design 274 SDC13 9/18/07 11:14 AM Page 274 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 275 : essentially refinements that have been added to the basic model over : essentially refinements that have been : new features have been added to the process model, and new view- been added to the process model, : new features have : the overall form of the process does not differ significantly, but slightly the process does not differ significantly, : the overall form of Developments structure of the transformations. Much of time without affecting the fundamental the techniques used for data modelling the effort has been directed at improving models (Page-Jones, 1988)). (such as the addition of entity–relationship Extensions Most of these have been included in the representation part. points have been (remember that this with design in the real-time domain directed at assisting needs), and so these have developed to meet data-processing method was essentially in the design process. the use of the behavioural viewpoint tended to enhance Ward and Mellor (1985), Hatley and Pirbhai Particular examples are those due to (1988) and Gomaa (1986; 1989). Variations are a number of these, with or process models are used. There different notations and Sarsen (1979). being that popularized by Gane perhaps the best known with the aim of using the documentation to help produce a ‘call graph’, using a form with the aim of using the documentation to help produce a ‘call graph’, of the similar to that of the Structure Chart, that describes the invocation hierarchy tration of the ‘exploratory’ nature of the design process. The problem software util- The problem chosen for this example is based on the development of a program, ity that can be used to provide outline design documentation for an existing 13.6 an outline example SSA/SD: use of an analysis and design method such as A fully worked out example of the However, as this is the first such method we SSA/SD is outwith the scope of this book. example that is provided here may help to have described, the fairly simple worked mechanisms involved. It also provides an illus- give a strategic understanding of the its most refined state of development in the description provided in Yourdon (1989). its most refined state of development that have quite different design processes The extensions are in many ways methods and the design parts. While, from a meth- and models, in terms of both the analysis separate attention, time and space have not odological point of view, these merit features in this book. permitted a separate survey of their n can probably be considered as having reached The development of the basic method n since SSA/SD has spawned These can be classified as: a wide variety of derivatives. n the transformations generate a certain type of solution, and so where heuristics are heuristics so where and of solution, certain type a generate the transformations process. the design stage of a later only during used 13.5 of SSA/SD Extended forms title, in its and ‘developments’ include the terms ‘variations’ should perhaps This section SDC13 9/18/07 11:14 AM Page 275 AM Page 11:14 9/18/07 SDC13 tools provided with the Unix operating system. However, to provide the Unix operating system. However, tools provided with A ‘call graph’ describing a program. (Procedure G is recursive.) yacc and While this requirements specification is not a very rigorous or complete one, it While this requirements specification In its simplest form, the output from our ‘reversing’ program can simply show the In its simplest form, the output from To perform its task, the program will need to read through the source code of a the program will need to read through To perform its task, Since the main requirement is to design a program that will be able to recognize is to design a program that Since the main requirement To make the task somewhat simpler, the program being analysed is to be written being analysed simpler, the program the task somewhat To make Figure 13.11 is probably not atypical of those often encountered, since few end-users are likely to is probably not atypical of those often information about the formal parameters used for the procedures. Figure 13.11 shows information about the formal parameters of a fairly simple program, while Figure 13.12 a call graph that describes the form our ‘reversing’ program might produce from its shows the type of output listing that program, which can then be used to draw analysis of the code for the corresponding that call graph. So for each procedure that is declared in the input source program, this ‘reversing’ pro- So for each procedure that is declared the procedures that it calls, either directly, or by gram will need to print out a list of information can then be used to construct the making use of other procedures. This attempt to develop the graphical routines that eventual Structure Chart. (We will not directly from our program.) would be needed for constructing this text, but of course there is also scope to include calling hierarchy for the input source unconstrained situation, it would probably be most sensible to adopt a ‘template’ it would probably be most unconstrained situation, of such software tools as the of the system, involving the use approach to the design lex instead. we will use the SSA/SD strategies the desired example, forms of the relationships among its procedures. program and identify the extent and pilation, we should probably still adopt a strategy of ‘separation of concerns’ in the probably still adopt a strategy of pilation, we should by using the simplest solution, and begin the task of exploration development of our file. case of the single source in the input source file, the procedures and any calls to procedures any declarations of used in compiling. So, in an are likely to be closely allied to those techniques involved input program. In effect this can be considered as a form of ‘<a href="/tags/Reverse_engineering/" rel="tag">reverse engineering</a>’ process engineering’ form of ‘reverse as a be considered this can In effect program. input working that the ensuring by of a program, the maintenance to aid can be used that of the program. the actual structure faithfully reflects documentation subprograms (proced- that all the Pascal, so ensuring such as ‘standard’ in a language our were to modify even if we source file. However, contained in a single ures) are or independent com- permitted separate languages that programming goals to include</p><p>Structured systems analysis and systems design 276 SDC13 9/18/07 11:14 AM Page 276 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 277 Outline of the output form describing the program shown in Figure 13.11. Outline of the output form describing the Context diagram for the ‘reversing’ program. The Structured Systems Analysis step which is shown in Figure 13.13. For this We begin by producing the context diagram, has a fairly simple dataflow architectural particular problem, which, like a compiler, have the skills necessary to construct detailed requirements documents. (Indeed, where have the skills necessary to construct attempting to identify the complete requirements relatively new products are involved, One of the benefits of an initial pre-design stage in advance may not even be desirable.) Systems Analysis is the opportunity to clarify and such as that provided by Structured any significant omissions. resolve any ambiguities and identify Figure 13.12 Figure 13.13 SDC13 9/18/07 11:14 AM Page 277 AM Page 11:14 9/18/07 SDC13 A first DFD for the ‘reversing’ program. As it happens, further expansion of the DFD shown in Figure 13.14 leads rapidly As it happens, further expansion of the DFD shown in Figure 13.14 leads Figure 13.14 shows a first attempt to produce a DFD describing this system. As Figure 13.14 shows a first attempt to To develop the DFD, it is necessary to choose between top-down decomposition To develop the DFD, it is necessary Figure 13.14 to the conclusion that we have not chosen a particularly good set of basic oper- to the conclusion that we have not chosen a particularly good set of too vague, so ations. This is partly because operations such as ‘parse’ and ‘build’ are tinue to concentrate on the more abstract task of analysis at this stage. (This point has tinue to concentrate on the more abstract task of analysis at this stage. (This with that been raised here to demonstrate how easily the task of analysis can overlap by a con- of design unless we take care to maintain an appropriate level of abstraction a scious effort. It also demonstrates how the design process might use note-making: note of the above point should be made for consideration at a later stage.) absence of any features that indicate that either technique is likely to be the more absence of any features that indicate appropriate. raises questions about the problem that lead us to often occurs in such a situation, this an obvious question that might arise is whether refine or recreate the DFD. In this case, the source file more than once. But we should the solution will permit reading through eventual implementation in this way, and con- avoid being diverted into considering style, the context diagram is relatively simple, since there will be little or no interaction style, the context diagram is relatively between the program and the user. necessarily associated with external actions: an and event-partitioning. (Events are not the recognition of a particular reserved word ‘event’ in this context might well involve the more basic top-down approach, in the in the input.) In this case we will adopt</p><p>Structured systems analysis and systems design 278 SDC13 9/18/07 11:14 AM Page 278 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 279 A second DFD for the ‘reversing’ program. The process of levelling the DFD by expanding the bubbles can then be pursued The process of levelling the DFD by expanding the bubbles can then be The data elements involved in this problem are not particularly complex, and so The data elements involved in this problem are not particularly complex, Figure 13.15 until the designer determines that a suitable level of abstraction has been reached. until the designer determines that a suitable level of abstraction has been the development of a more comprehensive description via such forms as the Entity– the development of a more comprehensive description via such forms as <a href="/tags/Data_structure_diagram/" rel="tag">data Structure Diagram</a> is not really necessary. Figure 13.16 shows a simple first-level ques- dictionary, together with some notes that show where the designer has identified of notes is, tions that will need to be resolved at some point in the future. The making of course, a well-recognized practice already discussed in earlier chapters. strain the solution to one that reads through the program source file only once gives a strain the solution to one that reads the operations in bubbles 1 and 3. Figure 13.15 convoluted form to the expansions of a DFD, drawing on the experience of attempting shows a second attempt to construct point in showing this is to emphasize that we will to expand the first form. (Again, the on the first attempt, and that a designer should not necessarily find a ‘good’ solution a model if it fails to meet all the requirements, be prepared to revise or even discard so gained.) and to develop anew with the experience complicating the task of expanding the bubbles, and also because attempting to con- complicating the task of expanding SDC13 9/18/07 11:14 AM Page 279 AM Page 11:14 9/18/07 SDC13 Further expansion of the top-level DFD for the ‘reversing’ program. It involves A first expansion of a DFD bubble. A data dictionary for the ‘reversing’ program. A data dictionary for than levelled). For the moment there is no obvious expansion of bubble 2 and so this than levelled). For the moment there is no obvious expansion of bubble is left for future consideration. Figure 13.18 some global knowledge about ‘level’. the bubbles Figures 13.17 and 13.18 show examples of such refinements for three of rather in the top-level DFD (in the case of bubble 4, its description has been refined Figure 13.17 Figure 13.16</p><p>Structured systems analysis and systems design 280 SDC13 9/18/07 11:14 AM Page 280 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 281 A more detailed DFD for the ‘reversing’ program. The analysis stage is also likely to form a significant source of designer’s notes, The analysis stage is also likely to form a significant source of designer’s The eventual DFD is shown in Figure 13.19, while Figure 13.20 shows a further The eventual DFD is shown in Figure Figure 13.19 simple an approach to tracing procedure calls would be likely to throw the ‘reversing’ simple an approach to tracing procedure calls would be likely to throw the program into an infinite loop when it encountered a recursive procedure. be necessary to use only the more abstract levels for the initial steps of the design be necessary to use only the more abstract levels for the initial steps process. at this level where particular problems have been recognized but cannot be solved likely to be of abstraction. One example of such note-making for this problem is since too prompted by the need to recognize the presence of recursive procedure calls, refinement of the data dictionary; but there are still some issues needing to be resolved. refinement of the data dictionary; but is not particularly large, and so we can proceed For this problem, the eventual DFD Structured Design. For a larger system, it might to use it in full for the process of SDC13 9/18/07 11:14 AM Page 281 AM Page 11:14 9/18/07 SDC13 A revised data dictionary. While this has not been expanded fully, some of the A revised data dictionary. While this has structure needed in order to produce the final output. recognizing the procedure declarations; and the data recognizing the procedure invocations (calls) and linking these to create mainly concerned with the creation and manipulation of the central information struc- mainly concerned with the creation and manipulation of the central information are clearly tures that describe the form of the program being analysed. Indeed, there two stages to the solution as adopted, namely: n n The Transform Analysis step successfully to produce a well-balanced design The key action that must be undertaken In this problem neither the input data flows nor is that of finding the central transform. significant features of the problem, which is the output data flows are particularly The Transaction Analysis step essentially only a single transaction, and so there For this particular problem, there is separate transactions. is no need to separate out the DFD into Figure 13.20 Notes of both questions and answers should be questions raised have already been answered. kept on record in the data dictionary.</p><p>Structured systems analysis and systems design 282 SDC13 9/18/07 11:14 AM Page 282 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 283 Adding the new ‘boss’ bubble to the DFD. Figure 13.22 shows the result of performing the first step in the transforma- Figure 13.21 tion process, lifting the new bubble to the top of the diagram and letting the others tion process, lifting the new bubble to the top of the diagram and letting (Figure 13.19) as candidates for the central transform, none of them are particularly (Figure 13.19) as candidates for the central transform, none of them are the program suitable, since no bubble occupies a place between the two main tasks of between as a whole. So this is where we create a further ‘boss’ bubble, positioned in Fig- bubbles 2 and 5. The new DFD that can then be produced from this is shown ure 13.21, and the new bubble will be used as the central transform. It turns out that, if we assess the qualities of any of the existing bubbles in the DFD It turns out that, if we assess the qualities SDC13 9/18/07 11:14 AM Page 283 AM Page 11:14 9/18/07 SDC13 First step in reorganizing the components of the DFD. First step in reorganizing the components Finally, Figure 13.24 shows a rather more refined development of the Structure Finally, Figure 13.24 shows a rather tained in a single procedure; adding error-handling functions; adding the details for initialization and termination. providing read and write modules; are really too large and complex to be con- factoring out some of the functions that successful, in that the result appears to be a quite well-balanced tree of procedure successful, in that the result appears to be a quite well-balanced tree calls. n n been fairly However, within those limitations the choice of the central transform has Chart, although obviously this is still by no means complete: lacking details of the Chart, although obviously this is still such issues as: ‘parsing task’, we still need to address n n trail below. The result of some squaring off and resolving of flows is then shown in trail below. The result of some squaring Chart describing the solution. This also reveals Figure 13.23: the first rough Structure has not yet been addressed and so will form a that the question of parsing the input (so perhaps we can make use of some degree of subproblem to be resolved separately stylized design, anyway). Figure 13.22</p><p>Structured systems analysis and systems design 284 SDC13 9/18/07 11:14 AM Page 284 AM Page 11:14 9/18/07 SDC13 SSA/SD: an outline example 285 First rough Structure Chart. As with all examples, this one is, of course, very much simplified. As a practical As with all examples, this one is, of course, very much simplified. As a Figure 13.23 vent the inclusion of such iterations in this chapter, but their presence should not be vent the inclusion of such iterations in this chapter, but their presence should forgotten. point, it should also be observed that producing even this first rough design required point, it should also be observed that producing even this first rough design the decision a number of attempts at performing the Transform Analysis step before of space pre- was made to adopt an empty central transform. The practical limitations SDC13 9/18/07 11:14 AM Page 285 AM Page 11:14 9/18/07 SDC13 A more refined Structure Chart. (Items A and B require further expansion.) A more refined Structure Chart. (Items A and Summary The practices of Structured Systems Analysis have provided a very powerful set of techniques that The practices of Structured Systems Analysis have provided a very powerful set of techniques design, it is can be used to assist with the initial stages of systems design. While analysis is not this point. Indeed, in much the same way that ALGOL 60 has influenced the form of many subse- this point. Indeed, in much the same way that ALGOL 60 has influenced the form subsequent quent programming languages, so SSA/SD has influenced the thinking behind many JSP method developments in design methods. It also provides an important contrast with the less prescript- described in the next chapter, both in its much wider scope and its (consequently) ive form. The very widespread use of the various forms of this method, together with its historical role The very widespread use of the various make this an important method to introduce at in the development of software design thinking, Figure 13.24</p><p>Structured systems analysis and systems design 286 SDC13 9/18/07 11:14 AM Page 286 AM Page 11:14 9/18/07 SDC13 Further reading 287 . Dorset House Englewood Cliffs, 2nd edn. Prentice- Yourdon Press Strategies for Real-Time System Specification The Practical Guide to Structured Systems Design. The Practical Guide to Structured Systems Modern Structured Analysis. <a href="/tags/Information_system/" rel="tag">Information System</a> Specification and Design Road Map. Information System Specification and Design Prentice-Hall International Hall International Further reading outstanding of these is: Hatley D.J. and Pirbhai I. (1988). Sets out one of the major forms of real-time extension in a clear and readable manner. Provides the guru’s own thoughts on developments in the method as a whole. Provides the guru’s own thoughts on developments covered by rather fewer textbooks. Probably the most The real-time forms of the method are As the title implies, this is mainly concerned with the Structured Design process, although it also As the title implies, this is mainly concerned Analysis. contains two useful chapters on Structured Yourdon E. (1989). Provides a quite comprehensive example of the use of this method and also shows how the same Provides a quite comprehensive example of other design strategies. problem can be tackled using a number Page-Jones M. (1988). encounter structures that were produced through its use. encounter structures that were produced Connor D. (1985). viewpoint have also been recognized, as has been shown by the later developments and exten- been recognized, as has been shown by viewpoint have also adopted into the method. sions that have been since the late 1980s and the been no really significant developments As a method, there have to merit study both because of its in Yourdon (1989). However it continues YSM form described (Avison and Fitzgerald, 1995), and also because influence on the development of later methods undertaking ‘maintenance’ activities may well its widespread use means that any designer activities of the design process than the later ones. Structured Design is certainly not a simple process than the later ones. Structured activities of the design be very effective in practice. in a rigorous manner, although it can process if it is performed Analysis and Structured Design content of Structured Systems Overall, the strong imperative who have been brought up assisted with their wide adoption by designers practices has certainly placing undue emphasis on one tradition. However, the limitations of in the same imperative an essential precursor, and provides the initial problem modelling step that the designer is the designer step that modelling problem the initial provides and precursor, an essential title the distinction of a case for arguing that Indeed, there is perform at some point. required to ana- should perform the is the designer who of role, in that it encourage a separation should not the problem. understanding of a part of gaining an lysis task as in its entirety, perhaps less widely adopted would seem to be Design component The Structured about the earlier they are more prescriptive methods, that general feature of design reflecting a SDC13 9/18/07 11:14 AM Page 287 AM Page 11:14 9/18/07 SDC13 DFD for Exercise 13.2. and to provide pay statements showing amount paid and deductions (national insur- showing amount paid and deductions and to provide pay statements tax, regular subscriptions or donations). ance, pension, income (a)used as the central transform; your choice of the bubble that should be identify (b) of the bubbles around it; your reasons for rejecting the claims of each explain (c) Chart from it. produce a first-cut Structure provided, and consider the what forms of error-handling need to be cise 13.2. Describe effects of including these as: (a) part of the Structured Systems Analysis model; (b) extensions to the first-cut Structure Chart. (a) machine; a bank autoteller (b) program; a word-processing (c) each month, is required to produce a set of printed pay-cheques a payroll package that Exercises Figure 13.25 13.3used in Exer- procedures in the example system Consider the needs of any error-handling 13.2 For the DFD shown in Figure 13.25: 13.1 systems: each of the following the context diagram for Draw</p><p>Structured systems analysis and systems design 288 SDC13 9/18/07 11:14 AM Page 288 AM Page 11:14 9/18/07 SDC13 SDC14 9/18/07 11:16 AM Page 289</p><p> chapter 14 289 Jackson Structured Programming (JSP)</p><p>14.1 Some background to JSP 14.3 The JSP process 14.2 JSP representation forms 14.4 Some JSP heuristics</p><p>JSP is the first of two design methods developed by Michael Jackson that we will study. It can be considered as a ‘design method in miniature’, being directed at program design within a specific context and archi- tectural style (data-processing using sequential processes, which is essentially a pipe-and-filter style). Its well-defined and well-constrained objectives make it a suitable candidate for quite detailed study, and it provides a set of examples for all the components of the framework that we have developed. Its use of a compositional strategy offers some interesting contrasts with the strategy employed in the SSA/SD method that was described in the previous chapter.</p><p>As a consequence, this chapter offers a rather more detailed ‘method study’ than we have generally provided in this book. Two worked ex- amples are included that help not only to illustrate the method pro- cesses, but also to demonstrate some wider characteristics of the forms and limitations of design methods as a whole. pipe- design method. It is concerned with the design of design method. It is concerned with forms of design transformation than almost any other forms of design transformation than program prescriptive architectural style. Despite this, while historically it has often been viewed architectural style. Despite this, while Because of the well-rounded nature of JSP, significant extensions to its structure Because of the well-rounded nature software design methods begin by building In Chapter 8 it was suggested that all JSP is essentially a have well-defined input and output data streams. have well-defined input and output data are realizable as a single sequential process; It is an excellent example of the use of a compositional design strategy. of the use of a compositional It is an excellent example and widely used. It is well documented It has limited and well-defined applications, which make it possible to describe it well-defined applications, which make It has limited and It is therefore a good fully than most other design methods. more concisely yet method in this book. choice for the second widely used, and therefore in the early 1970s it has been Ever since its development to be discussed in depth. has a historical claim some form of ‘model’ of the problem that is to be solved. In the case of JSP, this model some form of ‘model’ of the problem that is to be solved. In the case of JSP, and output is constructed by modelling the sequencing of the elements in the input that are data streams; so the next section briefly reviews the forms of representation used for this purpose. cussion in the final section. Indeed, because it is a program design method, there is cussion in the final section. Indeed, design practices: one such example is SSADM scope to employ it in larger system for detailed design tasks. (Longworth, 1992) where it can be used that will be described here is essentially the have not been developed. So the method only form that is in widespread use. n to developing systems that employ a JSP is therefore particularly well-suited and-filter community, its use is by no means as primarily of interest to the data-processing be illustrated here by examples and in the dis- restricted to such problems, as will systematic design method, and this makes it possible to incorporate a greater degree of systematic design method, and this makes with other methods. verification than is generally practicable systems that n n n for developing ideas about the attributes that make JSP so valuable However, some of Because of its limited domain of application, design also have the potential to mislead. JSP provides more n n 14.1to JSP Some background have emerged from in this book that methods described of the two design JSP is one 15). It has been second is JSD, Chapter Jackson (the experiences of Michael ideas and for the following design method example of a software the second detailed chosen as reasons.</p><p>Jackson Structured Programming (JSP) 290 SDC14 9/18/07 11:16 AM Page 290 AM Page 11:16 9/18/07 SDC14 JSP representation forms 291 A Jackson Structure Diagram describing a static data structure (the structure of a JSP is unusual as a design method, in that it uses only a single diagrammatical form only a single diagrammatical in that it uses as a design method, JSP is unusual Figure 14.1 textbook). where its use for describing the sequences involved in both static data structures and the sequences involved in where its use for describing used in JSP for modelling both behaviour was demonstrated. It is dynamic program structuring of the pro- data objects of interest, and the functional the structures of the Figure 7.18 and 7.20, them. Figures 14.1 and 14.2 reproduce gram(s) that manipulate these roles; the rules for draw- Diagrams being used in both as examples of Structure in the box below. ing them are shown 14.2forms representation JSP been described in JSP have already that are used forms of representation Since the to a will be kept of this section 7, the discussion detail in Chapter in considerable minimum. in Section 7.2.5, Diagram introduced is the Structure This in its transformations. SDC14 9/18/07 11:16 AM Page 291 AM Page 11:16 9/18/07 SDC14 clause) ELSE A Jackson Structure Diagram describing a program that prints out bank A Jackson Structure Diagram describing a sequence is represented by unmarked boxes selection is represented by boxes marked with circles iteration is represented by an asterisked box sequencing is from left to right the three forms may not be mixed in a sequence the last selection part should always be conditionless (the Because JSP is concerned with program design, it places a strong emphasis on the Because JSP is concerned with program n n n n n Some rules for drawing Structure Diagrams n the design transformation process. development of algorithms, and the detailed forms for these are usually better des- development of algorithms, and the also makes use of pseudocode forms for the later cribed through the use of text. So JSP from the diagrammatical forms as a part of stages of design, with these being derived Figure 14.2 statements.</p><p>Jackson Structured Programming (JSP) 292 SDC14 9/18/07 11:16 AM Page 292 AM Page 11:16 9/18/07 SDC14 The JSP process 293 of diagram used remains the same, the form of it changes as a result of the transformation performed in step 2. of it changes as a result of the transformation Since JSP is often (unfairly) associated only with ‘classical’ data-processing prob- Since JSP is often (unfairly) associated only with ‘classical’ data-processing To illustrate the basic design process more fully, we will work through a short To illustrate the basic design process As already mentioned, JSP is unusual in that it uses only a single diagrammatical As already mentioned, JSP is unusual The first two steps are major ones, and may well require about half of the total The first two steps are major ones, points. streams. in the program Structure Diagram. operation to an element service pumps, each of which can be used to dispense both diesel fuel and unleaded service pumps, each of which can be used to dispense both diesel fuel and display of petrol. There is a small local computer in each pump that maintains the A petrol filling station (shown schematically in Figure 14.4) has a number of self- A petrol filling station (shown schematically in Figure 14.4) has a number lems based on handling files, with the final structures expressed in COBOL, the ex- lems based on handling files, with the final structures expressed in COBOL, basic system ample problem has been chosen to look as unlike this as possible. The requirement is as follows: interpretation 2 is that it involves a transformation from a Indeed, part of the complexity of step of data elements to a dynamic model of time- static model of sequential ordering ordered sequencing of program actions. on steps 1 to 3 of the design process, since it example of the use of JSP, concentrating of the method. is these that form the major components is not correct. JSP also incorporates a useful verification procedure that can be used to is not correct. JSP also incorporates by step 2 are consistent with those produced by check that the structures generated step 1. diagram in Figure 14.3 shows that form of description. However, the transformation the this is perhaps misleading, since while largely on consideration of algorithmic forms, and the JSP design process does not largely on consideration of algorithmic allocation to constructional units. address issues of modularity, such as relatively mechanical in nature, it is not neces- design effort. While step 1 may seem As a check on the results of step 2, experts sarily so, and step 2 is far from simple. encountered in performing the tasks of step 3 generally consider that any problems to indicate that the structure produced by step 2 (allocation of operations) are likely 4. decision specific conditions for any of the Convert the program to text without 5.iteration and selection operation. Add the conditions used for each is based on a strategy of producing a program As this shows, the JSP design method the task itself. This structure is therefore based structure that reflects the structure of 1. data each of the input and output Draw a Structure Diagram that describes 2. Structure Diagram. Merge these to form the program 3. each performed by the program, and allocate List the operations that need to be 14.3 process The JSP in sequence steps that are performed of five principal part of JSP consists The process be iterations between there will all design problems, of course, as with (although follows. be summarized as in these steps can tasks performed these). The SDC14 9/18/07 11:16 AM Page 293 AM Page 11:16 9/18/07 SDC14 The JSP design process. Figure 14.3</p><p>Jackson Structured Programming (JSP) 294 SDC14 9/18/07 11:17 AM Page 294 AM Page 11:17 9/18/07 SDC14 The JSP process 295 pump identity; volume of fuel; total cost pump identity; type of fuel; volume of fuel pump identity; type of fuel; volume of Schematic of a filling station. As an initial design specification, the one given above is somewhat imperfect, in As an initial design specification, the one given above is somewhat imperfect, socket, this computer sends a record to the cashier’s console computer, containing socket, this computer sends a record as the sequence: the details of the current transaction that receives these messages. For each mess- The problem is to design the software to generate a line on the printer positioned age it receives, the program is required of the transaction in terms of in front of the cashier, giving the details price and volume on the pump; when the customer returns the pump nozzle to its price and volume on the pump; when Figure 14.4 without this feature the problem would actually be a little too simple and so would fail without this feature the problem would actually be a little too simple and to illustrate some of the desired points! that although the computer in the pump calculates and displays the cost of the trans- that although the computer in the pump calculates and displays the cost have action, it does not send this information to the cashier’s console. We therefore for an a repeated calculation of the same ‘object’ value, which provides the potential computer’s inconsistency to occur. However, this is excused on the basis that the pump also, software has already been designed and implemented (a not untypical situation); (Since there are many pumps, there is of course the possibility that contention could (Since there are many pumps, there to send a message to the console. However, in arise when more than one pump tries design, we will leave this issue to be resolved the time-hallowed tradition of software hardware!) by the designers of the communication SDC14 9/18/07 11:17 AM Page 295 AM Page 11:17 9/18/07 SDC14 ; ; record record ut/output Structure Diagrams ut/output Structure consists of many instances of a consists of many instances of a field can specify the grade as either: The filling-station Structure Diagram for the input data stream. The filling-station Structure Diagram for the consists of the sequence: consists of the sequence: type of fuel sales record stream pump record stream unleaded petrol diesel fuel. pump identity type of fuel volume of fuel record record The form of the output data stream is shown in Figure 14.6, and again this can be The form of the output data stream is shown in Figure 14.6, and again this a the the the a n In this case, the structure of this record has been determined previously by the pump In this case, the structure of this record has been determined previously of the design designers, and hence it is assumed that it cannot be modified as a part process. interpreted as meaning that: n n preted as follows: n n 14.3.1 the inp Step 1: Draw undemanding one, since the system has just one On this occasion, this task is a fairly stream. The Structure Diagram for the input input data stream and one output data and the levels of abstraction for this can be inter- data stream is shown in Figure 14.5, Figure 14.5</p><p>Jackson Structured Programming (JSP) 296 SDC14 9/18/07 11:17 AM Page 296 AM Page 11:17 9/18/07 SDC14 The JSP process 297 . There is no attempt to consider how total cost and pump identity The filling-station Structure Diagram for the output data stream. The filling-station Structure pump identity volume of fuel total cost It is this step that leads to the conclusion that JSP should be classified as a method It is this step that leads to the conclusion that JSP should be classified as Note that at this level of design the designer is solely concerned with handling Note that at this level of design the step as demonstrated in our example risks The apparent simplicity of this first Figure 14.6 that uses a compositional design strategy, since the program structure is very much one that uses a compositional design strategy, since the program structure is very that is ‘composed’ by bringing together the input/output data structures. ‘P’ have been added to the labels of the boxes in order to emphasize whether data is ‘P’ have been added to the labels of the boxes in order to emphasize whether of this being ‘consumed’ or ‘produced’ in the given operation. (Much of the simplicity between the step as applied to the example comes from the relatively direct match new struc- input and output data forms. As a result, there is no need to introduce any problem.) tures or extra levels of abstraction, which might occur with a less tractable can form a significant proportion of the overall design effort required. can form a significant proportion of 14.3.2 Diagram Structure the program Step 2: Create part of the JSP process, although for this Without a doubt, this can be the hardest easy, as there are no contentions of structure to example it happens to be relatively is shown in Figure 14.7. The letters ‘C’ and resolve. The resulting program structure abstractions such as of text, number of digits and so on. these are to be realized in terms of strings can be described in this way, it should be being misleading. While many real problems descriptions in the form of Structure Diagrams noted that the task of producing correct There is obviously some scope to improve on this. One such improvement would be to There is obviously some scope to improve would print headings on a page and begin a add some degree of page-handling, which a set number of transactions. However, this is not new page after printing the details of it would be better to add this feature after the fundamental to the problem and hence Redesigning the system to include this feature basic structures have been established. reader! is therefore left as an exercise for the SDC14 9/18/07 11:17 AM Page 297 AM Page 11:17 9/18/07 SDC14 input data stream, perform a similar output , and delete all empty boxes. To check P and then removing any empty boxes. (Try C pump identity volume of fuel involves consuming information to indicate whether involves consuming information to of the transaction or type of fuel total cost type of fuel The filling-station program Structure Diagram. The filling-station program consuming and producing the consuming the consuming and producing the producing the unleaded petrol diesel fuel Using the same process of step-by-step elaboration of the diagrammatical descrip- Using the same process of step-by-step it is consuming the repeatedly consuming a new input record and generating a new output record; repeatedly consuming a new input record involves the following sequence of actions: consuming and producing new records data stream, erase all lines beginning with a whether the program tree is consistent with the exercise, erasing all lines beginning with form.) Where this as an exercise, and verify that each of these leaves the original input will, of the process of merging trees is more complex, then the verification process course, be correspondingly more complicated. The basic verification procedure that forms a part of this design step can be easily per- The basic verification procedure that the program tree is consistent with the formed in this instance. To check whether n tion as before, the operations of the program shown in Figure 14.7 can be described tion as before, the operations of the thus: n n Figure 14.7</p><p>Jackson Structured Programming (JSP) 298 SDC14 9/18/07 11:17 AM Page 298 AM Page 11:17 9/18/07 SDC14 The JSP process 299 The filling-station program: allocation of operations to program elements. (1) identity write pump (2) of fuel write volume (3) to customer write cost (4) identity obtain pump (5) of fuel obtain volume (6) of fuel obtain type (7) type price per unit by volume dispensed multiply These operations are then allocated to the elements in the program Structure These operations are then allocated For the filling-station system, the operations involved are the following: system, the operations involved are For the filling-station Figure 14.8 the reader to consider. (the operations are shown as small numbered Diagram, as shown in Figure 14.8 to attach an operation to a box at the base of boxes). Note that it is only meaningful since higher levels within the diagram ‘tree’ are any branch of the Structure Diagram, essentially abstractions of the base levels. Inputs headers and pagination to the output is left for Once again, the exercise of adding page this should be done, nor any direct way of checking for completeness. nor any direct way of checking for this should be done, Outputs 14.3.3 elements to program and allocate the operations 3: List Step task relatively simple that this is a example is such nature of the chosen Again, the describing the outputs emphasis on place their Since most requirements to perform. con- begin this task by well be better to a system, it may be produced from that are to and necessary inputs to identify the then using these outputs first, and sidering the how fast rule about to be no hard and there seems operations. However, algorithmic SDC14 9/18/07 11:17 AM Page 299 AM Page 11:17 9/18/07 SDC14 n(j) ... 1 th Structure Diagram. j j ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎟ () () () () d f nj nj b nj nj c th Structure Diagram, and the elements j ...... ff dd bb cc 12 12 12 12 denotes the DD D ∅∅ ∅ ∅∅ ∅ ∅∅ ∅ ⎛ ⎜ ⎜ ⎜ ⎜ ⎜ ⎝ j j U → The last two steps of JSP. The last two steps of 1 E</p><p>⎞ ⎟ ⎟ ⎟ ⎠ c f b d ∅ R R R ⎜ ⎜ ⎜ ⎝ ⎛</p><p> where the subscript represent the elements at the ‘leaf’ nodes of the Here we have used the same extended notation as was used in the previous chapter, Here we have used the same extended notation as was used in the previous structures will have been defined in some way. For that reason, we have modified the structures will have been defined in to explicitly recognize this. So our initial step description of the ‘requirements matrix’ to create the first set of Structure Diagrams consists of elaborating the requirements in the data: that are based upon the relationships plicity, this subsection uses the D-matrix to highlight the features of the first two key plicity, this subsection uses the D-matrix steps of the method. Diagrams Step 1: Draw the input/output Structure there is some initial expectation that these data One point highlighted by this is that to translate this into the chosen programming language in order to produce a usable to translate this into the chosen programming program. 14.3.5 process Summary of the design the JSP process means that using a D-matrix The relatively constrained nature of However, not least because of its relative sim- description offers only limited insight. 14.3.4 conditions to text and add program 4 and 5: Convert Steps problem. Figure 14.9 shows straightforward for this simple These steps are relatively the operations from step 3 structure that is generated by combining the basic program provides the sequencing infor- structure produced in step 2 (which with the program extension of this to incorporate the conditional mation). Step 5 then requires a simple to type of fuel. The remaining task is then expression used to select price according Figure 14.9</p><p>Jackson Structured Programming (JSP) 300 SDC14 9/18/07 11:17 AM Page 300 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 301 design method, and that no ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ is altered.) So now we go through is altered.) f b n c n n d n program ...... f 2 DDD f bb cc 12 12 1 dd 12 D ∅∅ ∅ ∅∅ ∅ dd d interpretation to show the change of emphasis to describing the to show the change ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ D → 2 T</p><p> j ⎟ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ () () () () d rather than f nj nj c nj b nj d ...... ff dd cc bb 12 12 12 12 DD D ∅∅ ∅ ∅∅ ∅ ∅∅ ∅ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ j This section will briefly describe three examples of such situations, together with This section will briefly describe three These practices are needed in any design method, because assumptions that are These practices are needed in any design The remaining steps of the JSP process are essentially concerned with elabor- The remaining steps of the JSP process ∑ outlines of the techniques for handling them. These examples respectively concern the outlines of the techniques for handling them. These examples respectively (For a more use of the techniques of read-ahead, backtracking and program inversion. practices, the detailed account of how each of these is incorporated into JSP design end of this reader is advised to consult one of the specialist texts identified at the chapter.) made in its model-building process impose constraints on the form of solution pro- made in its model-building process are chiefly placed on the forms of the input duced. In the case of JSP, these constraints arise because no other viewpoints are used and output data streams (and they largely constraints may not always map well onto some in composing the design model). Such as a remedy, the method developers evolve the reasonably common situations and, ‘heuristics’ or ‘clichés’. ancillary strategies that we have termed With the extensive experience in the use of JSP that has accumulated since its develop- With the extensive experience in the surprising to find that some relatively systematic ment in the early 1970s, it is hardly guidelines for use in handling certain ‘stand- practices have been developed to provide ard’ types of problem that can arise. ation, so that the final matrix description is really no different to the final one shown ation, so that the final matrix description obviously the details within each element are on the right hand side above (although that this is a expanded). This highlights the point are developed through its processes. decisions about constructional forms 14.4 Some JSP heuristics Again, we have left the data modelling element as being present in the model, but have the data modelling element as being Again, we have left represented it using structure of function. as below: Step 2: Create the program Structure Diagram Structure the program 2: Create Step from a model based it involves moving since is clearly one of transformation, This step (The represen- based upon function. elements to one structure of the data upon the a to be the same one, this step happens and outputs of used for the inputs tation form but the is unique to JSP, feature that this we can represent Diagram, and a single Structure process to create a combination SDC14 9/18/07 11:17 AM Page 301 AM Page 11:17 9/18/07 SDC14 statement style), as the style), as loop, it may WHILE WHILE pipe-and-filter loop. WHILE loop, containing an input statement that determines the input statement that determines loop, containing an WHILE Read-ahead: the structure of a The initial abstract level of design that is involved in the JSP design process simply The initial abstract level of design that Programmers who are familiar with structured programming languages derived are familiar with structured programming Programmers who mined until the conversion to text in steps 4 and 5. However, as we have just seen, mined until the conversion to text in is similar to that of the if the loop construct eventually adopted program structure in order to allow for correct be necessary to adjust the logic of the restructuring of the program structure to include initialization. On such an occasion, a be required in order to solve the problem. a single read-ahead operation may well needed to ensure that when the conditional expression used for the when the conditional expression needed to ensure that incorrectly before it has begun. will not cause the loop to terminate is first evaluated, it will lead to problems the loop is correct, incorrect initialization Even if the logic within by using a loop that termin- to perform input from an empty file if one (say) attempts end-of-line mark. ates on finding the form of the iteration structure is not deter- identifies that iterations occur: the detailed the next item of data to determine how the current item should be processed. to determine how the current item the next item of data of this problem. In such a lan- be familiar enough with the nature from ALGOL will a guage the use of an initial input statement to for the loop, will usually require termination conditions Figure 14.10. This statement is the start of the loop, as shown in be included before 14.4.1 of read-ahead The use that involve around algorithms with designing programs concerned JSP is essentially element of a (the ‘filter’ and producing records consuming may these programs algorithms for section showed. The of the preceding example data about how to make decisions conditions in order particular involve resolving something about be necessary to know occasion it may processed, and on should be Figure 14.10</p><p>Jackson Structured Programming (JSP) 302 SDC14 9/18/07 11:17 AM Page 302 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 303 operation); GOTO company encountered in Chapter 1. The com- structure clashes structure Lotsalogs The problem involves the The use of backtracking leads to much more complicated program structures, pos- The use of backtracking leads to much It is sometimes possible to use multiple read-ahead in such cases, where a pre- to use multiple read-ahead in It is sometimes possible follows: The basic steps of backtracking are as In many ways this is a specific instance of a much more general design problem. design more general a much of specific instance this is a ways In many formed before the path was proved to be the wrong one. formed before the path was proved to posit a default condition for use in all cases, this being assumed to hold until proved posit a default condition for use in all false; is possible to test the hypothesis, insert ‘quit’ at those points following at which it a constrained operations (where a ‘quit’ is effectively to reverse the effect of actions per- provide for any necessary ‘undo’ operations their pay in advance, and so, in order to pay its workers during the holiday period, it their pay in advance, and so, in order to pay its workers during the holiday is necessary for the company to mail cheques to their home addresses. of the assumptions that are made in the initial JSP model about the mappings used of the assumptions that are made in the initial JSP model about the mappings use a further for the data structures. To explain the issue a bit more clearly, we will example of the JSP design process. Christmas pany has a tradition of giving its complete workforce a long break over the them with and New Year period. However, its generosity does not run to providing sibly including large numbers of conditions. Its use can be considered as important sibly including large numbers of conditions. forms of error in the input data streams. when it is necessary to handle various 14.4.3 and inversion Program in this section, structure clashes occur because Like the other two problems described Figure 14.11 shows the resulting structure. The last step of this sequence can make life Figure 14.11 shows the resulting structure. rule the use of temporary storage for intermedi- rather complicated, and as a general data structures being updated only when the ate results is suggested, with the main transaction has been completed. n n n dictable sequence can be determined that will be needed to establish the condition. can be determined that will be needed dictable sequence technique of backtracking will cannot be used, the more general However, where this process. during step 4 of the basic JSP design need to be adopted lishing a clear design structure. lishing a clear design 14.4.2 Backtracking a single simple read-ahead to resolve a condition by using It is not always possible difficulty’. occurs we have an example of a ‘recognition operation; when this Software design methods normally encourage a design structure that is concerned with is concerned that structure a design encourage normally methods design Software to is then adjusted of a system, and this the ‘steady state’ requirements of meeting the of any error-handling termination, and and the needs of initialization incorporate then problem and solving the general this approach of required. In general, facilities to since attempting most practical one, is probably the to the exceptions adapting any chance of estab- is likely to destroy from the outset all of these factors incorporate SDC14 9/18/07 11:17 AM Page 303 AM Page 11:17 9/18/07 SDC14 Backtracking: the basic strategy. To complicate things a little further, the company employs people using two To complicate things a little further, maintains a ‘payments file’ for the company, The company’s finance department the details of gross pay are further structured according to whether the employee is the details of gross pay are further structured according to whether the employee paid on a monthly basis or a weekly one. the salary file consists of many staff member records; the salary file consists of many staff with the staff identity number, followed by the record for each staff member begins details of gross pay; example, the description need not be elaborated further than this level of detail. example, the description need not be elaborated further than this level of n details about A full description of this file would obviously need to include further of this the structures used for monthly and weekly pay. However, for the purposes which is structured in the form shown in Figure 14.12. By now, this should be so famil- which is structured in the form shown the structure of the file: iar that there is little difficulty in identifying n n different types of contract. The permanent employees enjoy monthly salaries, while different types of contract. The permanent Also, all employees have a unique staff identity others are paid on a weekly basis. first join the company. number allocated to them when they Figure 14.11</p><p>Jackson Structured Programming (JSP) 304 SDC14 9/18/07 11:17 AM Page 304 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 305 Structure of the finance file. Structure of the finance Structure of the personnel file. Since each of these files has one record per employee, we can reasonably assume Since each of these files has one record per employee, we can reasonably for the Step 2 of the JSP design process is slightly more complicated than it was In order to send out the Christmas pay cheques, this information from the finance In order to send out the Christmas pay Figure 14.12 previous example; we now need to combine three structures in order to create the previous example; we now need to combine three structures in order that each file will contain the same number of records (assuming no fraudulent that each file will contain the same number of records (assuming no the infor- behaviour) and that they can therefore be combined to create a file giving Christmas mation needed for addressing the envelopes to be used for sending out the payments. Figure 14.14 shows the structure of the file required for this purpose. department needs to be combined with further information about such details as the department needs to be combined with Fortunately, these are held by the person- name and home address for each employee. the format of the file that they maintain for this nel section, and Figure 14.13 shows purpose. Figure 14.13 SDC14 9/18/07 11:17 AM Page 305 AM Page 11:17 9/18/07 SDC14 Structure of the Christmas payments program. Structure of the output file. Structure of the output So we now have a design for the required program, and the company should be So we now have a design for the required clearly not the case here – the records in the two files will be ordered quite differently. clearly not the case here – the records in the two files will be ordered quite payment, While Charlie Chips might be quite pleased to receive Sam Sawdust’s salary first parts of the input files that are to be used for this purpose. Only at this point does first parts of the input files that are to be used for this purpose. Only at this about the it become evident that the design process has made a (flawed) assumption organize its ordering of the records in the two files. The finance department likes to prefers to use files by using the staff identity numbers, while the personnel department unless an alphabetical ordering based on the names of the employees. Unfortunately, – which is the allocation of identity numbers is based on an alphabetical relationship required program structure. However, as these data structures are not particularly required program structure. However, easily, and the resulting program structure is complex ones, this can be done fairly be verified against the data structures by the shown in Figure 14.15. (This can again are some slight extra complications involved in same process as before, although there separating the inputs.) output. Figures 14.16 and 14.17 show the able to proceed with generating the required Figure 14.15 Figure 14.14</p><p>Jackson Structured Programming (JSP) 306 SDC14 9/18/07 11:17 AM Page 306 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 307 , made up of employees can records Lotsalogs of standard size. Figure 14.18 shows the of standard size. Figure 14.18 shows disk blocks process), so that the file corresponds to the ordering used in the finance process), so that the file corresponds The personnel department’s file. The personnel department’s The finance department’s file. The finance department’s filter Structure clashes essentially arise because of some implicit assumptions that are Structure clashes essentially arise because of some implicit assumptions The other two types of structure clash that Jackson identifies are the boundary The other two types of structure clash This is an example of what Jackson terms a ‘structure clash’. This particular form This is an example of what Jackson clash can often be resolved fairly easily, pro- As it happens, this type of structure provided by the Structure Diagram. To handle these clashes without continual recourse provided by the Structure Diagram. To handle these clashes without continual technique to extra sorting and merging routines, JSP has developed an associated Structure Diagrams that represent these two quite different views of the same file – one Structure Diagrams that represent these two quite different views of the same of the record-based, the other block-based. It is the task of the file-handling routines operating system to resolve these and to transform between them as necessary. arise in the made within the forms used in JSP. They are based on inconsistencies that than is ordering of components when these are viewed at a lower level of abstraction strings of characters. However, to the low-level software of the operating system, the strings of characters. However, to the file is organized as a sequence of files share a common key in the form of the identity number, the personnel data file can files share a common key in the form by using an intermediate sorting program (an simply be reordered around this key additional simple operation, the data file. Following this reasonably obviously is a need to perform some form of remedial action. obviously is a need to perform some one or more of the input streams are ordered is an ‘ordering clash’, and occurs when example, the keys involved are the staff identity using different keys. In the case of our number and the name. key. In this example, since both of the input vided that the two files contain a common Figure 14.17 pleased with the size of his cheque, and so there it isn’t clear that Sam will be equally Figure 14.16 clash, in which data is broken up using different criteria, although ordered by the same clash, in which data is broken up using in which data elements overlap in the input file. keys; and the multithreading clash, clarified by considering the two views that can be The idea of a boundary clash can be a text file stored on a disk. At the programming taken when describing the structure of sequence of variable-length level, it is considered to consist of a look forward to receiving their correct Christmas and New Year pay. look forward to receiving their correct SDC14 9/18/07 11:17 AM Page 307 AM Page 11:17 9/18/07 SDC14 programs that two Example of a boundary clash: two views of a text file. (a) From the programmer’s Example of a boundary clash: two views There is not enough space to give a detailed account of program inversion in this There is not enough space to give a detailed account of program inversion share a common data structure. In that example, this requires that one of the original share a common data structure. In that example, this requires that one of input to the files be sorted into an intermediate file, and that the sorted file be the clashes. It can be used to assist with the structuring of solutions to other types of prob- clashes. It can be used to assist with the structuring of solutions to other types 1985). lem, including interactive programs and interrupt-handling programs (Sanden, order to use chapter, but the basic idea behind it can be summarized fairly briefly. In appropriate inversion, we adopt the form of solution that was originally identified as for the example of the Christmas payments, which is to design known as ‘program inversion’. However, as has been observed by Cameron (1988a), known as ‘program inversion’. However, as simply a means of resolving structure it is unfair to regard program inversion Figure 14.18 viewpoint. viewpoint. (b) From the operating system’s</p><p>Jackson Structured Programming (JSP) 308 SDC14 9/18/07 11:17 AM Page 308 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 309 Program inversion: a schematic view. (a) Using the main program as the ‘sort’. Program inversion: a schematic view. (a) Program inversion: removing an ordering clash by a sorted intermediate file. an ordering clash by a sorted intermediate Program inversion: removing In practice, as is shown in the diagram, either program can be inverted, for reasons In practice, as is shown in the diagram, either program can be inverted, now to be explained. program. Figure 14.19 shows this idea schematically. The two programs are then used program. Figure 14.19 shows this idea schematically. The two programs point, which to create and consume this file. (We could, of course, just stop at this example.) might be adequate for a one-off situation such as the Christmas payments programs so The need for the intermediate file can be removed by ‘inverting’ one of the that pro- that it becomes a subprogram of the other program (and similarly, we modify gram to call the inverted one). Figure 14.20 shows this form of solution schematically. Figure 14.20 ‘sort’. (b) Using the inverted subprogram as the Figure 14.19 SDC14 9/18/07 11:17 AM Page 309 AM Page 11:17 9/18/07 SDC14 An example of the organization of flow of control for three coroutines. An example of the organization of flow of An example of the organization of flow of control for three subprograms. An example of the organization Very few programming languages support the coroutine mechanism – Modula-2 example The nature of program inversion can perhaps be seen most easily for the A more correct description of the process of program inversion is that it leads to A more correct description of the process used above to describe a boundary clash. Figure 14.23 shows an example of part of a used above to describe a boundary clash. Figure 14.23 shows an example records are file of records, stored in a sequence of disk blocks (for artistic convenience, is an exception to this rule, although even there, the implementation is in the nature of is an exception to this rule, although even there, the implementation is in usually leads an ‘add-on’. It is the need to create an approximation to this construct that flow that usu- to the use of subprogram. This in turn produces much of the messy control textbooks. ally characterizes the examples of program inversion to be found in many a solution based on the use of two coroutines, rather than of a main program and a a solution based on the use of two coroutines, show the difference between the two types of subprogram. Figures 14.21 and 14.22 resume execution from the point at which they construct. As they show, coroutines a subprogram is invoked, it always begins last transferred control, whereas, whenever are effectively ‘equals’, and this is why execution at its first instruction. (Coroutines either program can be inverted.) Figure 14.22 Figure 14.21</p><p>Jackson Structured Programming (JSP) 310 SDC14 9/18/07 11:17 AM Page 310 AM Page 11:17 9/18/07 SDC14 Some JSP heuristics 311 (b) (a) A simple program to extract records from blocks. (a) Structure Diagram. A simple program to extract records from Mapping records onto blocks (boundary clash). Mapping records onto So program inversion is a further example of a ‘design heuristic’, in the sense So program inversion is a further example of a ‘design heuristic’, in technique is needed that can create these constraints whenever a particular problem technique is needed that can create these constraints whenever a particular does not fit the requirement. Inversion of this program would then result in the construction of two coroutines: a Inversion of this program would then result in the construction of two section of their execution sequencing is shown in Figure 14.25. problem that that it is a well-developed technique that can be used to overcome a the method itself arises because of the needs and assumptions of the method. Because streams, a assumes the existence of certain ordering constraints upon the input (b) Pseudocode. but this is not a real restriction). Figure 14.24 always shown as shorter than a block, that might be designed with JSP to extract shows the structure of the library routine them to a user program, one record at a time. records from the blocks and then pass Figure 14.24 Figure 14.23 SDC14 9/18/07 11:17 AM Page 311 AM Page 11:17 9/18/07 SDC14 design method. Indeed, its main program Execution sequence for inverted program. Execution sequence Summary somewhat different, and LCP has some other restrictions when compared directly with JSP, it is somewhat different, and LCP has some other restrictions when compared directly much closer to it in philosophy than any other design method in use. on the derivation of any physical structure for the program, based on a hierarchy of subprograms. on the derivation of any physical structure for the program, based on a hierarchy of JSP solution, it While it should be possible to develop this description relatively directly from the is not explicitly included in any way. an equivalent As an aside, while JSP has spawned no real extensions or developments, there is the notation is method in existence. This is Warnier’s LCP method (Warnier, 1980), and while tems Analysis and Structured Design method described in the preceding chapter, there is a tems Analysis and Structured Design method produced using JSP and related techniques, and their large repository of designs that have been have some familiarity with JSP for many more years maintenance is likely to require that designers to come. that JSP is a It is also important to reiterate the point operations of the solution (sequencing), rather than emphasis is on describing the time-ordered to be confined to assisting with detailed tasks of algorithm design rather than larger-scale design. to be confined to assisting with detailed tasks reason for studying JSP is as an exemplar of design This is not to suggest that the only good is that it encourages the designer to think about a form methods. One of the benefits of using JSP from the event-driven or top-down views, and so it of model different from that which emerges right. Indeed, the value of the Structure Diagram as has an important educational role in its own many other methods. Also, as with the Structured Sys- a modelling tool is widely recognized in explicitly builds on knowledge of the detailed structure of data in the formulation of a design explicitly builds on knowledge of the detailed structures that incorporate such ideas as information- solution, it cannot readily be used to build data stores or events. However, JSP does have hiding. Similarly, it lacks any means of modelling of design thinking, not least through its intro- an important historical place in the development a design strategy. But today its main role is more likely duction of the notion of composition as Because JSP provides a rather good and concise example of the major characteristics of all design a rather good and concise example of the Because JSP provides cover in this chapter. In some ways this prob- methods, it has been given fairly comprehensive of current design technology. Indeed, because JSP ably exaggerates its importance in terms Figure 14.25</p><p>Jackson Structured Programming (JSP) 312 SDC14 9/18/07 11:17 AM Page 312 AM Page 11:17 9/18/07 SDC14 Exercises 313 . 2nd . 2nd edn. . Chartwell-Bratt . Academic Press . Academic Program Design Using JSP: A Practical Introduction Program Design Using JSP: A Practical Method of Program Design JSP: A Practical Method JSP and JSD: The Jackson Approach to Software Development JSP and JSD: The Jackson Principles of Program Design Principles by the printing of a set of column headings at the top of the new page; by the printing of a set of column headings page. of items. The till should print out the details of each transaction, and should also print out of items. The till should print out the details of each transaction, and should also the final total price when the ‘total’ key is pressed. Blacksmith’s Cottage with an address that has no street name? to age for a point-of-sale system. Follow through the first three steps of the JSP method a bar- design a program that will control a supermarket till: the program accepts input from number code reader and the keys of the till in order to read the details of each item and the involved, and allocate these to the program elements, as in step 3 of the JSP method. involved, and allocate these to the program street, city, state, zip code, elaborating on format of surname, forename, initials, number, this model cope with Jim Smith, who lives in the details of each of these in turn. How would Structure Diagrams for the output data stream and the program to include: Structure Diagrams for the output data stream (a) to be followed a ‘page throw’ on the printer that occurs after every 50 lines of output, (b) on that a total at the bottom of each page that shows the total value of the transactions IEEE Computer Society Press edn. Macmillan Exercises Further reading 14.4 The filling station example is a specific example of the general problem of producing a pack- 14.2 additional operations that will be Taking your solutions to Exercise 14.1 above, identify the 14.3 person in the ‘standard American’ Draw a Structure Diagram that describes the address of a 14.1in Section 14.3, extend the For the example of the filling station that was introduced This IEEE Tutorial provides something of a sourcebook for JSP, full of details, examples and This IEEE Tutorial provides something so suitable for a first introduction as the other three associated information. While perhaps not books, it surpasses them as a reference text. Very clearly written, and has examples that are described using COBOL, Pascal – and BASIC! and has examples that are described using Very clearly written, the method. A good exposition of Cameron J.R. (1988). Ingevaldsson L. (1986). Ingevaldsson L. (1986). to JSP, and is not so heavily provides a very concise introduction This short monograph illustrations and is permeated Jackson’s original work. It uses many COBOL-oriented as dry sense of humour. throughout with a very J.P. (1992). King M.J. and Pardoe Jackson M. (1975). Jackson M. the a clear exposition of written and gives Jackson. While it is well work by Michael The original for many modern tastes. in its philosophy too COBOL-oriented it is probably rather basic ideas, SDC14 9/18/07 11:17 AM Page 313 AM Page 11:17 9/18/07 SDC14 SDC14 9/18/07 11:17 AM Page 314 SDC15 9/18/07 11:19 AM Page 315</p><p> chapter 15 315 Jackson System Development (JSD)</p><p>15.1 The JSD model 15.3 The JSD process 15.2 JSD representation forms 15.4 JSD heuristics</p><p>The JSD method was developed in the 1980s as one that incorporated a large-scale ‘compositional’ design strategy, based on the use of ‘long- running’ virtual processes to model the required system. Its detailed form continued to evolve through the 1980s, although the changes were more in the nature of organizational refinements and incorporation of accumulated experience, rather than any significant revisions to the philosophy or concepts underpinning the method.</p><p>In this chapter we examine the concepts, forms and procedures that make up the JSD method, which shares much of the philosophy of JSP, although on a much larger scale of application. Also, as with JSP, the primary domain of application was intended as ‘data-processing’ tasks (in a fairly wide sense), although its use of parallelism and attention to time-ordering and event modelling has led to it also being employed for other types of problem. rather interacting processes , in which the problem is analysed and modelled in terms of the architectural style (communicating processes). Arguably, JSD is also well (communicating processes). Arguably, architectural style of the system in terms of their effects on the input and output data streams, of the system in terms of their effects modelling stage The best framework for describing the broad process of JSD design is that pro- The best framework for describing the broad process of JSD design is JSD shares a number of major structural features with JSP, although its much JSD shares a number of major structural JSD has undergone a certain amount of evolution since the original description in JSD has undergone a certain amount JSD is generally regarded as having its roots in the thinking that stems from JSD is generally regarded as having Although originally intended for designing ‘data-processing’ systems, in a fairly intended for designing ‘data-processing’ Although originally represented by ‘long-running’ sequential processes in the model itself; a are constituent entities and the actions that they perform, and where these entities vided by Sutcliffe (1988) and also used in Cameron (1988a), where it is described in vided by Sutcliffe (1988) and also used in Cameron (1988a), where it is terms of the following three stages: n larger problem domain means that it is correspondingly less prescriptive in nature. larger problem domain means that the importance ascribed to incorporating time- One of these common threads is also shares with JSP the philosophy of using a ordering in the modelling process. JSD for system structure, meaning that changes in the model of the real world as the basis in the structure of the model, and eventu- external world can be mirrored as changes of the program(s). ally emerge as changes in the structure Jackson (1983). The form of the design process as described in Cameron (1986; Jackson (1983). The form of the design design steps, while the description in Sutcliffe 1988a) contains some revisions to the of the structure of the method. This chapter (1988) shows a rather different view the method and the revisions it has undergone, examines both the original form of these. together with some of the reasons for SSA/SD design method described in Chapter 13, JSD places emphasis on modelling the SSA/SD design method described in Chapter actions tasks as the basis for the design model. As rather than on using the direct functional top-down in its form, and in some aspects it also such, it is compositional rather than that is described in the next chapter. Indeed, comes close to the object-based paradigm have argued that JSD occupies a midway point Henderson-Sellers and Edwards (1990) between these strategies. than objects, and hence its use usually results in a design that has an hence its use usually results in a than objects, and processes upon long-term inter- of client–server systems, with its emphasis suited to the design modelling of state information. actions and its explicit processes (Hoare, 1978). In contrast to the Hoare’s ideas on communicating sequential model of a system in terms of a set of ‘long-running’ interacting concurrent processes interacting of a set of ‘long-running’ a system in terms model of realization’ of the model which is then transformed into a ‘physical for its description, design). (namely, the detailed potentially be applied to other term, the JSD design model can general sense of the of actions may be a and especially those where time-ordering problem domains, modelling JSD is also concerned with dominant characteristic. 15.1 model The JSD the were devised in two chapters, which in the preceding methods described Unlike the design method, software as a ‘second-generation’ JSD can be considered early 1970s, 1980s. As a method, 1970s and early place during the late took since its development a constructing directed towards and design activities, both analysis it encompasses</p><p>Jackson System Development (JSD) 316 SDC15 9/18/07 11:19 AM Page 316 AM Page 11:19 9/18/07 SDC15 The JSD model 317 , in which the abstract design is mapped onto a ‘physical’ , in which the abstract design is mapped , in which the overall structure of the system is developed from that , in which the overall structure of the Top-level transformational model of JSD. implementation stage network stage The following sections describe and examine the major features of JSD, using the The following sections describe and examine the major features of JSD, a interactions between entities, and between the of the model by adding the details of entities and the external world; an design. Figure 15.1 n n same general structure for presentation as was adopted in the previous chapters. Figure 15.1 shows these stages using the general transformational model we have Figure 15.1 shows these stages using the general transformational model idiosyncratic, adopted. (Note too that the terminology of JSD is sometimes somewhat would be as in the use of the term ‘implementation’ for a process that more normally described as ‘physical design’.) SDC15 9/18/07 11:19 AM Page 317 AM Page 11:19 9/18/07 SDC15 Example of an ESD for an aircraft in an ATC system. In the JSD model of a system as a network of long-running sequential processes, In the JSD model of a system as a network Figure 15.2 the ESD provides a means of describing the behaviour of the sequential processes. the ESD provides a means of describing an Entity–Structure Diagram, as developed for Figure 15.2 shows an example of such Control (ATC) system (namely, an aircraft). For one of the entities in an Air Traffic loosely considered to be a form of ‘processing agent’ in the system.) The notation used to be a form of ‘processing agent’ in loosely considered form used for a Structure Diagram (ESD) is the standard for an Entity–Structure one of making a different inter- development involved is simply Diagram, and the main different viewpoint of the elements, in order to adopt a rather pretation of the diagram system model. 15.2.1 Diagram The Entity–Structure interpretation) of the Jackson (or, perhaps more correctly, an This is an adaptation is used to describe the ‘evolu- described in Section 7.2.5. In JSD it Structure Diagram an entity is an ‘active’ element a period of time. In this context, tion’ of an entity over process itself. (It can be the operations of the modelling that is identified through 15.2 forms representation JSD descrip- forms of diagrammatical use of two principal design process makes The JSD here but it is used earlier in this book, been encountered of these has already tion. One not radically essentially new (although the second is a different viewpoint; to capture any sense). original in</p><p>Jackson System Development (JSD) 318 SDC15 9/18/07 11:19 AM Page 318 AM Page 11:19 9/18/07 SDC15 JSD representation forms 319 Generic form of ESD. For other systems, a suitable entity might be a person, as in Figure 15.4, describ- For other systems, a suitable entity might be a person, as in Figure 15.4, In this example, an aircraft becomes an entity of interest to the ATC system only In this example, an aircraft becomes Figure 15.3 shows the generic form of Structure Diagrams of this type; the overall the generic form of Structure Diagrams Figure 15.3 shows landing and taking off; being ‘stacked’ before landing. doing nothing (the aircraft just flies through); doing nothing (the aircraft just flies actions performed by the entity while in existence; actions performed by the entity while deletion of the entity from the model. creation of the entity in the model; Figure 15.3 course); and ceases to be of interest to the model on ceasing to be a student, whether course); and ceases to be of interest to the model on ceasing to be a student, this occurs through passing or failing the course. can take off, and if it enters the landing stack, it must leave the stack before it can be can take off, and if it enters the landing stack, it must leave the stack before assigned to the runway for landing. becomes ing a student who is on a course of some kind. Again, the person in question that make of interest (in terms of the JSD model) only when undertaking those actions for this him or her into a student, and a specific type of student at that (one registered n n of an aircraft being stacked, landing and This model allows for multiple occurrences probably prefer that these events should be taking off – although most of us would is important: an aircraft must land before it exceptional! Once again, time-ordering when it crosses a boundary to enter the controlled airspace and it ceases to be of inter- when it crosses a boundary to enter the those events it might perform a number of est when it leaves that airspace. Between actions, which can include: n n n that this conforms to this framework at the first An examination of Figure 15.2 shows model is therefore essentially of a dynamic level of abstraction. (Note that a JSD time-ordered behaviour.) nature, being concerned with specifying should be modelled, and so this diagram is constructed as part of the modelling task. and so this diagram is constructed should be modelled, in the next section.) developing this diagram is described (The procedure for with: basic sequence is concerned n this problem, an aircraft has been identified as one of the entities whose behaviour has been identified as one of this problem, an aircraft SDC15 9/18/07 11:19 AM Page 319 AM Page 11:19 9/18/07 SDC15 operation to the write blocked if it tries to read is request. read , in which messages are passed asynchronously between the en- , in which messages are passed asynchronously that describes the ‘local state’ of a process at a given time. By inspecting The SSD for a pipeline (data stream). ESD for a student on a course. ESD for a student on data-flow stream state vector Each of these examples of an entity might be of importance to a system designer of an entity might be of importance Each of these examples A entity, this state vector, one entity can obtain required information from a second tities concerned, using some form of pipeline mechanism, as shown in Figure 15.5. tities concerned, using some form of queue, and is assumed to have infinite buffer A data-flow stream acts as a FIFO is never blocked on a capacity, so that the producer process consumer process buffer of the stream. In contrast, the as it has no means of checking whether from a buffer when no message is available, data is available before issuing a A Figure 15.5 Figure 15.4 n 15.2.2 (SSD) Diagram Specification The System that identifies the interactions between the The SSD is basically a network diagram the system. These interactions take place by two entities that make up the model of which are: basic mechanisms for interprocess communication, n human controllers. In the second, in order to create a system that will be used to main- human controllers. In the second, in need this model of student activity in order to tain student records, the designer will the system will be required to handle. (We will help identify all the situations that of suitable entities in Section 15.3, where we examine the criteria used for the selection study the JSD procedures.) using JSD. In the first case, we can assume that modelling aircraft behaviour would using JSD. In the first case, we can system intended to provide assistance to the be required when constructing an ATC</p><p>Jackson System Development (JSD) 320 SDC15 9/18/07 11:19 AM Page 320 AM Page 11:19 9/18/07 SDC15 JSD representation forms 321 Processes with multiple input streams. (a) Using a rough-merged form. Processes with multiple input streams. (a) The SSD for a state vector inspection. Process 2 inspects the state vector of the state vector Process 2 inspects a state vector inspection. The SSD for (b) (a) In particular, where a process reads from more than one stream, we can distin- In particular, where a process reads from more than one stream, we can inspection process, there is a degree of indeterminacy present in this mechanism. where this is contained in its current state. The state vector will typically consist where this is contained in its current its program counter which is used to of the local variables of a process, including (This concept applies to the long-running indicate the current state of execution. model as well as to the ‘physical’ processes ‘virtual’ processes used in the designer’s Figure 15.6 shows an example of state used in the eventual implementation.) process may also be executing during the vector inspection. Since the ‘inspected’ ‘rough-merged’ scheme (Figure 15.7 (a)), and those in which the inputs remain distinct ‘rough-merged’ scheme (Figure 15.7 (a)), and those in which the inputs remain handling of (Figure 15.7 (b)). In the first case, the consumer is required to organize the The notation used for SSDs has further elements to denote such features as multipli- The notation used for SSDs has further elements to denote such features city of data transfer operations and multiplicity of processes. using the guish between the cases in which data is read from either stream as available Figure 15.7 (b) Using separate ‘read’ operations. Figure 15.6 Process 1. SDC15 9/18/07 11:19 AM Page 321 AM Page 11:19 9/18/07 SDC15 operation, while in the latter it must organize the operation, while in the latter it must read A simple example of a segment from an SSD. Figure 15.8 shows an SSD describing a very simple network in a system. The Figure 15.8 shows an SSD describing Figure 15.8 Figure 15.10 shows the form of the method as subsequently described in Cameron Figure 15.10 shows the form of the method as subsequently described (1986). Two basic changes occurred in the method during this interval. 15.3 The JSD process amount The procedures involved in the ‘process part’ of JSD have undergone a certain 15.9 uses an of revision and repackaging since the method was first introduced. Figure (1983), while ESD to describe the JSD process as it was originally presented in Jackson in this chapter. and an entity is represented by using an oblong circle is used to label a data-flow arc, to the conventional DFD notations might find box. Those who are more accustomed to describe the state vector is associated with this confusing. The diamond shape used attached to it. a particular entity by means of the labelling multiple inputs through one two sources. However, beyond observing the sequencing of consumption from the not explore the SSD notation in any further depth presence of these structures, we will </p><p>Jackson System Development (JSD) 322 SDC15 9/18/07 11:19 AM Page 322 AM Page 11:19 9/18/07 SDC15 The JSD process 323 The JSD procedure as revised by Cameron (1986). The JSD procedure as originally described in Jackson (1983). The JSD procedure as originally described Figure 15.9 Figure 15.10 SDC15 9/18/07 11:19 AM Page 323 AM Page 11:19 9/18/07 SDC15 The three-stage model of JSD as used in Sutcliffe (1988) and Cameron (1988a). of JSD as used in Sutcliffe (1988) and The three-stage model Sutcliffe’s framework will be adopted for the outline description of the JSD pro- Sutcliffe’s framework will be adopted process for a task that is generally seen as posing difficult problems for the designer. process for a task that is generally seen in Figure 15.10. The change involved can be considered as being largely cosmetic, in Figure 15.10. The change involved as the two steps are so closely related. evolved into two separate steps in Figure 15.10 The function step of Figure 15.9 has information function step). We will examine (the interactive function step and the later. This modification is a more significant the roles of these in a little more detail since it gives additional structure to the design development than the previous one, The first two steps of the method as it is described in Figure 15.9 have been merged The first two steps of the method as it Figure 15.11 of other methods such as SSA/SD, in that it is concerned with building up a ‘black box’ of other methods such as SSA/SD, in that it is concerned with building up model of the problem, rather than considering the form of a solution. designer’s activities, since these are based on the major steps of the method, which are, designer’s activities, since these are based on the major steps of the method, of course, essentially common to all the descriptions of the method. 15.3.1 stage The modelling phase In many ways, the role of this step corresponds (rather loosely) to the ‘analysis’ the descriptions of the earlier forms, it can be seen that the modelling stage can be the descriptions of the earlier forms, ‘specify model of reality’, while the network identified as the first part of Jackson’s with Jackson’s ‘specify system functions’. (The stage comprises the latter part, together all three.) implementation stage is common to the most highly evolved structural description. cess part in this section, since this is does not greatly affect the description of the However, the choice of framework In Section 15.1 the JSD design process was also described in terms of the three-stage In Section 15.1 the JSD design process (1988) and Cameron (1988a). These stages outline subsequently used by both Sutcliffe used in the other two forms, and the correspond- differ slightly from the abstractions is shown in Figure 15.11. By comparing this with ing mapping of the design activities n n</p><p>Jackson System Development (JSD) 324 SDC15 9/18/07 11:19 AM Page 324 AM Page 11:19 9/18/07 SDC15 The JSD process 325 Figure 15.12 provides a symbolic illustration of the state of the JSD model at the Figure 15.12 provides a symbolic illustration of the state of the JSD model Once the entities and actions have been identified and correlated, the designer Once the entities and actions have As an excellent example of this distinction between entities and items outside the As an excellent example of this distinction In practice, many problems turn out to have relatively few entities that actually problems turn out to have relatively In practice, many This task of entity analysis is based on making a study of the text of the require- a study of the text is based on making of entity analysis This task call-sign position flight number end of the modelling stage. At this point in the design process the model consists of a end of the modelling stage. At this point in the design process the model set of (disjoint) process models for the major entities of the problem. n n aircraft from and any other features that may be of assistance in distinguishing any one the others in the airspace at a given time. example of the type of diagram that results from doing this, namely a Structure example of the type of diagram that case, an aircraft). As a further part of this task Diagram that describes an entity (in that to identify those attributes of the aircraft’s actions of analysis, the analyst will also seek These may include information about: that are of interest to the modelling. n actions as opening and closing accounts, and paying in and withdrawing funds. The actions as opening and closing accounts, dismissed as being ‘outside the model boundary’, bank manager, on the other hand, is of the bank manager does not help with because modelling the time-ordered behaviour system operates, which is the purpose of this developing a model of how the banking stage. of actions for an entity. Figure 15.2 showed an needs to add time-ordering to the list JSD model, and are described as ‘outside the model boundary’. An entity that is out- JSD model, and are described as ‘outside time-ordered behaviour does not affect the side the model boundary is one whose to constrain the entities used in the design model. problem directly, but which may act an example of a simple banking system. A model boundary, Jackson (1983) develops model is the ‘customer’, which performs such major entity that is identified for the refine and cross-reference the various candidates. In the process of doing so, the the various candidates. In refine and cross-reference as synonyms, ‘existence’ or have to remove such extraneous items designer will also In Cameron (1988b) the entities that are not of direct relevance. ‘state’ verbs, and it are explored more fully. and alternative strategies to use within nature of this step documents may describe many other need to be modelled, although the requirements These other entities are not included in the entities that are of only <a href="/tags/Peripheral/" rel="tag">peripheral</a> interest. ments documents, augmented as necessary by questions and interviews with the client. augmented as necessary by questions ments documents, of the problem. One strategy for this task is to identify the entities A major objective (and any other descriptions the text of the requirements documents involves analysing verbs and nouns. The can be obtained) in terms of the constituent of the problem that are likely to describe entities, to identify actions, while the nouns verbs can be used requires quite a lot of work to of extracting the final lists of these although the process Entity analysis (the entity–action and entity–structure steps) and entity–structure (the entity–action analysis Entity by begin this task a designer should that others have recommended Jackson and entities in the system, to identify the specification in order the requirements analysing the time-ordering of the actions, and the the attributes of that they perform, the actions actions. SDC15 9/18/07 11:19 AM Page 325 AM Page 11:19 9/18/07 SDC15 The JSD model at the end of the modelling stage. The notation is intended to end of the modelling stage. The notation The JSD model at the A part of this task of adding inputs (and outputs) to the model processes involves A part of this task of adding inputs (and outputs) to the model processes The procedure for identifying the inputs is first to identify the external actions of The procedure for identifying the inputs is first to identify the external actions The task of creating a model begins with the designer seeking to find the input that The task of creating a model begins with an input generated internally by the system – for example, when interest is added an input generated internally by the to the bank account every six months. an input corresponding to an event that arises externally to the system – for exam- an input corresponding to an event that in the control zone; ple, the radar detects a new aircraft the designer in choosing the forms that these will take (data stream or state vector). the designer in choosing the forms that these will take (data stream or the model, and then to determine how the corresponding event for each one of them the model, and then to determine how the corresponding event for each we can will be detected in the real (external) world. For example, for the ATC system, detects a new see that a new aircraft entity will usually be instantiated when the radar with a par- signal in the area being controlled, and so this external event can be linked ticular action of the entity (in this case, the ‘action’ of being created). n instances of the first group of inputs, while the This step is concerned with identifying group forms the subject of the next phase modelling task involving the second (through the interactive function step). tionality arising from the fact that the operations of this step are contained in the SSDs. tionality arising from the fact that the an entity that has been identified in the first step. is required to ‘trigger’ each action of Each such input will be either: n The initial model phase linking the entities defined in the first step, and This phase involves the designer in model of the system as a whole. Not surpris- beginning the construction of the initial with modelling the interactions between the ingly, as this initial model is concerned of SSDs and ESDs, with the added func- various entities, it produces a combination Figure 15.12 of entities 2 and 3. indicate many instances 15.3.2 The network stage</p><p>Jackson System Development (JSD) 326 SDC15 9/18/07 11:19 AM Page 326 AM Page 11:19 9/18/07 SDC15 The JSD process 327 The JSD model at the end of the initial model phase of the network stage. The JSD model at the end of the initial model The first two steps of the elaboration phase (essentially corresponding to the rather The first two steps of the elaboration phase (essentially corresponding to the It is during this second stage that the designer begins to transform the model of the It is during this second stage that the Tasks such as error-handling may also be included at this stage, although, as with Tasks such as error-handling may also should possess a fairly complete diagram- On completion of this phase the designer Figure 15.13 they are concerned with making a major design transformation, and one that is driven they are concerned with making a major design transformation, and one is relatively very strongly by the problem domain and the problem itself. While JSD the end of this initial model phase, using the same symbolic form as before. Resolving the end of this initial model phase, using the same symbolic form as before. late as pos- this model into a practical detailed design is a task that is deferred until as model. sible, and so the elaboration phase continues to build on the same abstract a less complex function step of the original descriptions of the JSD process) provide phase, since well-defined set of actions for the designer than those of the initial model matical representation of the basic design model, together with textual descriptions of matical representation of the basic design with the actions performed by the entities. the properties that are to be associated However, it is important to appreciate that the problem into a model of the solution. still relatively abstract. It may well be expressed model developed during this stage is impractically large) number of sequential pro- as being formed from a very large (often 15.13 shows the state of the JSDcesses running concurrently. Figure design model at (for example, deciding whether or not to adopt a rough merge). (for example, deciding whether or not kept at a suitable level of abstraction. However, all design methods, this needs to be of spurious events and their removal would cer- such system needs as the detection tainly need to be identified in this phase. Initial decisions may also be needed where multiple data-stream inputs are required Initial decisions may also be needed SDC15 9/18/07 11:19 AM Page 327 AM Page 11:19 9/18/07 SDC15 this system when step, which adds the processes and data flows that are step, which adds step, concerned with identifying those events that affect the identifying those events that affect step, concerned with information function information function step, which involves making decisions about the synchronization of the model step, which involves making decisions interactive function interactive function The refinements to the design model that result from the decisions made in this The refinements to the design model that result from the decisions made The recommended procedure for this task is to examine the original requirements The recommended procedure for this This major transformation was not particularly well defined in the earliest descrip- was not particularly well defined This major transformation adding ESDs that describe the behaviour of the new processes required for these adding ESDs that describe the behaviour of the new processes required functions; the external actions, and then be derived from considering system and that cannot processes that will provide these events; designing additional the system outputs. required for generating the eventual n input. The designer may also need further information from the model to determine input. The designer may also need further information from the model associated the details of the actions to be performed, together with the values of their attributes. step will involve: system, and to determine how they are to be incorporated into the design model. system, and to determine how they are aim of identifying some of the issues that were specification again, this time with the particular, at this point the designer is required not dealt with in the initial model. In needs to be internally generated, and to consider in turn each action that from this analysis might be expressed in terms action should be generated. The output week is a Friday’) or of some form of external of other actions (‘when the day of the An example of such a function has already been mentioned, namely that of adding An example of such a function has intervals. While ‘normal’ transactions can interest to a bank account at predetermined a customer’s actions (paying-in using a deposit be identified through examination of autoteller), this one arises as a function of the slip, or withdrawing funds using an identified for a major entity of the design. So system, and so is not among the actions the designer needs to identify such actions of the in this part of the modelling phase, This phase is now also seen as incorporating most of the tasks of the former This phase is now also seen as incorporating timing processes. function step Elaboration phase 1: the interactive n n phase. It is through the activities of this phase that the designer completes the creation that the designer of this phase is through the activities phase. It a model that is concerned with of the problem, and begins creating of the basic model to perform the system-related extra processes to the network the solution, by adding tasks. tasks, which are: later refined into two separate transformation tions of JSD, but was prescriptive in the early analysis steps, this part of the network stage requires much requires stage the network part of steps, this analysis the early in prescriptive thinking. of creative in the way more phase The elaboration role of the previous description of the was identified in the role of this phase The main</p><p>Jackson System Development (JSD) 328 SDC15 9/18/07 11:19 AM Page 328 AM Page 11:19 9/18/07 SDC15 The JSD process 329 The JSD model at the end of the interactive function step (elaboration phase of The JSD model at the end of the interactive revising the SSD (or SSDs) which describes the system, to show the extra processes revising the SSD (or SSDs) which describes with the rest of the model. and the interactions that they will have inputs, and it is only at this stage that the JSD designer begins to consider how the inputs, and it is only at this stage that the JSD designer begins to consider in this step system outputs are to be generated. In particular, the design task involved this is likely to be rather unrealistic for any real system, since adding new processes this is likely to be rather unrealistic for any real system, since adding new of the SSD.) may well also require modifications to be made to the existing structure Elaboration phase 2: the information function step system Up to this point, the JSD modelling process has been concerned with handling n symbolic JSD model at the end of this step of the Figure 15.14 shows the state of the processes that have been added during this step. elaboration phase, including the new 15.14, it has been assumed for simplicity that (In the example represented by Figure the changes arising from this step. However, the SSD is simply extended to incorporate Figure 15.14 the network stage). SDC15 9/18/07 11:19 AM Page 329 AM Page 11:19 9/18/07 SDC15 This in turn leads to consideration of the scheduling of processes (remember, This in turn leads to consideration that makes JSD appear very attractive as a It is perhaps this stage, in particular, Once again, the effect of this step is to further refine and extend the process net- of this step is to further refine and Once again, the effect Many of the rules for determining the outputs that are required from a system are that are required the outputs the rules for determining Many of ‘When it is Friday, and within six days of the end of the month, print a bank state- and within six days of the end of the ‘When it is Friday, due at this point.’ and calculate the monthly charges ment for the account, The terminology used to describe this activity is apt to be misleading. The major task The terminology used to describe this activity is apt to be misleading. The solution that of this phase is to determine how the still relatively abstract model of the design method for real-time systems, although on closer inspection the benefits are design method for real-time systems, although on closer inspection the was essen- probably not as great as might be hoped. Certainly, though, although JSD of being tially developed with data-processing systems largely in mind, it is capable used much more widely. 15.3.3 stage The implementation updating of a display screen. a model, not about actual physical processes). though, that we are still talking about are scheduled, and by what criteria, helps with The consideration of how processes processes, and this hierarchy forms the prin- determining the basic hierarchy for these cipal output from this step. Up to this point, the JSD design model describing the designer’s solution has effectively Up to this point, the JSD design model it consists of a network of essentially equally been based on the assumption that often be an unrealistic assumption, and one of important processes. However, this will to determine the relative priorities that will exist the major tasks of the present step is ATC system, we may regard the processing of the among processes. For example, in an radars to be of higher priority than (say) the signals from the primary and secondary actions of the additional processes. Figure 15.15 shows the effects of this step in terms actions of the additional processes. Figure of the JSD model. However, at this point the of its effect upon the symbolic description complete, and so the designer can begin to task of network development is relatively system in greater detail. consider the behavioural aspects of the step Elaboration phase 3: the system timing or from a state vector inspection); to assume that the task of extracting this can be inspection); to assume that the or from a state vector design that process. In practice, process; and then to use JSP to performed by a single the use of several processes, the processing required may well need the complexity of JSP structure clashes. in order to resolve it, and to create yet more ESDs to describe the work, and hence the SSD(s) describing The task of determining how such a requirement is to be met in terms of the model is how such a requirement is to The task of determining One recommended procedure than we might like it to be. somewhat less prescriptive (through a data stream how the information can best be obtained is first to identify is centred on identifying how information will need to be extracted from the model from the extracted to be will need how information identifying on is centred specification. in the original required outputs the to generate in order processes, original specification. manner in the ‘rule-based’ be provided in a relatively likely to sys- z occur, then the as ‘when x, y and using such forms well be expressed They may requirement that: as in the example output p and q’, tem should</p><p>Jackson System Development (JSD) 330 SDC15 9/18/07 11:19 AM Page 330 AM Page 11:19 9/18/07 SDC15 The JSD process 331 The JSD model at the end of the information function step (elaboration phase of The JSD model at the end of the information This phase is therefore concerned with determining, among other things, the forms This phase is therefore concerned with determining, among other things, sions about scheduling that were made during the network phase, since these may help sions about scheduling that were made during the network phase, since these this may to determine some of the choices about such features as hierarchy, and how influence process scheduling. the normal sense of writing program code. such as state that may best be used to realize the components of the design model, processes, vectors and processes (in the latter case, some might be realized as physical processes are while others could become subprograms); and, in turn, how the physical by the deci- to be mapped onto one or more processors. This phase is also constrained has been developed in terms of long-running model processes can be mapped onto a has been developed in terms of long-running design step, rather than ‘implementation’ in physical system. It is therefore a physical Figure 15.15 the network stage). SDC15 9/18/07 11:19 AM Page 331 AM Page 11:19 9/18/07 SDC15 design elements n ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f b n c n n d n ...... ff bb cc 12 12 12 dd 12 DD D ∅∅ ∅ ∅∅ ∅ dd d ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → 1 E</p><p>⎞ ⎟ ⎟ ⎟ ⎠ d c f b As a final comment, the parallels with JSP should not be drawn too far (as the pre- As a final comment, the parallels with Figure 15.16 shows the Transformation Diagram for the complete JSD design pro- the Transformation Diagram for the Figure 15.16 shows It is in this phase that most use can be made of the JSD heuristics that are described that JSD heuristics of the be made use can that most this phase It is in vectors of the how the state step is to determine element of this An important ∅ ∅ R R ⎜ ⎝ ⎛ ⎜ ⎜</p><p> and also a small amount of information about related data (the attributes). So this first and also a small amount of information about related data (the attributes). step can be described as follows: Our D-matrix description of the JSD design process is again based upon the three-stage Our D-matrix description of the JSD phases that occur within this. model of Figure 15.16, and the individual Entity analysis as being to identify a set of We can regard the actions of this stage also entities) and to model both their behaviour (at this point, all of the elements are model, the mapping is much less prescriptive than it is in JSP. By way of compensation, model, the mapping is much less prescriptive in developing much larger systems than would JSD is a method that is intended for use be possible with JSP. 15.3.4 <a href="/tags/Process_design/" rel="tag">process design</a> The JSD produced from JSP or SSA/SD. The JSD physical design model has elements of the con- produced from JSP or SSA/SD. The JSD viewpoints, captured through the ESDs, SSDs structional, functional and behavioural transfer mechanisms that together make up the and physical mappings of the data physical design model. like JSP, this method seeks to preserve in the vious paragraph demonstrates). While, the basic structure that was developed for the structure of the solution the form of form, a quite separate mechanism needs to be provided for the state vector form of mechanism needs to be provided form, a quite separate communication. that will normally occur omits any of the revisions or iterations cess (as always, this particularly worth highlighting process). One feature of this that is during the design the final design model when compared with those is the more comprehensive nature of execution in a program are provided by ‘lightweight processes’, and where these are are provided by ‘lightweight processes’, execution in a program access to data, types and compilation unit, they can have shared contained in a single mechanism quite closely. can be used to model the state vector constants, and so Unix processes, then each will processes are mapped onto (say) However, if the model mechanism that permits direct address space, and there is no occupy its own virtual a physical implementation space of another process. So in such access to the address in the next section. (There are only three of these, and two of them are generally recog- generally them are two of these, and three of are only (There next section. in the used in the JSP model.) parallels to those nizable as will, form adopted physical design. The in the are to be implemented model processes well to be realized, as are themselves the model processes depend on how of course, of concurrent threads example, where available. As an forms as the implementation</p><p>Jackson System Development (JSD) 332 SDC15 9/18/07 11:19 AM Page 332 AM Page 11:19 9/18/07 SDC15 The JSD process 333 for the data modelling viewpoint is to emphasize that d The complete JSD transformation model. Here we are using the matrix in a more abstract manner than when describing JSP, Here we are using the matrix in a more abstract manner than when describing so that each column now represents an entity model (in the form of an ESD together so that each column now represents an entity model (in the form of an Figure 15.16 Again, the use of the lower case this is largely supplementary information. SDC15 9/18/07 11:19 AM Page 333 AM Page 11:19 9/18/07 SDC15 ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ b b n m f c n c m mm d f n d n m ...... dd bb bb ′′ ′ cc ff 12 ′′ ′ cc 12 12 12 ff dd ′′ ′ dd 12 112 12 12 DD D ∅∅ ∅ dd d d DD D ∅∅ ∅ dd d dd d ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → → 2 3 E E</p><p>⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f b n n c b n c n n d d n f n n ...... ff bb cc bb cc 12 12 12 12 12 dd ff dd 12 12 12 One point here is that we can already see two contrasts with the matrix trans- One point here is that we can already DD D ∅∅ ∅ ∅∅ ∅ dd d DD D ∅∅ ∅ dd d dd d more columns; of existing elements, corresponding to revisions to the behaviour and functionality required by the extended model. the new network connections that are ticular connection (which may be organized through either a data stream or a state (which may be organized through either ticular connection vector). additional information about the behaviour of the elements, corresponding largely about the behaviour of the elements, additional information been made about connectivity; to decisions that have information across a par- information relating to exchange of some ‘functional’ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜</p><p>This results in the matrix model shown below: Interactive function step means that our model will now have: The addition of new entities in this step n n (in this case, the behavioural viewpoint) has been modified in this step. (in this case, the behavioural viewpoint) two design methods. One is the use of more formation models used for the preceding second is that individual design steps may well viewpoints at an early stage, while the than one viewpoint. explicitly modify information in more In this the ‘prime’ symbol denotes that the information relating to the given viewpoint In this the ‘prime’ symbol denotes that The resulting matrix model describing this is shown below: The resulting matrix This corresponds to the start of the network stage, and the resulting model now to the start of the network stage, This corresponds includes: n n with supporting documentation that describes the entity’s attributes). Indeed, one of Indeed, attributes). entity’s the that describes documentation supporting with the individual to define can choose is that we of the D-matrix characteristics the useful the to describing is best suited level of abstraction to be at whatever matrix elements involved. processes phase Initial model</p><p>Jackson System Development (JSD) 334 SDC15 9/18/07 11:19 AM Page 334 AM Page 11:19 9/18/07 SDC15 The JSD process 335 ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ f b f b c n m m n n d d m n c m d d ...... d d 22 22 ff bb ff bb cc 12 12 12 12 12 d cc d 1 12 1 DD D DD D dd dd d DD D DD D ∅∅ ∅ dd ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → → 5 6 E E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f b b c n c n n n n d d f n n n symbol here for the constructional viewpoint. One of the other con- symbol here for the constructional d ...... ff bb bb cc cc 12 12 12 12 12 ff dd dd 12 12 12 We can also conclude that the above D-matrix analysis does provide some degree We can also conclude that the above DD D DD D DD D ∅∅ ∅ ∅∅ ∅ dd d dd d dd d Michael Jackson’s assertion that the JSD process is essentially one of refining a Michael Jackson’s assertion that the JSD process is essentially one of specification (model) and involves no major transformations of viewpoint. the transformations involve multi-viewpoint changes, and the final design model the transformations involve multi-viewpoint changes, and the final design does incorporate elements of all viewpoints. endorse of a characteristic of second generation methods), which does broadly ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ 1. It can reasonably claim to be a ‘second generation’ design method, in the sense that 2. The transformations involved are solely elaboration steps (again, this is something of support for two of the assertions that are made about JSD. of support for two of the assertions sequences of this stage is that the number of design elements will be reviewed and pos- sequences of this stage is that the number reduced), so that the final transformation sibly modified (although not necessarily described in our model becomes as follows: Implementation information about how the system is to be con- In this final stage the designer adds processes on to physical ones). To reflect the point structed (in terms of mapping model constructional information, we therefore employ that this does not encompass detailed a lower case System timing step System timing (potentially concurrent) sys- issues of synchronization between the This step resolves to each model process. We can through the assignment of priority tem elements, chiefly the information avail- functional information that completes regard this as additional able for this viewpoint: Information function step function Information effectively provides), what the D-matrix (which is viewpoint From a transformational by a further trans- and so is modelled the preceding one is very similar to this step above. of the form shown formation SDC15 9/18/07 11:19 AM Page 335 AM Page 11:19 9/18/07 SDC15 Program inversion is essentially a technique used during the implementation stage, Program inversion is essentially a technique One point in which the JSD model differs somewhat from that used in JSP is that One point in which the JSD model differs state vector separation backtracking program inversion describe its structure, but each will require to store different values for the local vari- describe its structure, but each will require to store different values for the ables that define its state. 15.4.2 vector separation State and has no This heuristic is specific to the multiple-process nature of the JSD model, many pro- real analogy in JSP. It is used to improve efficiency where a JSD model has instances cesses of a given type. For example, in the ATC problem there might be many of the of the ‘aircraft’ process; and in a banking system there might be many instances same code to ‘customer’ process. All the instances of a particular process can use the when the designer begins to consider the detailed organization of a solution. Prior to when the designer begins to consider on a more abstract model and are less concerned that, the design activities are based organization. with the actual details of physical program from that stream. both data-stream inputs and state vector inputs. it is possible for a JSD process to have for data-stream inputs, which are deter- The use of inversion is really only appropriate vector inputs are essentially non-deterministic ministic and well-formed, whereas state exactly when the state vector was last updated) (the value obtained will depend upon mechanism. and so do not fit well into the inversion 15.4.1 inversion Program and provides a means of transforming a model This technique is used much as in JSP, a coroutine), which can then be invoked by process into a routine (or, more correctly, can be organized with respect to either input or another process. As before, inversion probably that in which it occurs around an input output, but the most common form is normally being suspended to wait for input data stream, with the inverted process n n is specific to JSD. from JSP, while the third Two of these are ‘borrowed’ As might be expected, the principal heuristics in JSD are largely (but not entirely) used (but not entirely) in JSD are largely heuristics be expected, the principal As might of JSP, although, of course, the to those supported by the heuristics for tasks analogous briefly reviews the roles of is somewhat larger. This section very scale of application forms of heuristic: the following three n (The latter point does require a somewhat wider interpretation of ‘refinement’ than is of ‘refinement’ wider interpretation somewhat a does require latter point (The of the term!) use unreasonable means an is by no it case, although the commonly 15.4 heuristics JSD</p><p>Jackson System Development (JSD) 336 SDC15 9/18/07 11:19 AM Page 336 AM Page 11:19 9/18/07 SDC15 Summary 337 Overall, the principal JSD heuristics are as prescriptive as might be expected Overall, the principal JSD heuristics Backtracking helps handle the unexpected events that might occur in an entity’s Backtracking helps handle the unexpected The situation is analogous to that which often obtains in multi-tasking operating in multi-tasking often obtains which to that is analogous situation The JSD is to adopt a of a process in multiple instances used to handle The method Summary scriptive (particularly the information function step and the system timing step), while the initial scriptive (particularly the information function step and the system timing step), while analysis and model-building are much more highly structured. argument for not using JSD at all, simply one for using it only where appropriate. (To complain that argument for not using JSD at all, simply one for using it only where appropriate. (To purpose and a tractor does not have the acceleration of a sports car is to miss the point of its effectiveness in much the same manner.) while sharing The larger scale of application of JSD means that it is less prescriptive than JSP, are less pre- much of the basic philosophy about design. However, it is the later stages of JSD that The JSD method provides a very different set of abstractions for use by the designer from those The JSD method provides a very different as will be evident from the material of this chapter, JSD described in the preceding chapters. And, does not readily lend itself to being used in any form is a relatively extensive design method that why we should not use JSD on small systems, since of subset. Indeed, there are good arguments JSD procedures are apt to be lengthy, and hence out of the activities involved in following the full to be obtained from its use (Floyd, 1986). That is not an proportion to the benefits that are likely heuristics that can be used with the (more rigorous) early stages of modelling – which heuristics that can be used with the (more with some means of utilizing the experience is where it would be useful to be provided of others. restructure any untidy nested tests and selections, and to handle those iterations whose restructure any untidy nested tests and are largely similar to those of the technique completion may be uncertain. The details further detail here. used in JSP and we will not go into any unfavourably with those used in the much less for such a method, and compare not to make, though, is the relative lack of any ambitious JSP. Perhaps the main point Once again, the basic concepts involved in this heuristic have been derived from the concepts involved in this heuristic Once again, the basic heuristics, this one is normally However, unlike the previous two experience of JSP. the later stages of the design analysis tasks, rather than in used during the initial activity. Once again, the purpose of this heuristic is to life history, such as its premature end. more abstract version of the above, and the design task involved is concerned with of the above, and the design task more abstract version used for this is ‘state vector of the re-entrant structures. The term organizing the details with the physical mapping this is a task that is very much concerned separation’. Since implementation stage. normally performed during the final of the solution, it is 15.4.3 Backtracking systems, where one solution adopted to improve memory utilization is ‘re-entrancy’. utilization memory improve to adopted one solution where systems, used by each process, of the data areas maintaining copies the system in This involves includes the value area for a process the code. (The data only one copy of but storing are to be executed parts of the code to determine which counter, used for its program when it resumes.) SDC15 9/18/07 11:19 AM Page 337 AM Page 11:19 9/18/07 SDC15 . . 2nd edn. . Prentice-Hall Software Engineering Fundamentals: The Jackson Approach Software Engineering Fundamentals: JSP and JSD: The Jackson Approach to SoftwareJSP and JSD: The Jackson Approach to Development Jackson System Development Chartwell-Bratt IEEE Computer Society Press Further reading Ingevaldsson L. (1990). flavour, and A short text that is constructed around a running example. It has a rather strong DP the author makes excellent use of annotated diagrams to help make his points. Sutcliffe A. (1988). and providing two useful case studies in its appen- A compact book, written with a clear style, a complete practitioner’s guide, but would provide a dices. It is not extensive enough to act as method. good introduction to the techniques of the Cameron J. (1988). of JSD, and has published quite widely on its The author has been one of the codevelopers the book is dedicated to JSD, and while, like all IEEE application. Somewhat more than half of papers, it has a much stronger tutorial element than tutorials, it is largely composed of reprinted well suited to providing an initial introduction. is usual. A major source-book, but not so The range of textbooks is relatively limited, although the existing ones complement each other The range of textbooks is relatively limited, Some major ones are as follows. quite well in terms of approach and style. There is a quite solid base of experience with the use of JSD in the development process. In base of experience with the use of JSD There is a quite solid textbooks, and particularly support available in terms of introductory particular, there is some (1988) contain quite extens- material – Cameron (1988a) and Sutcliffe in terms of good case-study may still be capable of further development, and it has ive case-study material. As a method, it thinking. certainly exercised a wide influence on design decompositional approach illustrated in Chapter 13 seems to be justified. The early analysis illustrated in Chapter 13 seems decompositional approach deferred until a fairly sound model and the ‘creative’ activities are steps are relatively rigorous, the earlier parts of this book, any However, as we have also observed in has been constructed. to be two-edged, and we should between design methods are apt attempts to draw comparisons strategy when it is considered apart drawing comparisons about the design particularly beware of or problem domain. from a particular problem The role of the implementation stage is also important, for it is in this transformation to a phys- this transformation for it is in is also important, stage implementation of the The role JSD structure. Again, the benefits of a good to undo many of the that it is possible ical design as we have continually might be hoped, but less extensive than for this task are rather guidelines are itself, and there of the act of designing this is in the nature this book, observed throughout that we can expect. of rigorous guidance upon the degree definite bounds the systematic than method is more that JSD as a compositional the argument Overall, though,</p><p>Jackson System Development (JSD) 338 SDC15 9/18/07 11:19 AM Page 338 AM Page 11:19 9/18/07 SDC15 Exercises 339 records and issues system will need to be modelled by using: records and issues system (a) function processes; interaction (b) function processes. information (c) firm. the ‘customer’ of a car-hire Discuss the benefits and dis- the data flow using rough merge. separately and combining in which it would be scheme, and for each one suggest an instance advantages of each a form. appropriate to use such (a)a public lending library; the ‘customer’ of (b) machine; of an automatic washing the operational cycle Exercises 15.3 a library above, consider what operations of For the lending library of Exercise 15.1(a) 15.2 from these there is a choice between receiving data Where a process has two data streams, 15.1 an ESD that describes: Construct SDC15 9/18/07 11:19 AM Page 339 AM Page 11:19 9/18/07 SDC15 SDC15 9/18/07 11:19 AM Page 340 SDC16 9/18/07 11:22 AM Page 341</p><p> chapter 16 341 Designing with Objects</p><p>16.1 The ‘object concept’ 16.3 Object-Oriented frameworks 16.2 Design practices for the 16.4 Object-based design object-oriented paradigm 16.5 Object-Oriented design</p><p>Objects with a capital ‘O’ have occupied a position centre-stage in software development since the early 1980s. The word ‘object’ appears in many conference titles. The literature on most aspects of their form, develop- ment and use is voluminous, with the possible, and rather significant, exception of empirical studies. In addition, almost all programming lan- guages developed since 1990 have had object-oriented features, and such features have also been retro-fitted to some older programming languages! Indeed, object-oriented programming is widely accepted as an important and powerful way of creating software systems.</p><p>Despite all of this, the task of designing with objects remains a significant problem. Analysis and design methods have proliferated and been unified; the pattern concept described in Chapter 10 has been devised to help address the problem; and further mechanisms such as frame- works have been introduced. However, useful as all of these have been, designing with objects remains a complex cognitive task.</p><p>This chapter addresses the challenging question of how we can design sys- tems with objects using design methods. It examines the concept of the object; reviews the conceptual issues it raises for design activities; and then describes some of the approaches to designing with objects that have been developed. has already been encountered in various places in this book: in various places been encountered has already object The development of ‘object-oriented’ systems (regardless for the moment of the The development of ‘object-oriented’ systems (regardless for the moment This should not be considered as being an argument against the usefulness of the This should not be considered as being We begin by reviewing the concept itself in This chapter is therefore a large one. There are good reasons for deferring the study of objects and object-oriented for deferring the study of objects There are good reasons ‘My guess is that object-oriented programming will be in the 1980s what structured ‘My guess is that object-oriented programming will be in the 1980s what programming was in the 1970s. Everyone will be in favour of it. Every manufacturer exact interpretation of the term) received much attention in the 1980s and through the exact interpretation of the term) received much attention in the 1980s and relevant con- 1990s. While there is now greater consensus about the meaning of the Indeed, the cepts, we still lack any very prescriptive design methods based on them. words used by Tim Rentsch (1982) now seem to have been truly prophetic: In this chapter we address what must be the most complex design strategies that are In this chapter we address what must this has been compounded by the extent to described in this book. To some degree been interpreted to mean so many, slightly differ- which the term ‘object-oriented’ has interpretations of this term will be examined in ent, things and, indeed, two distinct the general and the specific, the term ‘object- this chapter. (To help distinguish between when referring to the general paradigm; upper- oriented’, in lower case, will be used specific methods that are based on this strategy.) case leading letters will be used for the the rest of this section, go on to consider some of the implications of its characteristics the rest of this section, go on to consider examples of the procedural design practices that for design, and then examine some are employed when designing with objects. 16.1.1 of the problem The scope object concept itself, only as a rationale for deferring its detailed study until now. object concept itself, only as a rationale a valuable and powerful implementation Object-orientation undoubtedly constitutes oversold on occasion. However, as we will see, paradigm, albeit one that is apt to be are not as convincing (at least for design) claims for its ‘naturalness’ as an abstraction as some advocates would have us believe. tual issues involved (Vessey and Conger, 1994; Sheetz and Tegarden, 1996, Détienne, (Vessey and Conger, 1994; Sheetz tual issues involved relatively complex pro- the design methods themselves employ 2002). In addition, the 1990s and into the 2000s. continued to evolve throughout cesses, that have also itself, designing with objects is longevity of the object concept So, despite the relative well understood, easy to teach, or necessarily easy an activity that is by no means either to practice, once taught! be particularly relevant to the issue at hand. In this chapter we now study the object as study the object this chapter we now issue at hand. In relevant to the be particularly the procedural design methods its own right, and describe some of a design element in for designing with objects. that are employed the nature of the object late stage. One of these concerns design until this relatively grapple cognitively with as exist of how novice and expert designers itself. Such studies that there are many concep- are surprisingly few of them), indicate objects (and there 16.1 concept’ ‘object The of the The concept and by a number of design patterns; style; as the subject for an architectural as the basis each of these topics in Chapter 7. For that were described representations of the visual to were considered object concept that elements of the only those we have employed</p><p>Designing with objects 342 SDC16 9/18/07 11:22 AM Page 342 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 343 device: its primitive oper- and Eiffel, and through the influences of and Eiffel, and through action-oriented ++ The digital computer is basically an Before studying the methods though, we first need to enlarge a little on our picture Before studying the methods though, Unfortunately, the relative success of the development of ways of implementing Unfortunately, the relative success of Designing an abstract data type, normally involves seeking to establish the prop- data type, normally involves seeking Designing an abstract will promote his products as supporting it. Every manager will pay lip service to it. lip service will pay manager it. Every as supporting his products will promote what just will know no one And it (differently). practice will programmer Every it is.’ ations (instructions) are concerned with performing actions (arithmetical operations, ations (instructions) are concerned with performing actions (arithmetical reviews of the whole object-oriented paradigm is given in Booch (1994), which in- reviews of the whole object-oriented paradigm is given in Booch (1994), interestingly cludes a survey of historical issues. In contrast, Taivalsaari (1993) uses an ‘viewpoints’: different framework, and examines the ‘notion’ of an object from five imple- conceptual modelling; philosophical; software engineering or data abstraction; covering a mentation; and formal. For our purposes however, a much briefer outline number of salient points should suffice. extend our knowledge about object-oriented design, so does study of methods. extend our knowledge about object-oriented characteristics. of the ‘object model’ and its principal 16.1.2 A brief history is quite long and complex; one of the best The full history of the ‘object concept’ evolved their own characteristic forms. Overall though, they are still less prescriptive evolved their own characteristic forms. examined in the previous three chapters. (Indeed, in form than the methods that were suitable procedural practices for designing with the problems encountered in devising for devising ‘alternative’ mechanisms such objects may well be one of the motivations and methods provide access to much use- as design patterns.) However, both patterns in the same way that studying patterns helps to ful knowledge for the designer and, of the abstract data type (ADT), and much of this can be grouped under the heading of the abstract data type (ADT), and ‘object-oriented’. termed ‘object-oriented programming’ or OOP) object-oriented structures (frequently degree of success in designing around these con- has not been matched by the same evolved through the 1990s and into the 2000s. cepts. Design methods have themselves of ‘structured design’, they have gradually Drawing initially from the experiences erties of the type elements, and identifying the operations that are performed upon elements, and identifying the operations erties of the type any implementation-specific it is good practice to avoid making them. In doing so, practices are now better decisions. Given that information-hiding assumptions and surprising that there has been programming languages, it is not supported by modern and constructing systems based on the concept a corresponding interest in developing COBOL provided powerful structures for expressing actions, but had only relatively powerful structures for expressing COBOL provided exist between the data ele- modelling the relationships that could primitive forms for more recent imperative pro- In the evolution that has led to the ments of a program. such as Ada, Java, C gramming languages, changing emphasis, with especially, there has been a gradually Pascal and Smalltalk and using abstract data types. within a language for implementing increasing support The shift of conceptual viewpoint that the object-oriented paradigm involves is paradigm involves object-oriented that the of conceptual viewpoint The shift to languages used programming of the imperative reflects the development one that and as FORTRAN languages such Early programming so many systems. implement SDC16 9/18/07 11:22 AM Page 343 AM Page 11:22 9/18/07 SDC16 Figure 16.1 shows the way in which data structures. The evolution of programming language features between actions and data- The evolution of programming language features So it is hardly surprising that the longer-established software design methods have So it is hardly surprising that the longer-established software design methods generally provided an action-oriented emphasis in their approach to the construction generally provided an action-oriented emphasis in their approach to the that the early programming tools were themselves action-oriented in nature. Assem- that the early programming tools were themselves action-oriented in nature. that are bler code and early high-level languages such as FORTRAN have forms little in almost entirely concerned with describing the structure of actions, and provide the way of facilities for modelling the balance between these has evolved with programming language development. Figure 16.1 modelling. of control, and so on). So it is not surprising logical operations, copying of data, transfer</p><p>Designing with objects 344 SDC16 9/18/07 11:22 AM Page 344 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 345 The key outcome for our purpose here is that the essential properties of an object The key outcome for our purpose here is that the essential properties of As these ideas emerged, various efforts were made to maintain consistency of con- As these ideas emerged, various efforts Over a period of time, these influences began to come together in the idea of the Over a period of time, these influences In a relatively early and highly influential paper, David Parnas (1972) had already and highly influential paper, David In a relatively early However, quite early on in the development of programming tools, the idea of of programming the development quite early on in However, within objects and only directly accessible to that object). within objects and only directly accessible are organized around data (nouns) rather than actions (verbs); are organized around data (nouns) rather so that data and operations within an apply strict control of scope (visibility), use by other objects except through the exter- object are not normally available for nal mechanisms provided by the object; (i.e. any data used in the system is stored make use of little or no ‘global’ data terms and keywords!) in part, by rather more commercial reasons. agreed, is at are now generally well agreed. Equally, the terminology, if not always least used fairly consistently. (These points probably apply chiefly to object-oriented appear to analysis and design, rather than to implementation, since language designers the same have delighted in finding new terms to use as well as different ways of using Some of these issues relating to scope and access were described in Parnas (1979). Some of these issues relating to scope was made by a working group, whose cepts and terminology. A useful contribution (1993). A little later, the Unified Modeling Lan- conclusions are reported in Snyder role in this, even though motivated, at least guage (UML) has also played an important n n n that could be used for generating designs in such a way as to ensure they would that could be used for generating as we will see, it appears that the possess the necessary properties. Unfortunately, failed to improve upon this position to any efforts of the next three decades have significant degree. that: ‘object model’, characterized by implementations introduced these concepts to a much wider audience. introduced these concepts around the principle of that could be gained through designing identified the benefits subsection, is one of the char- which, as will be seen in the next information-hiding, recognized that, while the system. However, Parnas acteristics of an object-oriented to find any procedural form of design action principle was valuable, it was difficult modelling the structure of a problem around the concept of ‘passive’ objects of some of a problem around the concept modelling the structure considered a significant explored. <a href="/tags/Simula/" rel="tag">Simula</a> in particular is generally form began to be not least for its intro- of the object-oriented paradigm, forerunner of the development later in this section. (Such an a concept which will be considered duction of the ‘class’, considered as ‘noun-oriented’ a problem could perhaps be approach to modelling this model still further and The Smalltalk system extended rather than ‘verb-oriented’.) of a model for a solution, with functional decomposition providing a rather extreme a rather providing decomposition functional with a solution, model for of a we see of JSD, do as that such in later forms, Only strategy. a design of such example that are concerned of the model between the elements balance occurring a more even the design steps them- data. Even then, with the and those concerned with the actions action-oriented model by considering developing the still directed towards selves are a problem. features of SDC16 9/18/07 11:22 AM Page 345 AM Page 11:22 9/18/07 SDC16 , and has some form behaviour , exhibits state , as illustrated in Figure 16.2, which shows a model that we encoun- , as illustrated in Figure 16.2, which A simple illustration of the ‘object concept’. identity While this is hardly a rigorous definition, it is sufficient for us to be able to iden- While this is hardly a rigorous definition, relatively little global data; and a structure that is a network, rather than a tree. be represented as a Structure Chart, which is of course treelike in form; and as the be represented as a Structure Chart, which is of course treelike in form; data struc- method provides no direct guidelines for creating local data structures, any tures in the solution are likely to be global in scope. n n as Structured This can be compared to the form of design produced by a process such solution can Design, as described in Chapter 13. Here, the description of the resulting tify the prime characteristic of an object, which is the unification of algorithmic com- tify the prime characteristic of an object, of two different aspects that need to ponents and data abstraction. This combination of the major viewpoints (function, behaviour, be described through the use of all four two of the main characteristics of a design structure, data modelling) in turn creates principles: that it will possess that has been developed using object-oriented For our purposes, we can regard an object as some form of entity that performs For our purposes, we can regard an local state that may be modified by the computa- computations and has some kind of a tions. On this basis, an object possesses of distinct this is very close to the concept of an abstract tered in Chapter 10. (In many ways, not usually consider that an ADT ‘performs data type, although perhaps we would computations’.) Figure 16.2 16.1.3 an object The properties distinguish that</p><p>Designing with objects 346 SDC16 9/18/07 11:22 AM Page 346 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 347 to conceal. Obviously, the concepts of to conceal. Obviously, the concepts what For many action-oriented design strategies, the basic level of modularity is the sub- For many action-oriented design strategies, the basic level of modularity is It is an essential property for any form of design object that its characteristics It is an essential property for any form An object-oriented model adds a framework to this basic concept of an object, in an object, of basic concept to this a framework adds model An object-oriented modularity hierarchy abstraction encapsulation program, and the interconnection mechanism is a combination of the subprogram- program, and the interconnection mechanism is a combination of the interface. calling mechanism (invocation) and the parametrization of the subprogram Modularity of different Again, this concept is one that we have already encountered in a number individual forms. Basically it is concerned with partitioning the model of a system into criterion in components (often termed ‘separation of concerns’), and an important between the evaluating any choice of components is the complexity of the interfaces resulting modules. abstraction and encapsulation are largely complementary, and some authors would abstraction and encapsulation are largely not separate them in this list of properties. easier to make changes to them without creating side-effects for the system as a whole. easier to make changes to them without for detailed design and implementation. At Encapsulation is a very important issue is a more abstract level, the key issue Encapsulation a realization of the concept of information- This is basically a term used to describe features of an object that are not essential to hiding, whereby we seek to conceal those details of an object, it is then much its abstraction. By concealing the implementation without a need to possess any knowledge about its internal details. without a need to possess any knowledge in an abstract manner. For the ‘object-oriented’ should be capable of being identified performs an important role in modelling the forms of design process, abstraction design is largely about how to select the objects in a system, and indeed object-oriented modelling a problem. ‘correct’ set of abstractions for use in Abstraction role in the design process in been identified as playing a major Abstraction has already view of an object (that is, the with describing the external general. It is concerned description of that object, which can then be ‘essential features’). It provides a concise and about its relationships with other objects, used to reason about its behaviour, n n here that some authors merge reviewed below. (We should note and these are briefly modularity with encapsulation.) order to make what Booch terms the ‘object model’. Booch considers that this model that this considers Booch model’. the ‘object terms what Booch to make order elements: has four major n n SDC16 9/18/07 11:22 AM Page 347 AM Page 11:22 9/18/07 SDC16 ). The vehicle to the class. . So this forms a good point at which private (which is itself a subclass of class , used to create objects. The class defines car relationship) or the template uses object to other objects or kept of a class. We can therefore expect that a class specification will of a class. We can therefore expect that , by which the properties of an object can be derived from the prop- , by which the properties of an object The hierarchy based on class structure leads us to consider the con- The hierarchy based on class structure visible instance as used in a programming language. While the concept of type is normally as used in a programming language. inheritance type Viewed in terms of the eventual implementation roles, a class specification can Viewed in terms of the eventual implementation A common example of the class concept This concept is not unique to software. The concept of a class can be considered as a natural development of the concept The concept of a class can be considered The ‘correct’ choice of modules is in many ways as critical for the success of any as critical for is in many ways choice of modules The ‘correct’ class structure interdependency of objects (the . (Ignoring for the moment any differences of make and model, the concept of a car . (Ignoring for the moment any differences of make and model, the concept needs to be employed with a particular instance of a car, which itself will have a unique needs to be employed with a particular instance of a car, which itself will have while still identity (registration number, age, registered owner, model, maker, etc.), that we use in everyday life is that of the has the basic act of passing a driving test is intended to demonstrate that a person the class knowledge needed to handle the state and behaviour model associated with car is pressed, provides common ideas of behaviour, such as what happens when the brake then the steering wheel is turned, etc.) However, to be of practical use, this knowledge describe behavioural features as well as data structures and that, further, these features describe behavioural features as well may be made therefore be regarded as a form of an object and, when an object is created (instan- the state and behaviour attributes of a unique identity. tiated) from a class, it also acquires to discuss the class/object relationship more fully. to discuss the class/object relationship of a data elements of ADTs), the class notion is much applied to data objects (including the an abstraction of an object, with an object more general, and a class can be considered forming an Class hierarchy cept of of other classes). The question of the relative erties of other objects (or, more correctly, design comes close to being a theolo- importance of inheritance for object-oriented that we will return to later, as to whether the gical issue. Indeed, it introduces an issue ‘right’ design abstraction is the consider is that of subprogram invocation. For the object-oriented paradigm we need subprogram invocation. For the object-oriented consider is that of hierarchies, which are based on: to consider two further n n Hierarchy form of ranking for the abstrac- concerned with establishing some Hierarchy is mainly Design, the abstractions the system model. In the case of Structured tions that make up form of hierarchy to as subprograms, and so the appropriate will usually be realized For the object-oriented strategies, this concept takes on a somewhat wider connota- wider somewhat on a takes this concept strategies, object-oriented For the in nature. complex may be more interface corresponding of the and the form tion, more implementation- it is also a of abstractions. However, as the choice design process pro- features of the into account the may need to take and one that based decision, as the configuration the design, as well be used to realize language that is to gramming of the final system. components of the hardware</p><p>Designing with objects 348 SDC16 9/18/07 11:22 AM Page 348 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 349 amount bank account) my . Because the ability to drive ability to the . Because car is the mechanism by which subclasses acquire the general properties Inheritance The subclasses of a class will share common structures and common features of a class will share common structures The subclasses of In a programming language it is possible to construct new types from existing language it is possible to construct In a programming While such an analogy should not be taken too far (the instantiation processes are far (the instantiation not be taken too an analogy should While such withdrawal of part of the balance creation of a new account addition of interest current balance identity of owner date of creation and share some common information structures, such as: and share some common information static data relationships but also behavioural qualities. static data relationships with many different forms of a bank may provide customers behaviour. For example, is paid, how charges will have different rules about how interest account, which may notice, and so on. However, all balance required, withdrawal be applied, the minimum subclasses of the ‘parent’ class of bank account, these forms are clearly recognizable as to any instance. (records, sets, arrays), or by compounding them in some way types, typically by of thing with classes, but the type. We can do much the same sort defining a subrange is much more complex mechanism used to create subclasses associated inheritance needs to incorporate not just creating dependent types, since it than that needed for involves using knowledge that pertains to the whole class, the act of driving a different driving a act of class, the the whole to that pertains knowledge using involves to adjustments necessary parametric involve making any should then only instance engine size, etc.). (width, length, its particular features allow for concept in provid- usefulness of a class demonstrate the different), it does clearly very that will then apply interactions capture behaviour-state that can ing a generalization of their parent class(es). (It is this relationship that forms the hierarchy associated of their parent class(es). (It is this relationship that forms the hierarchy inherit the with inheritance.) In our example, any specific form of bank account will will, of course, also depend on the values assigned to the data structures (the will, of course, also depend on the values assigned to the data structures concerned of my current balance). For design purposes, however, the designer is only (three- with the abstractions involved in the class (bank account), and the subclasses Figure 16.3 year account, current account, high-interest deposit account, and so on). illustrates these points concerning the class concept. n of ‘bank account’ provides a description of these For this example, therefore, the class while the detailed form of a particular type of common properties and behaviour, applying to that subclass. (For example, some account will depend on the rules may pay interest annually, quarterly or monthly, accounts may pay no interest, others implementation objects ( and so on.) The behaviour of the eventual as well as some common operations, such as: as well as some common operations, n n n n n exhibiting the behaviour-state model of the class the class model of behaviour-state the exhibiting SDC16 9/18/07 11:22 AM Page 349 AM Page 11:22 9/18/07 SDC16 single , through which a subclass will , 1999). et al. multiple inheritance The concepts of class and inheritance. (this is where a subclass inherits the properties of one superclass). How- (this is where a subclass inherits the Inheritance also (indirectly) leads to an issue that we have briefly touched upon Inheritance also (indirectly) leads to an issue that we have briefly touched In the above example of bank accounts, we have only considered the use of In the above example of bank accounts, sider specific objects later, or do we concentrate on modelling objects and then abstract sider specific objects later, or do we concentrate on modelling objects and the scale of the cognitive tasks that the designer is expected to manage, with potential the scale of the cognitive tasks that the designer is expected to manage, with problems for future maintenance (Wood summarized already and that we will return to later in this chapter. This issue can be objects or through the question: ‘Does object-oriented design involve designing with and con- with classes?’ In other words, do we seek to identify candidate classes first, inheritance ever, it is also possible to employ superclasses. Obviously this adds considerably inherit the properties of two or more process (for example, what happens when the to the complexity of the inheritance definitions?) and, indeed, for this reason some superclasses have conflicting property most notably Java, will only permit the use of object-oriented programming languages, multiple inheritance certainly increases single inheritance. From the design viewpoint, properties of bank accounts in general, but may have some features that apply only to properties of bank accounts in general, period, and so on), while some of its oper- that subclass (minimum balance, interest apply only to that particular type of account. So ations may contain algorithms that concept (hence its rapid assimilation into inheritance is an important constructional programming languages). Figure 16.3</p><p>Designing with objects 350 SDC16 9/18/07 11:22 AM Page 350 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 351 hierarchy, as shown in Figure 16.4, identifies the hierarchy, as shown relationship (Parnas, 1979) and it describes a hier- and it describes a (Parnas, 1979) relationship uses hierarchy between objects. uses uses The form of dependency involved in an object structure hierarchy in an object of dependency involved The form Examples of the While there are those who consider the concept of inheritance as being central to who consider the concept of inheritance While there are those Figure 16.4 cerned with developing a design model by considering the first three properties of the a design model by considering cerned with developing that is based largely on the with constructing a module hierarchy ‘object model’, and extent to which the operations of one object (module) depend upon the availability of operations of one object (module) extent to which the by other objects (modules). the services provided design practices are only con- paradigm, some ‘object-oriented’ the object-oriented from these to identify the classes? Of course, in practice, since both strategies are quite both strategies since in practice, Of course, classes? identify the these to from be of them should which deciding one of more then becomes question ones, our viable in any given context. employed Uses hierarchy corresponds to the essentially inheritance is concerned with identifying how the properties of objects are derived with identifying how the properties inheritance is concerned parents, the from those of their archy that exists among modules in terms of the services that they provide. While the services that in terms of exists among modules archy that SDC16 9/18/07 11:22 AM Page 351 AM Page 11:22 9/18/07 SDC16 , in C A object-based B architectural style, and D Data structures , since the associated concept of call-and-return (b) Call and return (b) Call and call viewed as a graph typing Y c() b() Z X (subprograms, methods) (subprograms, Executable units of code units Executable A B C D b() d() a() introduces an important constructional issue which we need to con- introduces an important constructional Comparison of static call and return construction with dynamic OO forms. Comparison of static call and return construction relationship. It is now common to describe such forms as being relationship. It is now common to describe In Figure 16.5(a) we show a program that is constructed from four subprograms, Figure 16.5 illustrates schematically a key difference between ‘conventional’ pro- Figure 16.5 illustrates schematically While these four elements are generally accepted as forming the major constituents While these four elements are generally or contained as local data within the subprograms. Linkages and connections between or contained as local data within the subprograms. Linkages and connections at the the subprogram and the data within such a program are effectively determined at the price of some distortion.) through the A, B, C and D, rather as it might be mapped on to a computer’s memory call processes of compilation and link-editing. Figure 16.5(b) shows the corresponding are con- graph (equivalent to a Structure Chart) that shows how the subprograms as a whole, nected at run time. The data components are either ‘global’ to the program polymorphism sider here. in a gram forms, based upon using subprograms (From an implementational viewpoint, this the form of an object-oriented solution. by the way that object-oriented program- distinction is sometimes further confused to construct both types of solution, admittedly ming languages such as Java can be used order to make clear that they do not attempt to include decisions about inheritance, order to make clear that they do not the rest of this chapter and wherever this distinc- and this terminology will be used in tion requires to be made. only ones. One other issue that we need to of the object model, they are not the is that of consider from the design perspective Figure 16.5 uses (c) Object-oriented using methods (a) Call and return (a) Call and using subprograms data and shared</p><p>Designing with objects 352 SDC16 9/18/07 11:22 AM Page 352 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 353 in poly- . Since static b() that provide withdraw() methods , with the appropriate Z.b() .) or . (The mechanism for determining . (The mechanism , no confusion need arise. More use- , no confusion need Y.b() run-time Z.b() , and that methods belong to the objects, rather , and that methods belong to the objects, run-time method, but that the detailed form of the method, but that the detailed form of object-identifier.method-identifier for this purpose. (It is a common convention to give the full refer- is a common convention to give the for this purpose. (It withdraw() , we can expect that the context of that reference will be used to determine the context of that reference will be , we can expect that Y.c() . (Strictly, although our example is couched in terms of objects, the methods . (Strictly, although our example is couched b() or A valuable contribution to capturing the essentials of the ‘abstract object model’ A valuable contribution to capturing the essentials of the ‘abstract object What is important here though is not the mechanism of polymorphism itself, but What is important here though is not It is this ability to select the appropriate method from a number of methods with It is this ability to select the appropriate However, we might also note that object Z also provides a method also note that object Z also provides However, we might The object-oriented equivalent is shown in Figure 16.5(c). Since this is purely a 16.5(c). Since is shown in Figure equivalent The object-oriented ‘an identifiable entity that plays a visible role in providing a service that a client ‘an identifiable entity that plays a visible role in providing a service that (user or program) can request.’ ferent <a href="/tags/Conceptual_model/" rel="tag">conceptual model</a>. a list of ‘core is provided in Snyder (1993), which summarizes an attempt to draw up by vari- concepts’ for such a model, with the aim of avoiding the confusions caused ations in terminology. For this model, an object is considered to be rather the way in which it highlights and illustrates the idea that the eventual system is rather the way in which it highlights one that is bound together at It is this characteristic that forms a key con- than being a static element of the system. forms and other technologies, and also structional distinction between object-oriented actions and the data that occurs in such systems. highlights the close link between the characteristic that creates such a radically dif- From a design perspective, it is also this example of the Bank Account and its subclasses, we might expect that all classes example of the Bank Account and will provide a type of account involved. So when this operation operation will differ according to the form used will depend upon the class of that is used with any given account, the as being typed by the class that contains account. We can therefore regard methods they return. them, as well as by any data values that the decision about which method to use can be made at run-time. In contrast, in the the decision about which method to 16.5(a), the equivalent bindings are determined statically-bound structure of Figure be modified. at time of compilation and cannot thereafter in different classes, that is termed the same name (or identifier), but originating morphism classes.) To return for a moment to the earlier themselves are defined in the parent choice being made automatically and at choice being made Because in Figure 16.5(c) will depend upon implementation detail.) which one is used created dynamically when the system runs, the bindings between the objects are fully though, in an object-oriented system, whenever object X makes a reference to a object-oriented system, whenever object fully though, in an method method to use is whether the appropriate methods use a restricted form of the procedure/subprogram constructs.) So now, if form of the procedure/subprogram methods use a restricted do so by using the methods access data held in object Y, it might object X wishes to Y.b() ence to a method as from X (or Y), as this can be referenced time when it is compiled and linked, and hence can be regarded as being can be regarded hence and and linked, is compiled when it time nature. how the functionality here with not concern ourselves illustration, we need schematic are will also assume Y and Z (which we three objects X, between the is redistributed provides a set of Each object different classes). created from languages, programming data. (In many object-oriented its encapsulated access to SDC16 9/18/07 11:22 AM Page 353 AM Page 11:22 9/18/07 SDC16 call-and- through the interface that they so that objects may share code, so that not all elements of the behaviour that is meaningful to their clients. that is meaningful in terms of the service that an object is required to in terms of the service to support parallel operations and the time-varying to support parallel , so the in issuing a request a client can identify that in that a service can have different implementations for in that a service can have different implementations characterizing the abstraction that is embodied in an that is embodied the abstraction characterizing so that clients cannot directly access or manipulate data so that clients cannot for the services that are provided by objects. for the services that style, the abstract model is one that is described in terms of statically-linked style, the abstract model is one that is described in terms of statically-linked Having now reviewed the main characteristics of the object model, since this is a Having now reviewed the main characteristics although generally they do not share data, making for efficiency of implementation although generally they do not share in a system. where multiple instances of objects exist Objects can share partial implementations objects are sharing an implementation. of objects need be shared where the Operations can be generic different objects. their services Objects can be classified in terms of present to clients. Objects can have a common implementation provide. objects Requests can identify service it. object that should be created New objects can behaviour of a system. affect other objects. Clients issue requests Objects are encapsulated associated with objects. operations Requests identify Objects embody an abstraction an abstraction Objects embody services Objects provide an object and may data within may access or modify such a service object, where style, the control and data topologies are also more or less the same, so that map- style, the control and data topologies are also more or less the same, ping a design model on to a given procedural language is a relatively straightforward In order to design software that can be realized in a given architectural style, the In order to design software that can be realized in a given architectural but also some designer needs to possess not only a good conceptualization of that style, of abstract clear cognitive mappings that link design ideas (expressed as some form the model) to the implementation constructs employed by that style. For return subprograms, with these having well-defined functional roles. For the call-and-return book about design, it is appropriate to conclude this introductory section by briefly book about design, it is appropriate the conceptual issues that the object model considering some evidence concerning we consider the difficulties that these can present raises when designing. In particular, for the novice designer. 16.1.4 model the object presented by issues Some conceptual n n n n n n n n n A summary of the core concepts of the proposed model is given below: it seems to sum- it seems below: is given model of the proposed concepts the core of A summary very well. paradigm object-oriented of the the issues marize n n</p><p>Designing with objects 354 SDC16 9/18/07 11:22 AM Page 354 AM Page 11:22 9/18/07 SDC16 The ‘object concept’ 355 learn- pipe and and . The basis for this call and return call and return or style, the basic concepts used, both for for- basic concepts used, style, the style employs fairly simple architectural elements architectural fairly simple employs style pipe and filter object-oriented pipe-and-filter . A key issue here would appear to be the steep learning curve involved in A key issue here would appear to be That said, Détienne also notes that comparative studies have shown that: That said, Détienne also notes that comparative One of the arguments that is apt to be made in favour of the object-oriented style that is apt to be made in favour One of the arguments When employing the When employing about object-oriented design. Studies by Fichman and Kemerer (1997), Vessey about object-oriented design. Studies object-oriented approach than when using other approaches; object-oriented approach than when object-oriented design tends to be faster and easier than procedural (structured) object-oriented design tends to be faster design; that are more similar when using an different designers will produce solutions ‘early books on OO emphasised how easy it was to identify objects while later ones, ‘early books on OO emphasised how the difficulty of identifying them’ often by the same authors, emphasise ing object-centred design issues as being among the problems or sources of confusion ing object-centred design issues as being among the problems or sources for the novice designer: and Conger (1994) and Sheetz and Tegarden (1996) have all recognized that novice and Conger (1994) and Sheetz and Tegarden (1996) have all recognized with objects designers struggle to acquire and deploy the concepts. Learning to design (Vessey and would seem to take longer than for ‘traditional’ structure approaches approaches Conger); and existing (non-transferable) experience with such structured and can actually be a hindrance to acquiring object-oriented concepts (Fichman the follow- Kemerer). In the study by Sheetz and Tegarden, they specifically identified suggesting that once the necessary levels of knowledge have been acquired by the suggesting that once the necessary style does have some substantive benefits to designer, the object-oriented architectural offer. ing n n approach has not proved to be a particularly effective strategy, and as Détienne (2002) approach has not proved to be a particularly observes: ‘naturalness’. which rather undermines the case for is that it is more ‘natural’ than (say) is that it is more ‘natural’ closely reflects ‘real world’ object-oriented style is one that more argument is that the computing constructs. these other styles are based upon ‘artificial’ structures, whereas process of analysis should be quite reasonably continues), the Hence (so the argument then use the resulting model to objects in the problem domain, and able to identify the ‘solution objects’. However, in practice this help formulate a set of corresponding executed’ their design models to ensure that they behaved as intended. While it is pos- models to ensure that they behaved executed’ their design solution, the differing mental execution with an object-oriented sible to perform such binding of methods, make this together with the run-time control and data topologies, as task than when using styles such a much more complex filter process. Likewise, the Likewise, process. a that mapping linked, so closely are topologies and data control again, both and, direct operation. can be a relatively Unix processes this form on to (say) design in language, it on to some implementation and for mapping the abstract model, mulating an we noted in take a simple example, complex tasks. To of these into more turn both they often ‘mentally showed that studies of designers that observational earlier chapter SDC16 9/18/07 11:22 AM Page 355 AM Page 11:22 9/18/07 SDC16 hierarchy; class A further spur to finding a design process that could encompass object-oriented While much more can be (and has been) said about the object concept, we are now While much more can be (and has been) Some of this complexity is structural, but some also arises from the cognitive load is structural, but some also arises Some of this complexity differ; evaluating solutions; objects; communication among (the mechanism used to provide services). designing methods organizing the distribution of the functionality of the ‘problem space’ across a across space’ of the ‘problem the functionality of distribution the organizing of objects; number existing using the making use of inheritance); classes (including designing same name may methods with the the semantics of where use of polymorphism, object-oriented programming language, it can be considered to be object-based in its object-oriented programming language, it can be considered to be object-based form, since its structures support the use of: that incorporated encapsulation still remained a significant problem, and, indeed, that that incorporated encapsulation still remained a significant problem, and, model being the problems were increased further by the nature of the object-oriented so very different from the forms previously experienced. which principles came from the development of the Ada programming language, strictly an became an ANSI standard in 1983. While the 1983 form of Ada is not 16.2 paradigm for the object-oriented practices Design that, in identifying the benefits that could be In the preceding section, it was remarked of information hiding, Parnas (1972) also recog- obtained through using the principle such structures by following any well-formed set nized that it was difficult to produce philosophy began to coalesce in the late of procedures. By the time the object-oriented with providing any form of design process 1970s, it was obvious that this difficulty thinking and models that were used by the previous generation of design methods. We thinking and models that were used by in which object-oriented design practices have briefly review something of the way we review some of these design practices evolved, and then in the remaining sections in more detail. in contrast to more traditional methods where each step tends to focus upon a single in contrast to more traditional methods even with these, more than one viewpoint design attribute or viewpoint (although, may be affected). consequences for design practices. In the next in a position to examine some of the a little further and identify some of the ways in section we extend the above discussion have needed to extend and diverge from the which object-oriented design practices imposed by the need to comprehend and model so many issues at each step in design. to comprehend and model so many imposed by the need come to analyse some of the will become more evident when we This latter aspect This reveals not only that the methods using the D-matrix. object-oriented design of developing a solution, but highly complex even at early stages resulting model is step are apt to affect many aspects of it. This is also that the design decisions at each n n n n n n n</p><p>Designing with objects 356 SDC16 9/18/07 11:22 AM Page 356 AM Page 11:22 9/18/07 SDC16 Design processes for the object-oriented paradigm 357 Software mechanism, generic he moved away from a depend- construct (and arguably by using the (and arguably by construct package mechanism of Ada-83 can be used to support a mechanism of Ada-83 mechanisms). generic mechanism; Software Engineering with Ada (Booch, 1983). Booch also added a diagrammatical notation to (Booch, 1983). Booch also added a diagrammatical procedure , since the scope of data instances can be controlled via the be controlled via instances can scope of data , since the , both in terms of data typing and through the through typing and of data in terms , both , through the use of the , through and the The late 1980s and early 1990s produced a veritable flood of methods for object- The late 1980s and early 1990s produced a veritable flood of methods for Abbott (1983) proposed a strategy that could be employed to develop a design a strategy that could be employed Abbott (1983) proposed operations (methods) associated with the objects; operations (methods) associated with to help produce a more complete solution. refine the descriptions of the objects produce a written description of a ‘rough’ design solution; produce a written description of a ‘rough’ the nouns and the verbs, using the former to analyse this description in terms of and the latter to help with identifying the help with identifying the design objects modularity task abstraction algorithmic of the description in the abstraction for some allowing the latter with part; encapsulation private/public pace, but most of the methods they describe are quite immature both theoretically and empirically.’ ‘Books introducing new OOA&D methods are being published at an accelerating nique can undoubtedly be made to work successfully, it does not readily scale up for nique can undoubtedly be made to work the designer to possess some initial degree use with larger systems. Its use also requires design solution might be formed, in order to help of intuitive understanding of how a These points were recognized by Booch, and with generating the initial rough design. in the second edition of n be employed more fully in a later section, and We will examine how this strategy can other than to observe that, while this tech- so will not pursue it further at this point, assist with describing the final structure of a design. The main steps in this design strat- assist with describing the final structure egy are: n n around the ‘object-oriented’ concepts in such a way that it could be implemented using concepts in such a way that around the ‘object-oriented’ identifying the objects pre- Ada-83. His approach was based upon the main features of solution. This was devel- narrative that described the intended sent within a textual Booch in the first edition of his book oped further and extended by Grady Engineering with Ada n the However, although base types, this is really a form that is not bound to any specific definition of an ADT (which was finally added to than a means of providing inheritance of ‘template’, rather Ada in the 1995 revision). n n oriented analysis and design. Trying to review and analyse all of these in any detail oriented analysis and design. Trying to review and analyse all of these in a review here would not be profitable, not least because as Iivari (1995) commented of six analysis methods that we will return to shortly: ence upon this technique (Booch, 1987), and also developed further the notation that ence upon this technique (Booch, 1987), design solution. he used for describing the form of the SDC16 9/18/07 11:22 AM Page 357 AM Page 11:22 9/18/07 SDC16 In the rest of this section, therefore, we begin by reviewing four surveys of ana- In the rest of this section, therefore, For rather obvious and practical reasons, most comparisons of methods also tend For rather obvious and practical reasons, Any attempt at making comparisons between design practices will encounter some comparisons between design practices Any attempt at making Rather than trying to analyse and describe a selection of methods, we will review selection of methods, and describe a trying to analyse Rather than that are related to the object-oriented practices being reviewed. conducted; the framework that was used for making comparisons; and any significant conducted; the framework that was used for making comparisons; and any (As an addi- observations the authors may have made that are relevant to our theme. used tional overview, the methods included in the different surveys, and frameworks examine the by each one, are listed in Tables 16.1 and 16.2.) Following this, we also object- questions of how large classes and objects should be, and of how effectively are topics orientation really supports the idea of software reuse, since both of these number of empirical studies are reviewed in Détienne (2002), they are really dispro- number of empirical studies are reviewed the many papers about different aspects of using portionately few when compared to this situation is slowly beginning to change, objects. (In fairness, at the time of writing, of the different aspect of the object-oriented but much more empirically-based study paradigm is badly needed.) each in turn in terms of the way that it was lysis and design methods: describing to focus upon the structures of the method processes and their representation parts, to focus upon the structures of the of learning, ease of use or the type of design rather than upon such factors as ease produce. Indeed, one of the more noticeable fea- structure that a given method tends to is the relative lack of empirical studies tures of the whole ‘object-oriented landscape’ processes or resulting structures. Although a of any kind, whether concerned with of analysis and design methods themselves. (‘Ah yes, that feature wasn’t included in of analysis and design methods themselves. now been added, and so if you look at the cur- version 3.22 of the method, but it has thererent version (3.41), you will find it . . of constraining this .’) An effective way by Wieringa that, in order to be included, problem is to adopt the criterion employed in book form. This can then be regarded as pro- a method has to have been published description of that particular method, which in viding a reasonably definitive baseline turn can be used for making any comparisons. obvious methodological problems. One of these is the difficulty of finding a suitable problems. One of these is the obvious methodological the study, given that methods the comparative element of framework for conducting examining the frameworks of practices and notations. Indeed, use such different mixes more, informative than their we review here is probably as, if not used in the surveys rather ephemeral and loosely-structured nature findings! Another problem is the two of them in some detail in later sections, and in the rest of this section we seek to detail in later sections, and in the two of them in some of object-oriented analysis the outcomes from several surveys review and summarize rather different criteria and Each of these was conducted using and design methods. something of the evolu- taken collectively, they illustrate ‘method sets’; nevertheless, issues connected with the has occurred and highlight some tion of thinking that methods themselves. A rather larger survey by Wieringa (1998) provides outline descriptions of the main of descriptions outline provides (1998) by Wieringa survey larger A rather in are described of which all its appendix, in methods object-oriented of 18 features this is by no means or in journals. Since at conferences than just papers books, rather more, a figure which it is therefore, even methods, total of object-oriented a complete be that has tended to ‘method morass’ something of the sufficient to indicate should be paradigm! with the object-oriented associated</p><p>Designing with objects 358 SDC16 9/18/07 11:22 AM Page 358 AM Page 11:22 9/18/07 SDC16 Design processes for the object-oriented paradigm 359 3 grid: on one axis looking at ‘individual object’ versus 3 grid: on one axis looking at ‘individual object’ component communication system functions system behaviour system communication conceptual decomposition component functions component behaviour × preferences for both expert and trainee designers. dimensions for design. For each method surveyed, dimensions for design. For each method surveyed, and its form. considered both the presence of a dimension at structure, ‘object community’, and on the other looking function and behaviour. Kemerer 1992 Hardgrave 1999 1995 * . 1989 * . (OMT) 1991 * * . 1992 * * * et al et al Frameworks used for comparison in the four survey papers Frameworks used for comparison in the four survey Analysis and design methods included in the four survey papers the four survey included in methods and design Analysis et al Johnson and Hardgrave 1999 method Used a self-administered survey that identified IivariWieringa 1995 1998 2 Seven properties: PaperFichman & Kemerer 1992 Year published Framework dimensions for analysis, and 10 modelling 11 modelling ROOMMOSESSyntropyOMTMainstream ObjectsBONOOram 1995 1994 1994 1994 1995 1995 1995 * * * * * * * * BoochEmbleyDe ChampeauxFiresmithFUSIONOctopusSOMA 1993 1994 1992 1993 1994 1996 1994 * * * * * * * * * Wasserman Booch OODWirfs-BrockJacobson OOSEMartin & OdellRumbaugh 1989 * 1990 * 1992 1995 * * * * * Method specificationBailin OO req Coad & Yourdon 1989Shlaer & Mellor * Date 1991 Fichman & * 1992 * Iivari 1995 Wieringa 1998 Johnson & * * * * * * Table 16.2 Table 16.1 Table SDC16 9/18/07 11:22 AM Page 359 AM Page 11:22 9/18/07 SDC16 . top- ; . The comparison was not hierarchy of modules (physical assignment of operations/services to classes assignment of operations/services to identification/classification of entities states and transitions ; and ; and – regarding the object-oriented paradigm to be fundamentally differ- paradigm to be fundamentally – regarding the object-oriented – considering the object-oriented paradigm to be an elaboration of ‘struc- paradigm to be an elaboration – considering the object-oriented object states and transitions ; The design methods were compared on a similar basis, using ten design-centred The design methods were compared Writing at what was still a relatively early stage of object-oriented method devel- still a relatively early stage of object-oriented Writing at what was revolutionary rendering existing ways of structured design approaches, ent from ‘traditional’ obsolete; or thinking about design synthesis of further engineering principles to existing tured’ thinking, involving the addition design ideas and methods. our later topics, and which also reflect some earlier ones. The ones of particular inter- our later topics, and which also reflect some earlier ones. The ones of particular est here are as follows. As with analysis methods, the comparison included a description of how a particular As with analysis methods, the comparison included a description of how technique was used within a method. Key observations for some of Fichman and Kemerer noted a number of issues that have consequences only concerned with whether a modelling technique was employed in a method, but only concerned with whether a modelling is clearly rather mixed, reflecting the also how it was used. (The list of dimensions practices.) inclusion of both structured and object-oriented structured and object-oriented methods dimensions (here the distinction between used included: also becomes more marked). Headings design) Comparison framework using 11 modelling ‘dimensions’ that repres- The analysis methods were compared techniques employed in the six methods. These ented the superset of all the modelling as: dimensions included such headings down decomposition of functions For their survey they selected six analysis methods and five design methods from both For their survey they selected six analysis For inclusion, a method had to be both the ‘structured’ and object-oriented categories. representative’. (Table 16.1 lists only the object- ‘well-documented’ and also ‘broadly oriented methods involved in their survey.) n n opment, they were also interested in comparing object-oriented techniques with the also interested in comparing object-oriented opment, they were part of the purpose of their design methods. Indeed, more established ‘conventional’ it provided for either of examine the evidence to see what support comparison was to (Yourdon, 1989) as: interpretations of object-orientation the following two 16.2.1 1992 and Kemerer, Survey 1: Fichman methods. studies of object-oriented earliest comparative provides one of the This paper here; it is more the others reviewed approach to a slightly different It also takes the sense that, when in its goals in technology-oriented rather than business-oriented as making this choice consider the act of the authors the choice of a method, assessing a business investment. being primarily</p><p>Designing with objects 360 SDC16 9/18/07 11:22 AM Page 360 AM Page 11:22 9/18/07 SDC16 Design processes for the object-oriented paradigm 361 (identifying classes); (modelling global processes that might involve (modelling global (how to achieve this). function-centred and data-centred structured methods, as they data-centred structured methods, function-centred and both system partitioning/object clustering system partitioning/object modelling end-to-end process many objects); harvesting reuse 3 grid. (One square of this was actually not populated in the study, since the 3 grid. (One square of this was actually not populated in the study, since Perhaps the key issue they identified at this quite critical stage in method develop- Perhaps the key issue they identified × n n n employed in not addressed by con- important dimensions of a target system modelled ‘several ventional methods’. development work, with that were seen as needing further There were three areas these being: Object-oriented analysis methods represented radical change when they were com- were when they change radical represented methods analysis Object-oriented incremental only an but methods, structured function-centred with the pared already seen that (We have structured methods. the data-centred change over to ERDs, and will resemblance have a considerable class diagrams object-oriented of JSD later.) the intermediate role return to from the practices a radical change represented design methods Object-oriented It is also interesting to note the similarities between the elements in the vertical axis It is also interesting to note the similarities between the elements in the 5. and the elements of the viewpoints model that was introduced in Chapter the one described above), and made the observation that these tended to ‘use a broad the one described above), and made the observation that these tended to the process brush to analyse and compare the object-oriented approaches’. To make the processes more rigorous, he chose to employ a two-dimensional framework to aid the form of of analysis and comparison. This framework is shown in Figure 16.6 in a 2 community.) chosen analysis methods did not address the functionality of an object seen from Table 16.1, there is also some overlap with the methods examined in seen from Table 16.1, there is also above. Fichman and Kemerer’s study described Comparison framework analyses and comparisons (including Iivari looked at a series of previous comparative 16.2.2 Survey 1995 2: Iivari, object-oriented analysis rather than design. This survey is actually concerned with this book, analysis and design activities However, as we have recognized throughout description of this survey is still quite relevant to are rarely cleanly separated, and so a practices have evolved. In addition, as can be any review of how object-oriented design Of these three areas, the last is probably the most interesting in the present context, Of these three areas, the last is probably and we will return to it later in this section. practices did represent a radical change for ment was that adoption of object-oriented that the same authors have studied further, with an organization. (This theme is one and Kemerer (1997).) their findings being described in Fichman n n n SDC16 9/18/07 11:22 AM Page 361 AM Page 11:22 9/18/07 SDC16 Iivari’s analytical framework for method comparison. For our immediate purposes, Iivari’s study is more valuable in terms of its meth- For our immediate purposes, Iivari’s vation by Fichman and Kemerer of an affinity between the data-centred structured vation by Fichman and Kemerer of an affinity between the data-centred this paper methods and the object-oriented methods.) Also, like Fichman and Kemerer, This was conducted on a rather larger scale than the other surveys discussed in this sec- This was conducted on a rather larger scale than the other surveys discussed survey of the tion. Indeed, Appendix B of this paper provides a very comprehensive the criterion features of over 18 object-oriented methods. As mentioned previously, interesting used for including a method was that it had to be described in a book. (An between side-note is that Wieringa suggests that JSD occupies an intermediate position the obser- the structured and the object-oriented methods. This also partly reinforces odology than its outcomes. The framework for analysis that he used, shown in odology than its outcomes. The framework of techniques on a more ‘formal’ basis, Figure 16.6, helped to place the comparison where there were ‘gaps’ in the support for ana- and especially helped with identifying a method. lysis or design that was provided in 16.2.3 1998 Survey3: Wieringa, elements.) We might also observe that the lists of weaknesses were mostly longer than elements.) We might also observe that could be regarded as a consequence of the meth- the lists of strengths, although that the weakness already noted of the lack of odological approach employed! Obviously system functionality was another issue identified means for modelling the aggregated in the survey. Key observations were to highlight the strengths and weaknesses of The main outcomes from this survey in the framework (or, at least, for five of the the individual methods for each element Figure 16.6</p><p>Designing with objects 362 SDC16 9/18/07 11:22 AM Page 362 AM Page 11:22 9/18/07 SDC16 Design processes for the object-oriented paradigm 363 (how each class interacts with other classes). (how each class interacts with other (how the system is composed); (how the system interacts with external entities); (how the system interacts with external (how component classes behave over time); (how component classes behave over that describe how the different techniques inter-relate and the different techniques inter-relate that describe how (what each component class provides); for the techniques. Essentially this is the semantic element of Essentially this is the semantic element for the techniques. (how the system as a whole behaves over time); (how the system as a whole behaves (what the system provides); for representing properties of software, such as diagrams. for representing properties for the use of the techniques. The framework used for the actual comparisons is not unlike that employed by The framework used for the actual component behaviour component communication system functions system behaviour system communication conceptual decomposition component functions combine into a ‘coherent specification of software’. combine into a ‘coherent Heuristics Techniques Interpretation rules with their meaning. diagrams, concerned Interconnection rules with anything coherent at the end. However, this survey does emerge with some inter- with anything coherent at the end. However, this survey does emerge with looks quite esting observations and comments, largely because, as noted above, it niques for doing so, and so omits this aspect from his comparison (as other authors niques for doing so, and so omits this aspect from his comparison (as other have also done). Key observations to emerge One of the problems inherent in conducting such a large-scale survey is how n n model the non-functional properties of a design While also recognizing the need to of the methods reviewed in his survey offer tech- model, Wieringa observes that none n n n n n oriented context!). This framework, and the rationale for its Iivari, although structured rather differently. paper. In summary, the properties assessed for use, is discussed in some detail in the describe: each method consist of its ability to n models used in this book, similar to the viewpoint and process This model is quite the structuring of the representation parts of although it places more emphasis upon (which may well be appropriate in an object- the methods and less upon the processes n n n does review a number of structured methods although, again, we will not consider will not we again, although, methods of structured number review a does here. them framework Comparison in the study, Wieringa framework used of the comparison not strictly a part Although elements. at least the following a method to provide expected SDC16 9/18/07 11:22 AM Page 363 AM Page 11:22 9/18/07 SDC16 Despite the variety of approaches to this found Despite the variety These are seen as being the form that is most suited These are seen as Wieringa observes that the use of DFDs (and of any ‘close relatives’) use of DFDs (and observes that the Wieringa The authors also observed that the degree of comparison that could be achieved The authors also observed that the degree of comparison that could be with the In terms of its comparative element, this survey was chiefly concerned among the methods in this survey, Wieringa observes ‘overwhelming agreement in this survey, Wieringa observes among the methods diagram, component beha- must be represented by a class that the decomposition by sequence or collabor- and component communications viour by a statechart, are quite extensive syntactic he also observes that there ation diagrams’. However, use of these forms by different methods. (and interpretative) variations in the observed in the previous section, the encapsulation of data and related operations of data and the encapsulation in the previous section, observed of the object model. forms a core element Diagrams. Use of Finite State ‘the specification of local modelling because they allow for use in object-oriented and behaviour’. state, state transitions, decomposition. Conceptual system Use of DFDs. separation because of the enforced structuring with object-oriented is incompatible model. As was is implicit in the DFD processing that from the data of data storage degree of training provided for developers, their familiarity with and preference degree of training provided for developers, their familiarity with and between, object-oriented methods, and their attitudes towards them. was limited. This was chiefly because ‘a theory explaining attitudes and behaviour was limited. This was chiefly because ‘a theory explaining attitudes and they argued toward, and use of OOAD methods does not currently exist’, and hence general that the survey offered an inductive approach that would ‘use facts to develop a theory. conclusions’ and lay some of the groundwork for the development of such Comparison framework each of the two groups and a total of 160 subjects Separate survey forms were used for developers and 58 trainees). Since the survey took part in the survey (102 experienced methodological questions about sampling and was conducted on-line, there are some acknowledge. representativeness, as indeed the authors The form adopted for this fourth study differs quite substantially from those employed The form adopted for this fourth study reviewed. One key difference is that it was per- for the previous three studies we have two separate groups of subjects: experi- formed using a survey technique employing the focus was upon the respondents’ attitudes and enced developers and trainees. Also, methods and tools, rather than upon the preferences with regard to object-oriented forms of the specific methods. Wieringa goes on to discuss the consequences of this last point in terms of notational Wieringa goes on to discuss the consequences this as forming part of the rationale for devel- needs of methods and, indeed, identifies opment of the UML. 16.2.4 1999 Survey and Hardgrave, 4: Johnson n n closely at the representation parts of the methods surveyed. The conclusions of imme- The conclusions surveyed. methods of the parts representation at the closely are as follows. interest diate n</p><p>Designing with objects 364 SDC16 9/18/07 11:22 AM Page 364 AM Page 11:22 9/18/07 SDC16 Design processes for the object-oriented paradigm 365 that we examine in Section 16.5.) in Section that we examine , and of whether this is more readily achieved through quality Unified Process When considered in terms of the cognitive aspects of understanding and managing Having looked briefly at these four surveys, we now address two other issues Having looked briefly at these four If we again select those observations most relevant to our themes, these include the to our themes, most relevant select those observations If we again the most advertised benefits of OO is reuse, yet developers rated this lower than the most advertised benefits of OO ‘this is perhaps a case of trainees believing the trainees’. Their conclusion was that realising the difficulty in creating reusable hype about reuse and developers actually code’. The steep learning curve required for object-oriented methods (although the curve required for object-oriented The steep learning had been acquired). This them as useful once the knowledge respondents did view learning different forms of findings from the earlier study on is consistent with the (1994). methods described in Vessey and Conger analysis and design reuse. Here the authors observe that ‘one of The limited expectations about code The relatively large proportion of time spent on analysis and design of objects rel- proportion of time spent on analysis The relatively large to ‘normal’ expectations on coding/testing when compared ative to the time spent be because creating the It was thought that this might for software development. equivalent task for other is more time-consuming than the design for an object architectural styles. aggregated behaviour of many small objects may also be difficult to model and deploy aggregated behaviour of many small objects may also be difficult to model effectively. objects can be as small or as large as the developer wishes. What, however, is at issue objects can be as small or as large as the developer wishes. What, however, here, is the question of ones. the use of many smaller, but simple, objects, or fewer larger, but more complex, objects are the design of objects, then clearly we might reasonably expect that larger hand, the likely to be more difficult to develop and deploy (and to reuse). On the other oriented design practices. The second (reuse) did get mentioned in two of the surveys, oriented design practices. The second of issues in terms of design practice. and raised an equally important set 16.2.5 be? an object should How large discussed quite extensively in terms of object- This question is one that has been when viewed from a constructional aspect, oriented development practices. Obviously, fact caused by the self-selection of subjects, since developers and trainees who have a fact caused by the self-selection of subjects, may well be more likely to have responded to a positive view of object-orientation survey of this type. The first (size of objects) was not an issue related to object-oriented design practices. although it is of importance for object- that specifically arose from these surveys, Overall, the study found high levels of satisfaction with object-oriented methods, both Overall, the study found high levels of the authors caution, this may be partly an arti- for analysis and design. However, as n n following. n Key observations that were most the set of methods Table 16.1 indicates for this study in The entry developers were with experienced (The three most familiar the respondents. familiar to been brought which have subsequently and Jacobson, Booch, Rumbaugh those of the together in SDC16 9/18/07 11:22 AM Page 365 AM Page 11:22 9/18/07 SDC16 issue, not just a goal for the (usually of subprograms), reuse has library (2002) has examined the theory of ‘optimal theory the has examined (2002) organizational et al. (There are also organizational considerations that may encourage or inhibit reuse (There are also organizational considerations that may encourage or inhibit Unfortunately it has proved difficult to progress from this level of reuse to achieve Unfortunately it has proved difficult However, what we can conclude from this study is that what constitutes the ‘right’ can conclude from this study is that However, what we So what then does this imply for design? The first thing is that there is no magic this imply for design? The first thing So what then does An empirical study by El Emam El Emam study by An empirical individual designer or design team. Indeed, many of the serious barriers to reuse are individual designer or design team. Indeed, many of the serious barriers likely to be organizational rather than technical.) seeking to reuse existing previously developed part-designs. Equally, few methods (or seeking to reuse existing previously developed part-designs. Equally, few seek- designers) pay serious attention to the idea of ‘designing for reuse’ by explicitly ing to design objects that will be reusable in other systems. issues here, it (Lynex and Layzell, 1998). While we do not have space to review these is important to be aware that reuse is an become a significant influence upon a designer’s decisions. Also, given that software is become a significant influence upon designers are likely to be less willing to accept the so pliable (or at least, appears to be), the case in other domains, where fabrication is a constraints imposed by reuse than is that a unit should be modified as necessary more complex process. However, expecting of reusing tried and tested code. There is also a in turn removes much of the benefit solutions with software and, indeed, design tendency to design ‘made to measure’ this is so, making little provision for explicitly methods almost always assume that low level of abstraction, in the form of the low level of abstraction, in the form used mechanism. proved to be a very effective and widely of the reasons for this are technical ones. Using reuse of larger units of software. Some and so reuse at this level has little effect libraries is largely a constructional practice, seeking to achieve reuse above that level can upon the design process itself. In contrast, 16.2.6 for reuse The case one, and has been so since the earliest days The idea of reusing software is an attractive difficult to develop and debug, reusing tried and of computing. Given that software is way in which developers can hope to improve tested units of software provides one or even improving quality. Indeed, at a relatively development time while maintaining is the degree to which larger objects are likely to contain more faults (and hence, design larger objects are likely to contain is the degree to which suggest that the use of very a factor to be considered, and it does errors). This is also objects is likely to be undesirable. large and complex needs of the problem, and not should be a consequence of the size for any given object magic numbers. be influenced by any implementation-related that there is a simple continuous relation between the size of a class and the number of continuous relation between the size that there is a simple contain. faults it is likely to its own right, since if the exist- This is an important finding in ‘right size’ for objects. constitute an additional con- size’ were to be the case, it would ence of such a ‘right solutions. Secondly, there to have to incorporate into their design straint for a designer size’ for objects. This theory, arising from a number of sources, suggests that there is a that suggests of sources, a number from arising This theory, for objects. size’ an likely to occur in density) of defects the number (or curve that relates U-shaped the object will be at ‘optimal’ size for an deduces that the its size, and hence object to be small are likely to too large or too objects that are ‘U’. On this basis, base of the will be a size of object form, there given implementation prone and, for a more error hypothesis, and show not support this their findings do right’. However, that is ‘just</p><p>Designing with objects 366 SDC16 9/18/07 11:22 AM Page 366 AM Page 11:22 9/18/07 SDC16 Object-Oriented frameworks 367 mech- inherit- inheritance relationship and also relationship and mechanism described in uses uses offers yet another reuse mechanism, design pattern recognizes that when hierarchies are used for recognizes that when . categorization behaviour object-oriented application framework inheritance mechanism has proved to be a less universal solution to the problem of software mechanism has proved to be a less universal The Reuse remains an important objective, and is a theme that we will be discussing Reuse remains an important objective, of issues and, taken together with the mater- This section has covered a wide range There may also be cognitive reasons why inheritance in particular has not proved cognitive reasons why inheritance in There may also be One of the potential benefits from the use of object-oriented development is that it is that development of object-oriented the use from benefits of the potential One was observed in in practice, as seem to be evident this does not Unfortunately, the basic level object that most humans would use in assigning distinctive classification attributes would be bear. the basic level object that most humans would use in assigning distinctive classification attributes encourage reuse of design solutions. than the but this time one that is based upon reusing ‘physical’ objects. Less abstract characteristic design pattern (which itself can be used to describe frameworks), the key anisms are not the only ways in which object-oriented design solutions can be reused, anisms are not the only ways in which is the in whole or in part. Another example conceptual mechanism that can be employed to Chapter 10, which provides a more * thing; animal; mammal; bear; polar bear, and observes that Détienne offers the example of the hierarchy: living At the end of the preceding section, we examined some of the reasons why the At the end of the preceding section, we ance the intrinsic reuse than might have been hoped. However, ial of the preceding section, it provides a quite extensive context for the remaining ial of the preceding section, it provides examine some of the procedural approaches that sections of this chapter. In these, we in rather more detail. are used to develop object-oriented systems 16.3 frameworks Object-Oriented from a design perspective, most designers are probably happier using wide shallow from a design perspective, most designers inheritance trees rather than deep ones. chapter. At this point therefore we confine in both the next section and the following provides support for reuse, this is not ourselves to noting that, while object-orientation sufficient in itself to make reuse practical. the study of status for certain ‘basic (designers) will assign a special cognitive classification, users intermediate level of abstrac- hierarchy, and that these ‘stand at an level’ objects in a However, in contrast point for classification and reasoning’.* tion and form an anchor the anchor points contain- in object-orientation requires to this, the use of inheritance to the top of the abstraction hierarchy. Indeed, ing the major attributes to be assigned (1997), it would appear that reuse is only likely to occur as the consequence of separ- that reuse is only likely to occur (1997), it would appear the arguments of Lynex within an organization, reinforcing ate and specific initiatives and that ‘reuse requires the barriers are significant and Layzell that organizational revised’. and funding of development to be whole organisation Détienne (2002) suggests that strong vehicle for supporting reuse. to be a particularly has scope to encourage reuse. This arises chiefly from technological factors, not least factors, technological chiefly from arises reuse. This to encourage has scope both the reuse through promotes that object-orientation through and Hardgrave. From that of Johnson and Kemerer and study by Fichman both the and Kemerer undertaken by Fichman subsequent study also from the these, and SDC16 9/18/07 11:22 AM Page 367 AM Page 11:22 9/18/07 SDC16 , and especially in the introductory paper , and especially in At a higher level, this is an extension of the At a higher level, this is an extension ). Another is that of communication ‘<a href="/tags/Middleware/" rel="tag">middleware</a>’ Rather than using hierarchy as the basis for reuse, Rather than using hierarchy as the This is a run-time architectural characteristic that enables the This is a run-time architectural characteristic Interviews . (As a reminder, in Section 16.1 we identified abstraction, . (As a reminder, in Section 16.1 and Communications of the ACM Communications of modularity MacApp (Much as for the concept of a design pattern, there is really no overwhelming reason is really no overwhelming a design pattern, there for the concept of (Much as Inversion of control. a framework. When a given event occurs, customization of event handling within invokes ‘hook methods’ supplied by the the framework’s event dispatcher first operations. This ‘inversion’ then ‘allows application to perform application-specific to determine which set of application- the framework (rather than each application) to external events’). specific methods to invoke in response Definition of generic components. libraries, the key to success is identi- ‘library’ concept. In the case of sub-program that can be parameterized and hence fying well-defined functional operations be used for frameworks although, clearly, easily reused. The same criteria can of a much larger system unit is a rather more achieving successful parameterization difficult objective. Reuse through modularity. the concept of ‘separation of concerns’ object-oriented frameworks employ through as being the major elements of the object encapsulation, modularity and hierarchy model.) (notably such providing a layer of operations to link (potentially) remote objects through This emphasis upon reuse of actual code means that the framework concept, like that This emphasis upon reuse of actual code means that the framework concept, perform of the library, is only really likely to be effective where elements of a system frameworks tasks that are likely to be needed by a range of different applications. So of these is have tended to be particularly useful for performing well-defined roles. One evolved the graphical user interface (GUI) where some of the earliest frameworks n n teristics of the framework concept are summarized below. teristics of the framework concept are n 16.3.1 frameworks of object-oriented Characteristics the set of papers making up a framework concept is provided in A good review of the special issue of of their definitions, some of the chief charac- by Fayad and Schmidt (1997). In terms architectural style. However, as we noted when describing the design pattern concept, However, as we noted when describing architectural style. – amply demonstrated in the of the object-oriented paradigm the sheer complexity practices that are either less – does lead to procedural design preceding two sections ‘structured design’ equivalents. more complex than their well-defined or, alternatively, ways of achieving the of seeking other, more tightly focused, Hence the attraction knowledge.) transfer of design of a framework is its domain-centred nature. Since frameworks are much more closely more are much frameworks Since nature. is its domain-centred of a framework well-established to the many ways, (and in to design than to implementation related of the char- to providing a description section is confined the ‘library’), this concept of of in which the use some of the ways and then examining of a framework, acteristics the design process. might influence frameworks to the object-oriented be confined frameworks should use of application why the </p><p>Designing with objects 368 SDC16 9/18/07 11:22 AM Page 368 AM Page 11:22 9/18/07 SDC16 Object-Oriented frameworks 369 Applet defines the oper- Applet (ORB), with CORBA probably being one of (ORB), with CORBA model), it does identify an important distinction that employ object-oriented mechanisms such as inheritance employ object-oriented mechanisms define interfaces that enable other elements to be ‘plugged define interfaces that enable other elements grey box Object Request Broker Examples of white box and black box frameworks. Examples of white box . The hot spot is best defined as being that part of the framework that needs to . The hot spot is best defined as being that part of the framework that needs One other term also used when speaking about frameworks is the concept of the One other term also used when speaking about frameworks is the concept Fayad and Schmidt also classify frameworks as being ‘white box’ or ‘black box’ in also classify frameworks as being ‘white Fayad and Schmidt specific, being usable from both the tcl and perl scripting languages.) know any details of the inner workings of the framework, the development of such know any details of the inner workings more difficult, since the framework designer frameworks is made correspondingly which the framework is likely to be employed. needs to anticipate all of the ways in scope to make such a framework independ- In exchange, though, there is also more (such as occurs with CORBA), although ent of specific programming languages Window Toolkit) are still essentially other forms such as Java’s AWT (Abstract the Tk window toolkit is not language- language-specific. (In contrast again, with an actual applet then providing over-riding methods to replace these as neces- with an actual applet then providing to a given structure, which is why their sary. As a result, all applets conform which knows about the form of that operations can be called from any browser framework. Black box frameworks while this makes it unnecessary for a user to in’ to the framework code. However, White box frameworks Such frameworks clearly need to and polymorphism as the means of configuration. ‘visible’, and are apt to be language-specific make the structure of the parent classes a white box framework is Java’s in their form. A good example of such The abstract class structure, illustrated in Figure 16.7(a). (and provides empty methods for these), ations that individual applets can perform hot spot be customized for a particular application. needs to be considered by anyone seeking to <a href="/tags/Design_around/" rel="tag">design around</a> a framework. While this is a fairly simplistic classification (needless to say, some frameworks end up While this is a fairly simplistic classification (needless to say, some frameworks being classified as a n n mechanisms as the mechanisms as the Figure 16.7 the best known examples of this form. the best known examples this book. Figure 16.7 illus- much as we have done throughout form, using these terms can be described as follows. trates examples of these categories, which SDC16 9/18/07 11:22 AM Page 369 AM Page 11:22 9/18/07 SDC16 for use with they can be reused sys- they can be reused (1995). how for black box frameworks (this et al. Template Method Strategy mechanisms. There are also overlaps with There are also mechanisms. reuse (which partly anticipate some of the issues that we will , by which, as described above, the framework code calls the ) are: (1999) have examined some of the design issues involved in inte- (1999) have examined some of the design concept that will be addressed in Chapter 17, although Johnson also although Johnson in Chapter 17, will be addressed concept that et al. component inversion of control frame- application code as needed, can lead to problems when two or more this works assume ownership of the application’s main event loop and try to call simultaneously; Mattsson Since frameworks are most successful when addressing quite specific roles in a sys- Since frameworks are most successful Whether such behavioural patterns are sufficient for detailed design tasks is a Whether such behavioural patterns So our conclusion from this is that mechanisms such as design patterns are prob- from this is that mechanisms such as So our conclusion Frameworks can certainly be viewed as being as much design reuse as ‘physical’ be viewed as being as much Frameworks can certainly component Architectural design issues concept consider in Chapter 17, when we come to look at the broader, but related, of the n categories as follows. n are usually subprograms in some form, their use rarely imposes any significant archi- are usually subprograms in some form, the case for frameworks. tectural constraints, which is not really solution. In doing so, they also provide a use- grating multiple frameworks in a design of framework use. Their analysis identifies six ful introduction to a number of aspects classify into architectural and detailed design common problems, which they further moot point. They make a useful contribution in terms of overall system architecture, moot point. They make a useful contribution the concerns of a system, to use one par- but offer little guidance on how to partition ticular example. reuse in a design can be expected to tem, any large-scale attempt at incorporating much as we often use multiple libraries to pro- require the use of multiple frameworks, However, since the elements of libraries vide different aspects of system functionality. Schmidt (1997) identify behavioural patterns such as Schmidt (1997) identify behavioural ‘defines the skeleton of an algorithm in an oper- white box frameworks (this pattern and ation, deferring some steps to subclasses’); each one, and makes them interchange- ‘defines a family of algorithms, encapsulates in Gamma able’). Both of these patterns are described likely to be very specific to a given framework! Designing an application that will use to a given framework! Designing likely to be very specific influenced by the form of the a task that, at least in detail, is highly (say) Java’s AWT is that it provides. AWT and the mechanisms frameworks than procedural for designing applications that use ably more suited guide that can be more readily adapted to the methods. A pattern provides a stylistic is likely to be possible for a method. Fayad and needs of a specific framework than argues that frameworks are different from components as they are more customizable are different from components argues that frameworks he suggests that a better view of complex interfaces. On that basis, and also have more new components.) a mechanism that can help with developing a framework is as of this then begs the question reuse (Johnson). However, the answer to that question is issue we can identify is that tematically. One immediate 16.3.2 frameworks using applications Designing is apt to be much on design patterns, rather akin to that on frameworks, The literature how than on to develop frameworks guidance on how with providing more concerned concept and, indeed, with the pattern are some overlaps end product! (There to use the both are argues that Johnson (1997) the </p><p>Designing with objects 370 SDC16 9/18/07 11:22 AM Page 370 AM Page 11:22 9/18/07 SDC16 Object-based design 371 , et al. , which can arise within , which can arise , where real-world components may be , where real-world into wide practical acceptance with the , which can create problems where the ‘expec- where problems can create , which , reflecting a wider ‘component issue’ (Garlan issue’ (Garlan a wider ‘component , reflecting relationship. So, while object-based languages such as are more concerned with the content of the frameworks are more concerned language, and then later with Java. uses , that occurs when the use of two or more frameworks does not two or more frameworks when the use of , that occurs ++ used by different frameworks (such as a sensor), but with each framework frameworks (such as a sensor), but used by different even of different data representations of the data or making use of different from that component; from different frameworks integrating functionality the layers. use different frameworks to provide layered systems that using object-oriented principles, but different object-oriented techniques or principles, but different object-oriented using object-oriented implementations. components overlapping of framework integration with legacy systems legacy with integration way; in any code differ existing and the framework of the tations’ gap framework mediating the addition of further needs, requiring of the application’s cover all software; mismatch architectural been developed frameworks have even when both which may occur 1995), but Early thinking about designing with objects was also strongly influenced by the Early thinking about designing with objects was also strongly influenced Having examined the physical reuse of objects in design, in the next two sections Having examined the physical reuse We can conclude this section by observing that the development of ideas about We can conclude this section by observing n Detailed design issues are described as: involved, and these n n n n development of the Ada programming language in 1983. As a major project of the US development of the Ada programming language in 1983. As a major project development of the C Although the concepts of inheritance and polymorphism were core elements of the Although the concepts of inheritance and polymorphism were core elements upon the object model from an early point in its development, they had less influence modularity, evolution of imperative ‘object-oriented’ programming languages than encapsulation and the include an Ada-83 and Modula-2 incorporated these latter features, they did not inheritance mechanism, and this only came we go on to look at the forms of procedural object-oriented design practice that have we go on to look at the forms of procedural 1990s. also emerged through the 1980s and 16.4 design Object-based flurry of activity in the mid-1990s, tailing off in the latter part of the decade. While flurry of activity in the mid-1990s, established in the object-oriented repertoire, both both of these concepts are now well availability of guidelines which would enable are still rather lacking in terms of the of the available guidance about their deploy- their effective use for design. So far, most more detailed design and constructional issues, ment has been concerned largely with they mature and become more widely employed. something which may well change as Space does not permit us to go into further detail about their analysis of the causes of Space does not permit us to go into that they review and assess, including the these problems, nor of the possible solutions mediating software. However, their paper does use of wrappers, design patterns and of the practical issues affecting the use of frame- provide a very good review of some addressed. works, as well as of how these can be design patterns saw an immense and exciting both object-oriented frameworks and n SDC16 9/18/07 11:22 AM Page 371 AM Page 11:22 9/18/07 SDC16 to be used, so that, for some applications, an object-based to be used, so that, and Java. ++ has mechanisms of C The same general format will be used in this section that was adopted for describ- The same general format will be used The HOOD (Hierarchical Object-Oriented Design) method was developed for the The HOOD (Hierarchical Object-Oriented While in one sense this section can be considered as describing ‘object history’ as describing can be considered one sense this section While in oping Ada compilers and development environments, the task of creating the design practices needed to exploit oping Ada compilers and development environments, the task of creating the design practices needed its features was largely left to others. outcome of design rather than to support the individual development steps. There are outcome of design rather than to support the individual development steps. aspects no specific forms used for capturing behavioural, functional or data-modelling of the object model. * point. Although it invested large sums of money in devel- Whether this was recognized by the DoD is a debatable 16.4.2 forms HOOD representation both problem and solution ‘objects’ using The difficulty of identifying and modelling as one of the earliest methods, HOOD leans diagrammatical forms means that, describe the abstract design models. It does, how- heavily on the use of written text to although this essentially provides only a ever, have a diagrammatical representation, model, and so is used mainly to represent the constructional viewpoint of the design some input from MATRA’s ‘abstract machines’ approach. some input from MATRA’s ‘abstract A description of the representation forms ing the design methods in previous chapters. of the process part, and finally comes a review of is followed by an outline description the available heuristics. object-based method according to our earlier definition, it provides no real guidelines object-based method according to our the inheritance property provided through the on developing effective ways of using class CRI and MATRA, and it is the third European Space Agency by CISI–INGENIERE, Robinson, 1992). The process part is based version that we describe here (ESA, 1989; earlier work (Booch, 1983; 1986), together with heavily on the form used in Booch’s 16.4.1 of HOOD The choice design strategies was to pro- for developing object-based Since one of the motivations select one of the Ada-oriented for Ada, it is appropriate to vide a means of designing a good basis for this section, of such a strategy. HOOD forms methods as an example at Ada, there seems no reason documented, and, while targeted since it is fairly well object-oriented languages. However, being an why it should not be used with other still has some relevance. In the first place, designing with objects does not necessarily In the first place, designing with still has some relevance. mean that inheritance complicated design processes adequate. In the second, the less strategy may be quite designing with objects. introduction to the processes of provide a rather gentler Department of Defense, this language was intended to support and rationalize the rationalize and to support intended was this language Defense, of Department that object-based it was recognized hence and systems, large complex of engineering on to the features to map these needs developed in order needed to be design practices be real-time in nature, also expected to these systems were Many of that it provided.* for the method developers. an extra challenge providing it features), include full object-oriented has evolved to now that Ada itself (especially</p><p>Designing with objects 372 SDC16 9/18/07 11:22 AM Page 372 AM Page 11:22 9/18/07 SDC16 Object-based design 373 structures procedure and package , , whereby an object may be internally task object can provide a parallel thread of execution object can provide active functional composition The HOOD graphical representation of a passive object. object essentially provides a service, in that it provides a set of operations provides a set of a service, in that it provides object essentially hierarchy, of the form described by Parnas (1979). Such a hierarchy shows described by Parnas (1979). Such hierarchy, of the form uses The basic form of representation used to denote a passive object is that shown in The basic form of representation used In order to explain the form of the diagrams, two further HOOD concepts must HOOD concepts further two the diagrams, form of the to explain In order composed from child objects. The child objects provide the functionality of the composed from child objects. The enveloping object. The hierarchy described in a HOOD diagram can also take two forms. The first is in a HOOD diagram can also The hierarchy described a by other objects, as shown one object on the services provided the dependence of rules governing interaction For this relationship, the above earlier in Figure 16.4. the added constraint that passive objects will apply, with between active and in a cyclic manner. The second form of passive objects may not use one another hierarchy is based on (calling) of a method. An (calling) of a method. (or timeouts) needed synchronous and asynchronous ‘events’ that can respond to with both passive and features. Active objects may interact for handling real-time other passive objects, and passive objects may make use only of active objects, but to activate active objects. so cannot be used HOOD recognizes the existence of both ‘passive’ and ‘active’ objects in a system. A and ‘active’ objects of both ‘passive’ the existence HOOD recognizes passive object can be activ- of a passive types. The operations abstract data and associated the invocation as occurs during to them directly, when control is passed ated only Figure 16.8. The outer bounds of the object are indicated by a box with rounded cor- Figure 16.8. The outer bounds of the at the top of the box, and a ‘boundary box’ on ners. An object has an ‘object identifier’ We will examine these concepts further in looking at how the representation form can We will examine these concepts further Ada be utilized. The relationships with the should be fairly obvious. n be described. n Figure 16.8 SDC16 9/18/07 11:22 AM Page 373 AM Page 11:22 9/18/07 SDC16 relationship between several passive objects. relationship between uses The HOOD graphical representation for an active object. The HOOD graphical representation for an An example of the relationship is then represented by a broad arrow drawn between object boxes, relationship is then represented by a The parent–child composition hierarchy is shown by drawing the child objects The parent–child composition hierarchy is shown by drawing the child An active object is described by essentially the same form, but an additional zig- An active object is described by essentially the same form, but an additional inside the parent object, as shown in Figure 16.11. The provided operations of the inside the parent object, as shown in Figure 16.11. The provided operations zag arrow is also drawn next to the ‘provided operations’ box to denote the use of an zag arrow is also drawn next to the ‘provided operations’ box to denote is invoked external trigger, in order to show that the associated ‘provided operation’ (This aspect in response to an event, rather than by a fully synchronous procedure call. of the repres- of the notation seems rather clumsy.) Figure 16.10 shows an example entation of an active object. Figure 16.10 operations’ that are visible for this object. The its perimeter, which lists the ‘provided uses shows such relationships between a number of as can be seen in Figure 16.9, which passive objects. Figure 16.9</p><p>Designing with objects 374 SDC16 9/18/07 11:22 AM Page 374 AM Page 11:22 9/18/07 SDC16 Object-based design 375 is a passive object. relationship.) Child_3 , or ODS, is a structured textual description of an object uses supply the provided operations of the parent object. Data-flow supply the provided operations of the Parent–child composition in HOOD. (This is indicated by dashed lines, with solid Parent–child composition in HOOD. (This Child_2 and In version 3.1 of HOOD (Robinson, 1992), an ODS contains seven main sections, In version 3.1 of HOOD (Robinson, 1992), an ODS contains seven main Before concluding our description of the HOOD representation forms, we need to Before concluding our description of the HOOD representation forms, we There is not much else that can usefully be said about the HOOD diagrammatical There is not much else that can usefully Where an active object is composed in this way, there is the added possibility of Where an active object is composed Figure 16.11 lines being used to show the which provide structured descriptions of the following object features. include a brief description of the textual notation that is used to form an intermediary include a brief description of the textual notation that is used to form an play any between the diagrammatical forms and the Ada language. (It does not really The part in the development of the object model, only in its eventual refinement.) Object Description Skeleton notation. which refines and extends the information provided in the diagrammatical shown in Figure 16.11, where remark that it can be extended to include descrip- notation at this point, other than to that it includes a form of class object that relates tions of exception-handling, and also mechanism. A HOOD class object, however, only fairly closely to the Ada-83 generics rather than capturing all of the properties of a provides a form of object ‘template’, and inheritance in particular. true object-oriented class mechanism, parent object are also linked to those of the child objects, to indicate which child object parent object are also linked to those each operation. In Figure 16.11, the objects will be responsible for implementing Child_1 flow of data between child objects. arrows can also be used to show the passive child objects. An example of this is also composing it from a mix of active and SDC16 9/18/07 11:22 AM Page 375 AM Page 11:22 9/18/07 SDC16 is a structured description of a provided mechanism). is provided for active objects only, and is for active objects is provided rendez-vous is a heading concerned with describing the flow of data is a heading concerned specifies the resources that are provided by this object for are provided by this resources that specifies the describes the use made by the object of the resources that by the object of the resources describes the use made (1998) and Huang (1998). , giving basic information about the object: name, whether name, the object: about information basic , giving et al. describes child objects and their use, as well as any types, constants, and their use, as well as any types, describes child objects The overall strategy used in HOOD is described as ‘globally top-down’ in form, The overall strategy used in HOOD and control between the object and other objects. and control between The internals that are used within the object. data and operations The Operation Control Structure (OPCS) for each operation provided by the object. operation, with an OPCS being specified The Object Control Structure (OBCS) Control Structure The Object object synchronization description, concerned primarily with itself a structured Ada-83’s details (in terms of The required interface other objects. are provided from flows Data and exception The object definition The any of a description does, and what it of description a textual or active, passive or events. with other objects as synchronization affecting it, such constraints interface The provided (methods), exceptions). constants, operations objects (types, use by other and for each step the HOOD design process identifies: 1. definition and analysis of the problem 2. elaboration of an informal strategy 3. formalization of the strategy 4. formalization of the solution remains largely based on manipulating textual descriptions of the design model – a remains largely based on manipulating with large systems. form that is inherently unsuited for use to an object-based model of the problem. and it consists of a sequence of refinements as a sequence of four transformations, termed The basic process can be summarized design ‘steps’. These are: 16.4.3 process The HOOD may already have made it clear that the The descriptions of the preceding subsection the HOOD diagrammatical form is really only constructional viewpoint provided by of the design process. So the process itself well suited to describing the final outcome The ODS supplies a detailed description of an object, and its relative formality acts as The ODS supplies a detailed description In some ways, the form of the ODS has a ‘checklist’ for the detailed design processes. used in the Z notation we examine in Chapter 18 some similarities with the structures have explored this relationship more closely, as and, indeed, a number of authors described in Zheng 6. 7. 3. 4. 5. 1. 2.</p><p>Designing with objects 376 SDC16 9/18/07 11:22 AM Page 376 AM Page 11:22 9/18/07 SDC16 Object-based design 377 HOOD process diagram. the activities the designer should perform; should designer the the activities ‘documents’ required; the input generated; ‘documents’ to be the output be used. procedures to any validation Figure 16.12 process is shown in Figure 16.12. As elsewhere, this section will not attempt to in Figure 16.12. As elsewhere, this process is shown n n n n in the HOOD design involved the main transformations description of An outline SDC16 9/18/07 11:22 AM Page 377 AM Page 11:22 9/18/07 SDC16 that group operations that are all used at some ‘superior level’; that group operations that are all used from the problem domain; , often expressed through active objects; Despite these limitations though, HOOD (and its notation) has continued to be Despite these limitations though, HOOD (and its notation) has continued These authors observe too that HOOD ‘identifies several classes of object, only These authors observe too that HOOD Step 2 therefore has to act as a ‘bridge’ between the (possibly function-oriented) Step 2 therefore has to act as a ‘bridge’ The unsatisfactory form of step 1 (in terms of building an object-oriented model form of step 1 (in terms of building The unsatisfactory In the absence of suitable analysis techniques, Booch originally recommended the analysis techniques, Booch originally In the absence of suitable The first activity of the design process in step 1 requires the designer to perform an requires the designer process in step 1 of the design The first activity entities actions virtual machines evolution or developments in terms of the method itself. although they consider the distinction between the first two forms to be rather although they consider the distinction between the first two forms artificial. researchers. used for a variety of applications and to attract some interest from further However, there has not been enough of either to have led to any significant one of which corresponds to a “real-world” entity’, and summarize these as being: one of which corresponds to a “real-world” n n n 16.4.4 HOOD heuristics HOOD design process might reasonably lead to The relatively weak structure of the consists almost entirely of heuristics. However, the interpretation that this effectively (1992) have observed ‘the published heuristics even then, as Buxton and McDermid seem a little vague’! be analysed to provide a more detailed object-based design model. be analysed to provide a more detailed 1, and the object-centred needs of the succeed- model produced by the analysis of step an inelegant and poorly structured transforma- ing steps. Without doubt this remains inhibited the further development of HOOD. tion, and one that has probably most position rather than on a true object-oriented strategy, and indeed, as we observed in on a true object-oriented strategy, position rather than data processing is incompat- separation of date storage and Section 16.2, the enforced model (Wieringa, 1998). ible with the object step essentially requires the leads to the difficulties of step 2. This from the beginning) solution to the problem, which can then designer to ‘rough out’ an initial architectural of its constituent objects could be used to provide guidance to the designer in the next could be used to provide guidance of its constituent objects (design) objects. suitable candidates for solution task, which is to identify the HOOD developers have Systems Analysis for this task, while use of Structured (Marca and McGowan, 1988). provides a good alternative form suggested that SADT on the use of functional decom- techniques are, of course, based Both of these analysis describe all the details of this process, and of the documentation issues in particular for in particular issues of the documentation and this process, details of all the describe focus will mainly We (1992). or Robinson (1989) to ESA is referred the reader which decisions are made since the key design first two steps, on outlining the our attention upon these choices. largely elaborate and the later ones within them be ideally would itself a major task, and This is really of the problem. initial analysis the problem in terms that the analysis of fashion, so in an object-oriented undertaken</p><p>Designing with objects 378 SDC16 9/18/07 11:22 AM Page 378 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 379 hierarchy and uses ) in a real-time context. ) in a real-time task and the that tended to be evolutionary rather than revolutionary, package Keeping to the ‘mainstream’ though, we can very loosely group the development Keeping to the ‘mainstream’ though, Perhaps the main reservations about its ‘integrity’ as a design method can be sum- as a design method about its ‘integrity’ main reservations Perhaps the eration, inasmuch as any method can be regarded as ‘typical’ of so varied a set of eration, inasmuch as any method can be regarded as ‘typical’ of so varied First generation methods late 1970s at least for their analysis elements. Most of the methods developed in the method and early 1980s fall into this category and, in some ways, the HOOD this gen- described in the previous section is a fairly typical example of a method of be scaled up for those problems where it is at least possible to identify a clear be scaled up for those problems where parent–child hierarchy). constructional viewpoint of the model from this is far from being well-structured. of the model from this is far constructional viewpoint the design process, and does representation is not really used in The diagrammatical employ the (rather loosely procedures in any way. So these only not aid the design provided through thestructured) description language in order to use of natural it to produce an ODS for each object. capture the design model and refine scales up well (although it is likely that it can It is not clear that the process itself The design model should ideally capture the behavioural, functional, constructional ideally capture the behavioural, The design model should However, the emphasis in viewpoints in a balanced manner. and data-modelling a mixture of the behav- on building a description that contains textual analysis is process of extracting the and data-modelling aspects, and the ioural, functional of object-oriented design methods into three eras as follows. n Both the review of the four survey papers provided in Section 16.2 and the summary Both the review of the four survey papers in Table 16.1 demonstrate that there has of the methods that they surveyed shown procedural methods available for the would-be been no dearth of (often immature) A full list, could it be compiled and were it worth designer of object-oriented systems. still! the effort to do so, would be much longer particularly elegant way). However, it confines itself solely to the object characteristics particularly elegant way). However, together with a of modularity, encapsulation and abstraction, of the class hierarchy. makes no attempt to capture the concept 16.5 design Object-Oriented HOOD extends the basic object model in a number of ways: adding parent–child HOOD extends the basic object model concept of active objects in the design model, and composition, including the real-time is able to encompass these (although not in a providing a diagrammatical form that n n marized in the following observations. marized in the following n 16.4.5 summary A HOOD of ‘dead-end’. of an evolutionary proved to be something ways HOOD has In many implemented in Ada- that are to be at designing systems very much aimed HOOD is Ada using the major some ways of identify successfully such it is able to 83, and as (such as the structures SDC16 9/18/07 11:22 AM Page 379 AM Page 11:22 9/18/07 SDC16 , 1994) and, as et al. that evolved from these first generation practices from these first that evolved that emerged through the late 1990s as a result of bringing that emerged through Since this is a book about designing software, rather than about the use of specific Since this is a book about designing (the last survey reviewed in Section 16.2 noted that these were the approaches most in Section 16.2 noted that these (the last survey reviewed development of the UML, Related closely to the parallel popular with developers). (or, at least, as being at regarded as a ‘third generation’ method this can perhaps be this section. we will also study this method in generation 2.5), and ations. By this stage, the evolutionary element was essentially discarded and all the evolutionary element was essentially ations. By this stage, some methods of this gen- considered as revolutionary. While methods could be others, such as the from specific first generation methods, eration evolved directly widely for their inspiration. in Section 16.5.1, drew more Fusion method described The Unified Process Jacobson and Rumbaugh and approaches employed by Booch, together the ideas approaches to design. Methods of this generation tend to be characterized by limited characterized to be tend this generation of design. Methods to approaches developers as method weak processes, and notation of diagrammatical forms radically differ- notations to this forms and familiar to adapt procedural struggled style. ent architectural methods Second generation their use and limit- experiences with heavily upon mid-1990s, drawing around the Chapter 7. So the description in this section has been kept relatively brief, and it is Chapter 7. So the description in this section has been kept relatively brief, Like chiefly concerned with identifying how the different viewpoints are described. of methods. The Fusion representation forms derived from The analysis and design steps of Fusion employ a set of notations that are described in a variety of sources, some of which are rather similar to those already implied by the name ‘Fusion’, the aim of the development team was to integrate and implied by the name ‘Fusion’, the aim of existing practices. Hence Fusion can be con- extend the most successful elements analysis and design method. Wieringa sidered as a second generation object-oriented subsequent developments to the method but, (1998) notes that there have been some this section has been confined to describing the as these are not readily accessible, of view at least, this is perhaps right, since 1994 version. From a historical point examples of the second generation category Fusion was certainly one of the earliest representations used and the design processes involved, to help contrast their forms representations used and the design in earlier chapters. with those of the methods examined 16.5.1 method The Fusion in the UK (Coleman This was developed at HP Laboratories oriented paradigm has tended to mean that methods have, in part at least, tended to oriented paradigm has tended to mean with obvious consequences in terms of the advance through a process of aggregation, variety of notations. complexity of the processes and the other than limited descriptions of the two methods, there is limited scope to provide for both Fusion and the Unified Process, methods included in this section. However, as previously, beginning by examining the we will use the same descriptive framework One problem with this process of evolution is that the complexity of the object- One problem with this process of n n</p><p>Designing with objects 380 SDC16 9/18/07 11:22 AM Page 380 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 381 message Subclass 3 Object 3: class 3 Object 2: class 2 attribute Class name (Collaborator objects) (Controller object) (Controller Message 1 (parameter list) Message 1 (parameter Superclass Subclass 2 Object name: class Object name: Class (Subclasses may overlap) (b) Object interaction graph interaction (b) Object Message 2 (parameter list) Message 2 (parameter Object 1: class 1 Subclass 1 system_operation() Class 3 ) that is strongly related to the ERD notation described Role 2 Name: class Object 1: class B Server object name attribute Class name object model there are examples that use a form similar to the UML Role 1 Aggregate class Aggregate (a) Object model (a) Object Examples of the Fusion diagrammatical forms. Class 2 Class Object (c) Object visibility graph (d) Inheritance graph et al. C Example of ‘server lifetime unbound’ Modelling of the class behaviour makes use of textual descriptions. Informally, in Modelling of the class behaviour makes use of textual descriptions. Informally, Like many object-oriented methods and like the UML, Fusion employs a class dia- Like many object-oriented methods and like the UML, Fusion employs a Class A (Lifetime of the server object is not bound to the (Lifetime of the server object is not bound to lifetime of the class that is accessing it) Class 1 Class name Class (client) Figure 16.13 Coleman description. The basic forms of diagram are outlined in Figure 16.13, although this description. The basic forms of diagram are outlined in Figure 16.13, does not show all of the variations. gram (termed the view- in Section 7.2.2. This is essentially concerned with providing a constructional point, and an example of its form is shown in Figure 16.13(a). HOOD, Fusion employs a mix of text and diagrams, although the proportion of HOOD, Fusion employs a mix of latter form that we will concentrate on in this diagrams is much greater, and it is this The notation also models class generalization The notation also models (subtyping inheritance) Example above shows aggregation and relationship. Example above shows of the aggregation. C represents the cardinality SDC16 9/18/07 11:22 AM Page 381 AM Page 11:22 9/18/07 SDC16 object , which is a fairly conven- , which is a fairly One of the tasks of this first step is to One of the tasks of this first step is inheritance graph and include these in the data dictionary. For (i.e. black box modelling), while the remaining four are (i.e. black box modelling), while the invariants ). Arguably this is the one element that is most evidently ). Arguably this is the one element that , a simple example of which is shown in Figure 16.13(c). , a simple example , which act as ‘a central repository of definitions of terms , which act as ‘a central repository of et al. analysis to describe scenarios, but this is not a formal part of the Fusion set of the Fusion part not a formal this is but scenarios, to describe Develop the object model , with graphs being constructed for each system operation. Figure for each system being constructed , with graphs : data dictionary object visibility graph In addition to identifying candidate classes, relationships and attributes, this pro- In addition to identifying candidate classes, relationships and attributes, Returning to Figure 16.14, we can describe the steps of the process as follows. Returning to Figure 16.14, we can describe of carrying out the first step, only what Fusion does not identify a specific means An important element in providing continuity links through the Fusion process is An important element in providing continuity The last form used in Fusion is the The last form used considered as fairly typical of second gener- Overall, the Fusion notations can be The second form of notation that can perhaps be considered as specific to Fusion notation that can perhaps be considered The second form of At a more detailed level of model description (for design), functionality is des- (for design), functionality model description detailed level of At a more our purposes, we can consider an invariant as being a constraint upon the overall state our purposes, we can consider an invariant as being a constraint upon the of the system. the outcomes from this should be. These outcomes can be summarized as being entries the outcomes from this should be. These outcomes can be summarized as model for the in the data dictionary, plus a set of diagrams making up the initial object system as a whole, together with its environment. Techniques such as <a href="/tags/Brainstorming/" rel="tag">brainstorming</a> and noun–verb analysis are suggested for this step. cess should also identify any (and sensibly) carried over from earlier structured design practices. (and sensibly) carried over from earlier Step 1 (analysis) relationships and attributes to place in the data identify a set of candidate classes, dictionary. generation methods, the Fusion process has no fewer than eight distinct steps. Four of generation methods, the Fusion process these are classified as summarizes the overall design process. white box design steps. Figure 16.14 the use of a and concepts’ (Coleman ation methods. Remaining rather constructional in emphasis, while using a greater ation methods. Remaining rather constructional a first generation method such as HOOD, but variety of diagrammatical forms than purposes. still employing structured text for some The Fusion process about the increased complexity of second Reflecting, at least partly, earlier comments tion aims to describe encapsulation, and hence can be regarded as providing a data- encapsulation, and hence can be tion aims to describe modelling viewpoint. here, other than to note form that we need not describe further tional constructional of this is provided in Figure 16.13(d). that a simple example new ways of describing the characteristics of object-oriented models. the characteristics of object-oriented new ways of describing is the in the system’, identifying the the ‘reference structure of classes This is used to define that these references should need to access and the forms objects that class instances references). In effect, this nota- permanency or otherwise of such take (including the sequence diagram sequence of notations. medium of the through the between objects terms of collaboration cribed in graph interaction form is quite unlike In many ways, this of this notation. shows an example 16.13(b) find the need to used so far, reflecting forms that we have diagrammatical most of the</p><p>Designing with objects 382 SDC16 9/18/07 11:22 AM Page 382 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 383 This step extends the (essentially) : Determine the system interface The Fusion analysis and design process. tem as a whole. In so doing, it also clarifies the system bounds by determining what is tem as a whole. In so doing, it also clarifies the system bounds by determining to consider: or is not included in the system itself. The designer is therefore encouraged Figure 16.14 Step 2 (analysis) of the sys- static model developed in the first step to describe the dynamic behaviour SDC16 9/18/07 11:22 AM Page 383 AM Page 11:22 9/18/07 SDC16 There are two elements to this There are two elements These are used to describe the The purpose of this step is to ensure .) is largely a matter of cross-referencing with the is largely a matter of cross-referencing ). The concept of the scenario is an important one, is an important of the scenario ). The concept is really a process of ensuring that the different viewpoint is really a process of ensuring that the life-cycle expressions completeness timeline diagrams : Check the analysis models : of the interface model Development : Develop object interaction graphs (and the agents which instigate them) and also system operations. instigate them) and also system (and the agents which consistency events As always in designing, there will be iterations of the above steps, but one role of As always in designing, there will be iterations of the above steps, but one Assessing An assessment of The first element involves constructing a ‘life-cycle’ model containing what are involves constructing a ‘life-cycle’ model The first element model’ that defines the semantics (meaning) The second element is the ‘operation A further effect of this step is to extend the data dictionary to include descriptions this step is to extend the data dictionary A further effect of how is the system to respond to external input events? external to to respond is the system how inputs are processed? to generate when are the system what events Step 5 (design) in order to designer’s intentions concerning how the objects will interact at run-time ants) need to be checked against each other. Techniques that can be used include using ants) need to be checked against each other. Techniques that can be used scenarios to aid tracing of event paths through objects. systematic this fourth step is to try to ensure that these are performed on a reasonably basis. comparisons may of course identify gaps either in the specification or in the analysis comparisons may of course identify are to check the completeness of the set of scen- model.) The primary concerns here to ensure that all invariants have been recognized arios (life-cycles) and operations, and and included. steps form projections from the same overall models developed in the previous three and functional models (and the invari- design model. The constructional, behavioural completeness and consistency in the analysis model, rather than to extend the model completeness and consistency in the the white box design tasks. in any way, preliminary to beginning whether there are any aspects of this that have requirements specification, to determine model produced from the previous three steps. not been covered by the black box not necessarily complete in themselves, the (Since requirements specifications are specifications, and hence can be considered as providing a functional description of the specifications, and hence can be considered created by considering the effect of the life-cycle system. These can (in part at least) be from this is of course a new set of entries in the model upon the system. The outcome and their contexts. data dictionary that describe the operations Step 4 (analysis) Step 3 (analysis) of the second. assistance with the development step, with one providing in the previous step. (In that generalize the scenarios produced effectively use cases Fusion these are termed of informal pre-condition and post-condition for each system operation in terms UML. Each timeline diagram (similar in form to message sequence diagrams) can only diagram (similar in form to message UML. Each timeline optional paths through a use a single scenario so, where there are be used to represent diagrams. be described by using a set of such case, these need to of both n n can system use (these set of scenarios of is to identify a suggested for this The process using be depicted of use cases within discussing the role Section 7.2.6 when touched upon in which we</p><p>Designing with objects 384 SDC16 9/18/07 11:22 AM Page 384 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 385 for which has a message object interaction graph interaction object , while recognizing that many , while recognizing classes controller object This step involves a degree of drawing As described above, these diagrams are As described above, these diagrams which make up the rest of the set. Identification of the which make up the , since these are the executable elements of the eventual sys- executable elements of the eventual , since these are the objects :visibility graphs Develop : Develop class descriptions collaborator objects This temporal aspect is an important (and distinctive) element of this Fusion step. This temporal aspect is an important Each object interaction graph has a single Each object interaction One question that arises here is whether the set of objects is essentially the same arises here is whether the set of objects One question that the object attributes (extracted largely from the object visibility graph for the the object attributes (extracted largely from the object visibility graph relevant class); the inheritance dependencies. the methods and their parameters (derived from the object interaction graphs and the methods and their parameters (derived the object visibility graphs); from the object model and the data the data attributes (largely determined dictionary); However, the role of time here is chiefly in terms of its influence on constructional However, the role of time here is chiefly or functional ones. aspects, rather than on any behavioural Step 7 (design) candidate object interaction graphs. In addition, new objects (classes) may need to be candidate object interaction graphs. of the required functionality. introduced in order to provide some Step 6 (design) a given class needs to reference, together with used to describe the other classes that and their lifetimes (i.e. whether the knowledge the forms of reference to be used of the system, or more transitory). involved is persistent through the life controller is an important design decision, and may well involve comparing several controller is an important design decision, design steps, although we should note that the method makes provision for identifying design steps, although we should note that the method makes provision for 1. In this subclasses and superclasses when creating the original object model in Step n n during the This last element is the first time inheritance structures have been mentioned order to provide (textual) class descriptions for each class in the system, where these order to provide (textual) class descriptions specify the following: n n together of the original object model with the outcome of the previous two steps in together of the original object model lysis objects. So these are still relatively high-level elements that may later need to be are still relatively high-level elements lysis objects. So these expanded or refined. in the operation, and also the particular set of objects involved entering from outside one or more couched in terms of couched in terms of is really described in terms of tem, the model itself or object.) to the creation of a single instance classes will only lead as the objects in an object in Step 1? The answer to this is ‘yes’, one that was created that are derived from the ana- are defined as being design objects interaction graph provide the required functionality, and so this forms the first step in developing a white step in developing the first this forms and so functionality, the required provide an creating involves The step the system. model of box about message any related decisions in doing this, making operation and, each system sequences of mess- to these. The resulting state changes objects and passing between combined functional determines the design objects then between the ages passing this step is just when also clarified in One of the elements of these objects. behaviour be tend to (Although the descriptions from the classes. be created objects should SDC16 9/18/07 11:22 AM Page 385 AM Page 11:22 9/18/07 SDC16 While the previous step involved the previous step involved While the This step adds an event-centred behavioural The main contribution of this step is in creating the The main contribution of this step is ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f b n n c n d n ...... ff cc bb 12 12 12 dd 12 DD D ∅∅ ∅ ∅∅ ∅ dd d ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ : inheritance graphs Develop → 1 E</p><p>⎞ ⎟ ⎟ ⎟ ⎠ d c f b To provide a slightly more formal analysis of the Fusion process, we next show a To provide a slightly more formal analysis ∅ ∅ R R ⎝ ⎛ ⎜ ⎜ ⎜</p><p> change, with some of the objects that were identified in Step 1 being placed outside the change, with some of the objects that were identified in Step 1 being placed system boundary, and hence excluded from the revised design model. Step 2: Determine the system interface ele- viewpoint description to the model (arguably this incorporates a small functional step, which ment too, but this is not the main purpose of the step). One effect of this objects may draws a clearer boundary around the system itself, is that the set of system regard the D-matrix as providing an abstract visual description that combines the regard the D-matrix as providing an the set of diagrams at the end of each step.) information in the data dictionary and A D-Matrix model of the Fusion process Step 1: Develop the object model in terms of constructional relationships. initial object model, largely described is included in our D-matrix representation, However, a minor data-modelling element are implicit in the classes themselves. (The data describing the data abstractions that the design model and, indeed, we could usefully dictionary is more a representation of the behavioural and functional viewpoints that are only weakly modelled in HOOD, the behavioural and functional viewpoints the different viewpoints. and also to ensure consistency between modelled using the D-matrix notation that illu- short description of the eight steps, as evolves. strates how the state of the design model so brief an outline as this, but the above description provides an interesting contrast as this, but the above description provides so brief an outline of the preceding section. While method that was the subject with that of the HOOD (the model building in Fusion are still relatively loosely structured some elements of scope to refine and revise obvious example), there is considerable Step 1 provides an and design), and Fusion cer- the subsequent steps (both analysis the object model in of diagrammatical notations both to develop tainly makes much more extensive use classes, as codified in Step 7, and to identify common abstractions. This step is there- in Step 7, and to identify common classes, as codified that can generalize with identifying new abstract superclasses fore chiefly concerned then provides an important identified in the model. As such, this sets of the classes task of implementation. input to the following that we cannot describe in much about the Fusion design process Obviously, there is step, it is those analysis-related structures that form the basis of the inheritance depend- of the inheritance the basis that form structures analysis-related it is those step, for a class. encies Step 8 (design) through inheritance about specialization codifying ideas consolidating and designer in as a inheritance this step considers domain-centred model, from the original obtained the between to look at the relationships is encouraged The designer design construct.</p><p>Designing with objects 386 SDC16 9/18/07 11:22 AM Page 386 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 387 ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f b f c ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ n nn m n ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ f b b c m c This step addresses the semantics of each addresses the semantics This step n n n m f f b b m m c c n n m n d d d n The main outcome of this step is that the The main outcome of this step is that m n d d m n d d d ...... This step is more concerned with local adjust- This step is more concerned with local d 22 d d 22 22 dd This step can simply be regarded as a refinement of ff cc bb ff ff ff ff bb cc ′′ ′ ′′ ′ ′′ ′ bb cc bb cc bb ′′ ′ cc 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 d dd d d dd 1 12 1 1 112 DD D DD D DD D DD D DD D DD D DD D DD D ∅∅ ∅ DD D DD D DD D DD D DD D DD D dd dd d dd dd d ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ → → → → → 3 4 5 2 6 E E E E E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ f f f f b b b b f n b n n c n n c n n c n n n c c n n n n n d d d d d n n n n n ...... ff ff ff ff ff cc bb bb cc cc bb cc bb cc bb 12 12 12 12 12 12 12 12 12 12 12 12 12 12 12 dd dd dd dd dd 12 12 12 12 12 DD D DD D DD D DD D DD D DD D DD D DD D DD D DD D DD D DD D ∅∅ ∅ ∅∅ ∅ ∅∅ ∅ dd d dd d dd d dd d dd d ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ Step 6: Develop visibility graphs the constructional elements of the design model. Step 5: Develop object interaction graphs elaborated. Since the ‘object set’ may also change detailed provision of functionality is slightly, we also include this in our model. ments to the model than with any systematic elaboration of it, and so is adequately ments to the model than with any systematic the elements of the D-matrix. described in terms of local changes to Step 4: Check the analysis models Step 3: Development of the interface model of the Step 3: Development the model of the system (note so adds a functional element to system operation and model, and so the D-matrix concerned with a black box that we are still largely that may be involved in a given the groupings of system objects cannot fully represent operation). SDC16 9/18/07 11:22 AM Page 387 AM Page 11:22 9/18/07 SDC16 ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ c c m n d f m b d m f m b n n n D D ...... Again, this largely refines the constructional Again, this largely d 22 d 22 The effect of this step upon the overall model is overall model upon the this step effect of The cc cc ff bb d ′′ ′ ff ′′ ′ bb d 12 12 1 12 12 12 1 12 DD D DD D DD DD D DD D DD D DD DD D ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ ⎝ → → ’ for the data-modelling elements. ’ for the data-modelling 8 7 D E E</p><p>⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ⎞ ⎟ ⎟ ⎟ ⎟ ⎠ ’ to ‘ d f b n f n n c b n n n c n d d n ...... ff ff bb dd cc bb cc 12 12 12 12 12 12 12 dd 12 A comparison with the processes used in the methods that were studied in the A comparison with the processes used DD D DD D DD D DD D DD D DD D DD D dd d at the start of the process. A benefit of this is that the design options are thereby at the start of the process. A benefit of this is that the design options are a relatively early stage in the analysis and design process. In contrast, structured methods tend to have single- or double-viewpoint models in their early stages. point. that of JSD), rather than of transformation, which in turn leads into the next ⎜ ⎜ ⎜ ⎜ ⎝ ⎛ ⎝ ⎛ ⎜ ⎜ ⎜ ⎜ 3. The basic set of candidate objects (a major design decision) is determined right 1. Fusion leads to the development of a much more complex four-viewpoint model at 2. The process throughout is much more one of refinement and elaboration (closer to example of a first generation object-oriented design method; and assessment against example of a first generation object-oriented We therefore conclude our review of Fusion by the features of the object model itself. looking at each of these in turn. and especially with the structured analysis and earlier chapters on design methods, Chapter 13, leads to the following observations. structured design method described in Fusion – some observations is, should be sufficient to allow us to make a num- This description of Fusion, brief as it as an object-oriented design method. These in ber of observations about its features that we can make: comparison with the prac- turn arise from three different analyses design methods; comparison with HOOD as an tices and forms used by ‘structured’ (We might note that the class/object distinction of the object-oriented paradigm is not (We might note that the class/object is probably best interpreted, as here, in terms easily represented in the D-matrix, which as discussed further below, the whole issue of modelling class descriptions. However, when studying such a method as Fusion.) of class and object can be rather confusing need to take account of possible changes in the number of elements. of possible changes in the number need to take account Step 8: Develop inheritance graphs Step 8: Develop inheritance some (abstract) classes, we also model. Since it may involve adding description of the Step 7: Develop class descriptions 7: Develop Step of constructional refinement (being a further step the previous that of similar to very which we show modelling is completed, that the data with the added element aspects), the ‘ by changing</p><p>Designing with objects 388 SDC16 9/18/07 11:22 AM Page 388 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 389 class is likewise reasonably well encouraged within the process, and again is likewise reasonably well encouraged is quite well supported, both in terms of the notations used and also is quite well supported, both in terms is similarly addressed quite effectively through the classes, and through is similarly addressed quite effectively , from the viewpoint of inheritance and uses, is supported well. constrained from an early point, while a disadvantage is that it becomes more that it becomes is a disadvantage while point, an early from constrained iteration start. While the very right at model established the right to get critical designer still faces the inexperienced of designing, this is always part between steps at the start. key decisions with making stage in design. at a relatively late than emerging role in analysis, rather ‘up front’ the object visibility graphs play a role here. Hierarchy that encourages the designer to think at the appropriate levels at each step. that encourages the designer to think Modularity not explored in this brief description. The some other aspects of these that we have visibility graphs also provide support for this. object interaction graphs and object Encapsulation Abstraction good black box to white box process model the design processes. Fusion has a quite The concept of inheritance is more effectively integrated into Fusion, although The concept of inheritance is more early (seeking to recognize domain-based interestingly, it appears either very at the end (looking for more constructionally- opportunities to use inheritance), or based opportunities to use inheritance). to the choice of objects, remains less well- The initial analysis processes, leading supported by either techniques or notations. structional viewpoint is still important, it plays a less dominant role than in is still important, it plays a structional viewpoint HOOD. notations to assist with the extensive use of diagrammatical Fusion makes more many of the outcomes Although text is still used to record modelling process. role in the decision-making processes of design steps, it plays a much smaller themselves. Fusion offers a much better use of the different viewpoints across the design better use of the different viewpoints Fusion offers a much Although the con- a more balanced basis for decision-making). process (implying sidering static and abstract issues, and specifying general characteristics, then the sidering static and abstract issues, and specifying general characteristics, about system is the better abstraction to employ. However, when tackling questions n difficult dis- The remaining question here is how well Fusion handles the often quite have already tinction between the class and the object during the design process. As we When con- remarked, this one can pose problems for the designer if not kept clear. n n Finally, we need to consider how well Fusion addresses the major features of the object Finally, we need to consider how well model itself. Very briefly. n n n n If we then proceed to make a comparison with HOOD, we find that, while some of the to make a comparison with HOOD, If we then proceed ones are added. are still appropriate, the following above observations n 4. play a much more viewpoint by the constructional characteristics described The SDC16 9/18/07 11:22 AM Page 389 AM Page 11:22 9/18/07 SDC16 ) is ory Fact object Object ( Objectory (1999), although there are many et al. A useful way of describing the form of the UP is as a two-dimensional grid (there A useful way of describing the form of the UP is as a two-dimensional grid The authoritative text on the UP is Jacobson The authoritative text on the UP is Jacobson a merging of ideas from many sources, it dif- While, like Fusion, the UP represents Overall, we can conclude that Fusion, taken as an example of a second generation an example of a Fusion, taken as can conclude that Overall, we in Fusion and the other methods that we have been examining. In many ways, in Fusion and the other methods that sometimes in form, to that of the DSDM the process is closer in philosophy, and method described in Chapter 12. methods and notations, as identified in Johnson and Hardgrave (1999). methods and notations, as identified first or row-first or entwined basis! A grid-based overview of the UP is presented in first or row-first or entwined basis! A grid-based overview of the UP is Figure 16.15, and Figure 16.16 shows the interactions between its elements. less easily presented in a sequential form such as a book, or part of a book. To some less easily presented in a sequential form such as a book, or part of a book. 2.5, extent this reinforces our earlier argument that this method is at least at generation if not a third generation of object-oriented methods. textbook are even arguments for making this three-dimensional!). This then presents a column- authors with the dilemma of deciding whether to develop their theme on The consequence of the first of these differences is that its associated UML has there- The consequence of the first of these to users. The consequence of the second is that fore been, at least in part, more familiar in the forms we have used so far and, equally, its structure is much less easily presented fers from Fusion in two significant ways. 1.popular of the available The sources for the UP have been some of the most 2. form than is employed The resulting process structure has a much less sequential form described in the open literature. referenced at the end of this chapter. In this sec- other texts available, two of which are the structure of the UP and to consider how the tion, the main purpose is to examine UML (or, at least, by those elements of the UML various elements are supported by the book). that are of particular interest in this 16.5.2 Unified Process The ‘three amigos’: <a href="/tags/Grady_Booch/" rel="tag">Grady Booch</a>, (UP) stems from the work of the The Unified Process it draws upon early work by and Ivar Jacobson. In particular, James Rumbaugh and his later development of the Jacobson at Ericsson, commercially extended forms, such as the method. The UP also exists in various in this section we are concerned only with the Rational Unified Process (RUP), but offers a reasonably well-defined process, supported by a set of analysis and design well-defined process, supported by offers a reasonably decisions about the choice of it is a requirement of Fusion that techniques. However, form of the eventual design an early stage. This is critical to the objects are made at well supported by the process. and is also not particularly behaviour, and about temporal and dynamic features of a system, then the system, of a features and dynamic temporal about and behaviour, to keep manage does in general, Fusion, to employ. right abstraction the probably the ‘right’ abstraction either one is as identifying where distinct, as well these concepts to employ. pre- advance over the quite substantial represents a design method, object-oriented also issues well, and the ‘object’ It is able to address of methods. vious generation</p><p>Designing with objects 390 SDC16 9/18/07 11:22 AM Page 390 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 391 release Product workflows of work Amount 1 + Transition RAD I T Transition Initial 2ImIm + capability or ‘mini-projects’. operational 1In + iterations RAD I T Construction Construction Life-cycle architecture I1 I2 In In Elaboration of development (Inception, Elaboration, Construction, Elaboration RAD I T phases . (1999) Figure 1.5) iterations Inception Preliminary Life-cycle et al objectives The structure of the Unified Process. The structure of the Unified Interaction between the elements of the Unified Process Interaction between the elements of the Inception RAD I T Implementation Test Analysis Design Requirements From this we can see that the processes of the UP comprise the following. From this we can see that the processes allocated to a workflow will depend upon the phase. (In Figure 16.15 this has been allocated to a workflow will depend upon the phase. (In Figure 16.15 this order to indicated using shades of grey to interpret the curves of Figure 16.16 in Four project-based Transition) that each complete a major milestone in a project. Each phase consists of a set of one or more Each iteration cycle contains elements from five technically-focused of effort (Requirements, Analysis, Design, Implementation, Test), where the degree balance Iteration Workflow Phase Figure 16.15 Milestone n n n Figure 16.16 (Adapted from Jacobson SDC16 9/18/07 11:22 AM Page 391 AM Page 11:22 9/18/07 SDC16 , can be quantified in terms of a set (initial architectural design) for the system. Life Cycle Objectives candidate architecture This phase is primarily concerned with getting a project ‘under way’, This phase is primarily concerned with In terms of the models produced as part of the milestone documents, this phase In terms of the models produced as part of the milestone documents, this As shown in Figure 16.16, this phase largely employs the workflow techniques of As shown in Figure 16.16, this phase So for this section we adopt a rather different structure to the one used to describe structure to the one a rather different section we adopt So for this initial analysis and design models an initial domain-based class model a set of domain-based use cases ation’s needs; and non-functional requirements for the sys- eliciting the essential core functional tem and agreeing these with the stakeholders; determining how these will be addressed in identifying the critical risk factors, and the project. establishing the feasibility of the project (possibly with the aid of one or more establishing the feasibility of the project exploratory prototypes); the outcomes of the project to the organiz- developing a business case that relates indicate the degree of effort. A white box does not denote complete absence, only absence, complete denote does not white box A of effort. the degree indicate emphasis.) level of a low n role in this phase, chiefly concerned with establishing the high-level architectural form role in this phase, chiefly concerned with establishing the high-level architectural of the system. should result in: n n The milestone for this phase, prototypes) that encompasses those goals, and of deliverables (documents, models, which includes a (the latter largely for the purpose of establish- Requirements Elicitation and Analysis workflow has a relatively small, but critical, ing an initial set of use cases). The Design n n 1. Inception planning activities. These include: and so most of its goals are related to n n The phases are very project-driven, and create a framework that emphasizes the strong project-driven, and create a framework The phases are very UP (both of which are rather practices that characterize the user links and iterative not provide any equivalents to although, of course, DSDM does reminiscent of DSDM and are chiefly focused on the descriptions are kept fairly brief the workflows). The ones. more technical issues rather than project-centred details about testing.) Since iterations form part of the detailed implementation of Since iterations form part of the details about testing.) do not discuss the iteration specific to particular projects, we phases, and are also of the other design methods we draw some comparisons with some cycles either. Finally, in this and earlier chapters. that we have examined The UP phases most of the methods in this book. First, we examine the purpose and nature of each and nature of the purpose book. First, we examine methods in this most of the an emphasis upon keeping throughout the five workflows, then we look at phase, and any we do not discuss for example, to this book. (Hence, most relevant those issues</p><p>Designing with objects 392 SDC16 9/18/07 11:22 AM Page 392 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 393 , which , and so the workflows , is a partial working system. , is a partial working Initial Operational Capability Product Release (the top-level design) for further develop- design) for further (the top-level Life Cycle Architecture architectural baseline architectural Despite the name, this phase still involves some design work. Despite the name, this phase still Viewed from a design perspective, this phase is more significant. Its is more significant. this phase a design perspective, Viewed from This phase should involve little or no design activity, unless structural In terms of the five workflows, this phase completes any tasks concerned with In terms of the five workflows, this completion of models completion of any requirements elicitation or analysis tasks completion of any requirements elicitation analysis models (both static and dynamic); models. static and dynamic architectural design static domain-based class models; a fuller set of use cases; providing the architectural baseline model that describes the system from all baseline model that describes providing the architectural high level of abstraction; aspects, albeit at a use cases; developing further any that describe perform- about quality factors, including addressing questions ance requirements. Its purpose is to lead to the final milestone of involved in this phase are mainly those of Implementation and Testing. n and, clearly, the detailed physical design tasks are essential elements of this. 4. Transition phase. problems were revealed in testing the beta version produced in the Construction 3. Construction tend to have some element of almost every (Within the model, of course, all phases is one of workflow.) The milestone for this phase version of the system. Hence its goals include: corresponds to the delivery of a beta n n n and the need to ensure that these are consistent, The emphasis upon model-building, may well be needed during this phase. means that some degree of iteration requirements elicitation, performs the bulk of the analysis tasks, and undertakes sub- requirements elicitation, performs the from conceptual analysis models to physical stantial design work in order to progress will include the following: design models. The resulting set of models n n The milestone for this phase, the The milestone for we have seen, this term is used this is not a prototype although, as (The UP stresses that prototype, but one Life Cycle Architecture is not an exploratory quite loosely. The prototype.) that it is fairly close to being an evolutionary could make the case n n n Although iteration of the workflow tasks is implicit in the UP, this phase is one where is one this phase in the UP, is implicit tasks workflow of the iteration Although to suffice. expected is normally cycle a single 2. Elaboration to create the purpose is the following: its goals include ment. Hence SDC16 9/18/07 11:22 AM Page 393 AM Page 11:22 9/18/07 SDC16 From the stance of a technical description, this work- From the stance of The UML use case diagram: a simple example. One of the attractions of employing use cases is that they provide a good mechan- One of the attractions of employing For this reason, we will look at all five workflows, although not in equal detail. For although not in at all five workflows, we will look For this reason, Figure 16.17 ism for verification of a design model against requirements. ‘Executing’ a design with ism for verification of a design model walk-through mechanism that forms a direct link a scenario from a use case provides a is primarily concerned with identifying the boundaries of a use case, as shown in with identifying the boundaries is primarily concerned of a use case is not part of the 16.17. The detailed specification the example of Figure form of text-based template, and usually designers employ some UML specification, (Ratcliffe and Budgen, 2001). can also be used to model these although other forms and Neustadt (2002) and, to use case modelling in Arlow There is a good introduction this even though it is not part of the modelling indeed, most books on the UML discuss notations. each one, we will examine its main features, and then consider how it contributes to examine its main features, and then each one, we will design. the overall task of workflow 1. The requirements of the use case is that it on use case modelling (one advantage flow relies extensively The UML use case diagram and non-functional elements). can record both functional The UP workflows The as ‘implementation’ many terms such be obvious is that that should now One thing of different design within the context quite differently do get used or ‘construction’ the UP implemen- and, in the same way, looking at JSD We noted this when methods. of design activity. a certain amount does involve tation workflow</p><p>Designing with objects 394 SDC16 9/18/07 11:22 AM Page 394 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 395 and ), rather than it will be done. it will be to capture such analysis packages how how form) and object col- collaboration diagrams notation, as shown in Figure descriptor class diagrams package elements are involved, and ; the system is to do, but not is to do, but not the system that show how the analysis classes interact to create that show how the which what . inheritance The UP interprets analysis in the conventional black box in the conventional analysis The UP interprets that model elements in the problem domain; that model elements This is a major element of both the Elaboration and Con- form), with each form recording slightly different capabilities. form), with each form recording slightly and uses instance use case realisations analysis classes aspects that are captured through message sequence diagrams. Collaboration aspects that are captured through message Analysis classes and use case realizations can also be grouped as Analysis classes and use case realizations The output from this workflow can be expressed using a range of UML notations: The output from this workflow can be The objectives of the analysis workflow are to: The objectives of the when static properties of the system are modelled using static properties of the system are modelled relationships as in terms of dynamic properties are typically shown message sequence diagrams produce required for a given use case. the system behaviour identify 3. The design workflow white box struction phases. As usual, the design workflow is intended to provide the as a container for the modelling elements and diagrams. Since packages can also con- as a container for the modelling elements and diagrams. Since packages A key tain other packages, the analysis model can itself be considered as a package. the overall role for this notation is to help keep track of the analysis elements, and analysis analysis architecture can be considered as being defined by the high-level packages. 16.19). A package is one of the UML ‘management’ elements, and can be considered 16.19). A package is one of the UML form of interactions (describing the (the diagrams can be used to model class collaborations laborations (the UML (which can be represented using the n n is shown in Figure 16.18) model the structural Collaboration diagrams (an example laborate, so providing both a convenient partitioning of the analysis task and a means laborate, so providing both a convenient problem of identifying classes still remains, and of cross-checking. However, the actual such as noun–verb analysis and CRC brain- relatively long-established techniques are among those suggested. storming (class, responsibility, collaborators) n problem. The UP provides a analysis classes remains a difficult As always, identifying in the shape of the use case, as each use case can useful framework for structuring this the analysis classes and the way that they col- be separately analysed to identify both observed before that the distinction between analysis and design is convenient, but not the distinction between analysis and observed before that given the phase-based nature Indeed, this is not entirely surprising, always clear-cut.) of the UP. n between these two stages of development. Use cases also provide a framework for the a framework also provide Use cases of development. two stages these between workflow. analysis workflow 2. The analysis of a model sense of producing the some of of levels, and inevitably at a range UP process is conducted The actual as design. (We have well be classed might equally are ones that many activities SDC16 9/18/07 11:22 AM Page 395 AM Page 11:22 9/18/07 SDC16 the black box model produced from the analysis workflow is to be the black box model produced from how Example of the UML package diagram. The UML collaboration diagram: a simple example (instance form). The UML collaboration While some of the tasks are familiar enough (such as how to identify design While some of the tasks are familiar enough (such as how to identify is that of the persistence or lifetime of an object, and when and how objects should is that of the persistence or lifetime of an object, and when and how objects to be be discarded. (Some of this may also be related to the form of implementation achieved. and the objects), other aspects are specific to the nature of the object-oriented model, issue is what UP, like Fusion, has to address these during the design process. One such when to can be considered as part of the ‘mechanics’ of object-orientation, namely related, issue create the actual executable objects from the static classes. A second, Figure 16.19 description of Figure 16.18</p><p>Designing with objects 396 SDC16 9/18/07 11:22 AM Page 396 AM Page 11:22 9/18/07 SDC16 Object-Oriented design 397 subsys- to indicate the greater degree of detail provided. the greater degree to indicate Rather conventionally, this workflow is concerned Rather conventionally, this workflow package viewpoint (largely through the use of UML statecharts), which through the use of UML statecharts), viewpoint (largely Although this workflow forms a part of all but the Inception Although this workflow forms a part behavioural is now used in place of is now used As with Fusion, the white box design tasks of the UP are largely concerned with As with Fusion, the white box design The UML design workflow therefore addresses many detailed issues concerned workflow therefore addresses many The UML design The UML architectural design model can be described using the package notation using the model can be described architectural design The UML be fairly closely design classes will expects that process reasonably The UP design overview provided in this section has not attempted to describe the interweaving of the overview provided in this section has not attempted to describe the interweaving 16.16. development phases and the workflows, so graphically described in Figure phase, it has little relevance to our theme, and hence is not discussed further here. phase, it has little relevance to our theme, and hence is not discussed further The UP: a comparative view structure The UP design process is part of a much more complex development process Indeed, the than has been the case for the other methods that we have looked at. of design activity in doing so, since the translation from the design model to the imple- of design activity in doing so, since the degree of interpretation. Again too, issues such as mentational form will involve some need to be resolved within this particular imple- object persistence and creation may UP implementation workflow does not actively mentation framework. However, the process that is of particular interest to us. form a part of the design development 5. The test workflow new elements into the development process. Indeed, as we observed for Fusion, object- new elements into the development process. require fairly key structural decisions to be made oriented design processes do seem to to this. at an early stage, and the UP is no exception 4. The implementation workflow As always, there is likely to be some element chiefly with producing executable code. identified above. ensuring consistency between the different parts elaborating detail (and, as a corollary, developing new interpretations. Most of the key of the design model), rather than with of the analysis workflow although, as always, architectural decisions are made as part of the design workflow. So, viewed from the these may be subject to revision as part the design workflow does not introduce many standpoint of a methodological analysis, with developing the design classes and their interfaces. Many of these reflect the design design classes and their interfaces. with developing the while others are specific been explored throughout this book, principles that have of more general issues. or form object-oriented interpretations to the object model, of detail, is the develop- in the model, apart from elaboration Perhaps the main change ment of the of object creation and persistence that were also assists with addressing the issues and also aims to provide fuller descriptions not only of the classes, but also of the inter- fuller descriptions not only of and also aims to provide linking thread between ana- Again, the use case provides the actions between them. and analysis. Also, rather as as it did between requirements lysis and design, much that the use case descriptions analysis use cases, we can expect occurred when creating to be elaborated for the design steps. will themselves need employed.) A third such issue is the more structural one of how to employ the inherit- the how to employ one of structural the more issue is third such A employed.) part in this. play any can reuse and whether mechanism, ance that the term with the exception architecture, as for the analysis again, much tem a one-to-one basis), matched on (although not necessarily analysis classes based upon SDC16 9/18/07 11:22 AM Page 397 AM Page 11:22 9/18/07 SDC16 Objectory . While the detailed modelling of detailed modelling . While the use case A key question is whether so complex a process model is practical and, also, whether so complex a process model A key question is When the processes of the UP are compared with those of Fusion, we can observe of the UP are compared with those When the processes A key element of the UP is the role of the of the UP is the A key element Summary Indeed, despite the relative simplicity and elegance of the basic ideas making up the object- Indeed, despite the relative simplicity and elegance of the basic ideas making it continues to oriented model, and its dominance in terms of implementation mechanisms, rapidly, the argument was put forward that ‘since the object-oriented model potentially involves rapidly, the argument was put forward that ‘since the object-oriented model potentially this may effect- all of the four major viewpoints, and imposes no order of precedence on their use, form’. This has ively render it impossible to devise any design practices that use a procedural form; however, certainly not proved to be wholly true, inasmuch as Fusion does use a procedural the matrix structure of the UP is certainly not procedural in the conventional sense. plexity then poses for the software designer. Not the least of these challenges is the need to plexity then poses for the software designer. from an early stage of model development – a con- employ a diversity of viewpoint interpretations surprising, but which does limit the extent to which sequence that should perhaps not be too to follow an evolutionary path and build upon the procedural design practices have been able ideas of ‘structured design’. object-oriented design practices were still evolving In the first edition of this book, written when This has been a long, complex and wide-ranging chapter although, even so, it has not been the This has been a long, complex and wide-ranging object-oriented architectural style! only one concerned with designing for the the relative complexity of this, both structurally, Our initial review of the ‘object model’ revealed and also in terms of the challenges that this com- through the interactions between its elements, to no systematic empirical evidence to offer any firm answers to these questions at the to no systematic empirical evidence to that the form adopted for the UP draws heavily time of writing, but we should note experience with the use of Jacobson’s upon a relatively lengthy period of method and its predecessors. use of diagrammatical forms of modelling, with little dependence upon textual descrip- forms of modelling, with little dependence use of diagrammatical not part of the model any- use case descriptions, which are strictly tions (except for the use case mechanism is also in the preceding paragraph, the UP’s way). And, as noted as a unifying thread. much more fully integrated and adapted for small projects. There is little whether it can be adequately simplified only partitions the tasks of these workflows, but also gives scope for cross-checking for tasks of these workflows, but also gives only partitions the of the UP would probably be Indeed, the matrix form verification and consistency. the unifying theme of the use case. impractical without of the same modelling issues also signs of greater evolution. Many both similarities and but the UP makes much better interfaces, persistence), are evident (class relationships, Similarly, because of the iterative nature of the development process, together with the together process, the development nature of iterative of the because Similarly, UP using the to model attempted we have not tasks, workflow of the nature distributed form. the D-matrix con- of the UML, the aspect a particularly well-developed themselves is not use cases analysis provides manageable-sized framework that provides a valuable cept itself not a mechanism that and design; and analysis through requirements, tasks; a thread</p><p>Designing with objects 398 SDC16 9/18/07 11:22 AM Page 398 AM Page 11:22 9/18/07 SDC16 Further reading 399 Second Edition. , January, 31–42 IEEE Software Prentice Hall UML and the Unified Process: Practical Object-Oriented Ana- Addison-Wesley Object-Oriented Analysis and Design with Applications. Object-Oriented Analysis and Design with lysis and Design. Object-Oriented Development: The Fusion Method. Object-Oriented Development: The Fusion Benjamin-Cummings Further reading meanings, and probably represents one of the clearest summaries of key issues available. meanings, and probably represents one of Booch G. (1994). Snyder A. (1993). The essence of objects: Concepts and terms. Snyder A. (1993). The essence of objects: summary of both the object concept and the ideas A very well-written and carefully produced of a ‘task force’ that has tried to provide a set of that go with it. The author writes on behalf concepts and with communication between those who terms to help with understanding of the a set of terms, and provides a taxonomy for their may be using those concepts. The paper defines well ask what software architectures have ever done this), it is now a major implementational architectures have ever done this), it well ask what software design models as effectively as for which we need to be able to develop paradigm, and so one possible. Reuse has not proved to be as easily achieved as was once claimed, and some of the powerful to be as easily achieved as was once Reuse has not proved have not proved easy to of object-orientation, such as inheritance, implementation mechanisms as the design of distributed sys- hand, there are also those domains such use well. On the other book, where the object-oriented even if one not explicitly pursued in this tems, an important topic view must be one that recognizes found wide acceptance. The pragmatic architectural style has originally hoped for (and we might has not delivered all that was that, while object-orientation provide a major challenge to the designer and for the transfer of design knowledge between knowledge design transfer of for the and to the designer challenge a major provide and, to make all have a contribution and methods Design patterns, frameworks designers. some degree of famili- really requires of object-oriented systems would-be designer indeed, the three! arity with all this paradigm decades of object-orientation, whether, after three sometimes raised is A question questions that remain. there are certainly In some areas delivered what was promised? has really This is a very clear introduction to the Unified Process which uses a workflow-first approach and This is a very clear introduction to the Unified Process which uses a workflow-first gives a very clear view of the key design and analysis elements. study approach that greatly assists with following the key points. The dominance of the UP in study approach that greatly assists with following the key points. The dominance are sim- current literature should not be allowed to conceal the fact that methods such as Fusion pler in form, whilst also addressing most of the same development issues. Arlow J. and Neustadt I. (2002). notations are now little used, but that does not detract from the fact that this book provides a notations are now little used, but that does to the object model and also to many of the issues very informative and useful introduction about designing with objects. C., Gilchrist H., Hayes F. and Jeremes P. (1994). Coleman D., Arnold P, Bodoff S., Dollin one that introduces many of the issues through a case A very readable text on this method, and Grady Booch is one of the most elegant and informative writers about the object concept, and Grady Booch is one of the most elegant to these issues. Since it pre-dates the UML, the this book provides an excellent introduction SDC16 9/18/07 11:22 AM Page 399 AM Page 11:22 9/18/07 SDC16 (OMG), the non-commercial body that non-commercial body (OMG), the Object Management Group Object Management line guide to the weighting that should be placed on each of the elements. Can you identify line guide to the weighting that should be better ways of modelling the UP process? is each of these at any form of advantage or that have been described in this book. Where well the processes of Fusion could be supported disadvantage? (Suggestion, consider how be supported by the Fusion notations.) by the UML, and vice versa, how the UP could account. Consider how each of the four major viewpoints might be used in modelling the each of the four major viewpoints might account. Consider how suitable for each viewpoint. account, and suggest forms that might be operation of a bank may provide different forms inheritance here, too, in that the bank (There is scope for using methods, the details of these each will provide certain standard of account, and although of account involved.) might vary with the type candidates for ‘objects’ in of Chapter 15). Suggest a set of suitable elled in Exercise 15.1 the major attributes and provided operations. this system, and for each of these identify object-oriented manner, and sketch a HOOD dia- you might model the working of this in an gram to represent your ideas. Exercises 16.5 Fusion with those of the UML Compare and contrast the general set of notations used for 16.3 in Chapter 14. Think how Consider the simple filling station that was used as an example 16.4 using Figure 16.16 as your out- Apply the D-matrix notation to each of the phases of the UP, 16.2 that mod- lending library is required (such as An issue records system for use in a public 16.1 a customer for the role of an ‘object’ might be In a simple banking system, one candidate www.omg.org website for the This is the in addition to the UML, many object topics set of useful links to UML. It offers a wide ‘owns’ the activities. and OMG standardization about tools, courses information including providing</p><p>Designing with objects 400 SDC16 9/18/07 11:22 AM Page 400 AM Page 11:22 9/18/07 SDC16 SDC17 9/18/07 11:24 AM Page 401</p><p> chapter 17 401 Component-Based Design</p><p>17.1 The component concept 17.3 Designing components 17.2 Designing with components 17.4 At the extremity – COTS</p><p>In discussing the use of objects, we noted that, despite initial hopes and promises, these did not readily deliver software reuse without under- taking a separate programme of effort towards this. The concept of the software component, as developed during the 1990s, has been very much driven by the goal of software reuse although, again, achieving any form of software ‘plug and play’ development has been apt to prove a more elusive goal than expected, at least for unconstrained forms of component reuse.</p><p>In this chapter we review some ideas about how the concept of a compon- ent can be interpreted in a software context. We also consider both how systems can be developed with components and how the components themselves might be developed. Finally, we examine the nature of the most constrained form of component, the Commercial Off The Shelf (COTS) component.</p><p>Ideas about components are as yet much less mature and less well estab- lished than those about objects. However, the study of component- based design introduces some new concepts, and reminds us of a number of issues touched on previously. Manu- † . Most phys- functionality Abstract Windowing Toolkit Abstract While such reuse may often be centred upon quite small elements, larger – pos- While such reuse may often be centred Perhaps one of the most visible examples of designing around reusable com- Perhaps one of the most visible examples For other domains in which design is an important process, the idea of component in which design is an important process, For other domains The first is that it is commonly based upon well-defined The first is that it is commonly based roles (starter motor, pump, switch, etc.), ical components have very well-defined Visits to the local scrap-yards could well find an exact match for some sought-for item such as a cylinder-head Visits to the local scrap-yards could well find an exact match for some sought-for item such as under the bonnet of a car that was very different in style and size to mine. his block-making machinery in Portsmouth dockyard around 1806 and so introduced an important element of his block-making machinery in Portsmouth dockyard around 1806 and so introduced an important impact upon standardization in the fitting out of sailing ships. However, there is no evidence that this had any ship design practices! (Also see page 14.) student. The author had direct experience of this while maintaining an aging car when a penurious postgraduate * probably when Sir Marc Brunel (father of Isambard) established One of the earliest examples of a product line is † these is interpreted in a rather different way. these is interpreted in a rather different (car engines provide a good example). However, sibly composite – ones are reused too of such reuse that we need to note here. there are two important characteristics n facturing and design reuse is also (if less visibly) used very successfully in such domains facturing and design reuse is also (if less industry (for example, through the standard- as electronics, as well as in the building doors, pipes), and in many other domains. The ization of dimensions for windows, manufacturing and maintenance. While the motivation may well be ease of both the latter may also be a significant factor when former is more relevant to software, of software products, even if maintenance of viewed across the often long lifetimes of manufacturing (and hence design) reuse on a really large scale would appear to have of manufacturing (and hence design) to increase manufacturing volume drastically been largely motivated by the need during the Second World War. the current era is that of the motor car. While a ponents that can be encountered in substantially in appearance, many elements given manufacturer’s models may differ motors etc. will be common across these. such as switches, instruments, starter reuse is fairly well established, although systematic practices to support such reuse established, although systematic practices reuse is fairly well is that it reduces the One motivation for reuse of components are relatively informal. of course does not have any of the final product, something which manufacturing costs distribution. Indeed, although the concept of parallel for software development and established by the early 1900s,* the adoption ‘product lines’ appears to have become there are some successful examples such as Java’s examples such as some successful there are by the need to avoid rewrit- of example, reuse is motivated both (AWT). For this type the influence of human factors, elements of software, and also by ing major low-level style for the images on a like to see a consistent presentational since users generally In general though, the practical of the application producing them. screen, regardless by the factors that we dis- can be reused has been limited extent to which software 16.3. at the use of frameworks in Section cussed when looking 17.1 concept The component systems has long been system in other elements of one the goal of reusing Although as longer history, it really has a much paradigm, with the object-oriented associated reuse through object- also noted, actual chapter. As we in the previous we observed level ‘system facilities’ to achieve. At the be quite difficult would appear to orientation</p><p>Component-based design 402 SDC17 9/18/07 11:24 AM Page 402 AM Page 11:24 9/18/07 SDC17 The component concept 403 . Indeed, interfaces in which these cata- ways . The authors suggest that component classification should be based . The authors suggest that component Turning to software, the above characteristics take very different forms (or have Turning to software, the above characteristics For the engineering designer, as mentioned above, catalogues of components are For the engineering designer, as mentioned constructed cuits), or may differ slightly in terms of non-functional characteristics, while still slightly in terms of non-functional cuits), or may differ specified interface. conforming to the making it easy for the designer to identify the appropriate manufacturer’s cata- manufacturer’s the appropriate to identify designer for the it easy making to them. is available what order to view them in search and then logues have well-defined themselves is that the elements The second who also be several manufacturers is that there may corollary of this an important may be an sourcing’). Substitution component (‘second provide a given are able to for integrated cir- tends to occur match (as and non-functional exact functional ‘The designer of electronic-based products has available an enormous range of basic ‘The designer of electronic-based products complexity. What he often does not have building blocks of high or still increasing conceptual tools for working out levels of is either training or well-established sophistication.’ n may exist. Likewise, although standards bodies may exist, they are likely to be less may exist. Likewise, although standards bodies may exist, they are likely from effective than their manufacturing counterparts. Second sourcing of components done so to date). Functionality is apt to be blurred, and can be extended or modified done so to date). Functionality is apt to be blurred, and can be extended the design of with relative ease (whereas no-one would even think of (say) modifying fan). It is a car’s starter motor so that it can also be used to power the engine’s cooling of soft- easy to generate variants of a software unit, and hence there are few catalogues to any ware components, only of the end products. Interfaces are rarely standardized standards as great degree and producers are much less motivated to conform to such widely cited as a repository of engineering design knowledge, the discussion of ‘design widely cited as a repository of engineering to consideration of how such a catalogue should catalogues’ is almost entirely confined be is that the catalogue will be searched for compon- upon function, since the assumption of the <a href="/tags/Conceptual_design/" rel="tag">conceptual design</a>. Indeed, their view of ents that will meet specific subfunctions is a subsidiary element of the design process. component reuse is very much that this A situation which still seems largely unchanged! Similarly, in Pahl and Beitz (1996), A situation which still seems largely now readily available in many domains, with examples ranging across electronic and now readily available in many domains, However, the electrical, mechanical and civil engineering. appear to be a rather more elusive concept. logues are used during the design process (1991), who provides the following quotation A good example of this is given in Pugh from Cooke (1984): supply chain (here the ‘user’ is another manufacturer who makes use of a given com- the ‘user’ is another manufacturer who supply chain (here the standards necessary to into their own product). Sometimes ponent for integration the acceptance of one manu- from marketplace factors, leading to enable this emerge industry may set up a stand- a standard for all; at other times an facturer’s format as Whatever the route leading to the role of agreeing standards. ards body to undertake on manufacturers to conform to them. the standards, there is significant pressure These are not accidental properties but, rather, ones that are driven by several eco- properties but, rather, ones These are not accidental cost of manufacturing an item, include the need to minimize the nomic factors. These user’s need to protect their a marketplace position, and the pressure to maintain SDC17 9/18/07 11:24 AM Page 403 AM Page 11:24 9/18/07 SDC17 , that: (needing a clear speci- reuse to the more abstract reuse . This second aspect is important IEEE Software black box independent delivery concept in software is broader and much less architecture-specific than is broader and much less architecture-specific concept in software component In the first book to address the component theme exclusively, Szyperski (1998) In the first book to address the component All of this is important when we come to examine the ways in which the compon- the ways in which we come to examine is important when All of this ‘a unit of composition with contractually specified interfaces and explicit context ‘a unit of composition with contractually specified interfaces and explicit and is dependencies only. A software component can be deployed independently subject to third-party composition.’ ‘an independently deliverable set of reusable services’ ‘an independently deliverable set of ‘CBSE is coherent engineering practice, but we still haven’t fully identified just what ‘CBSE is coherent engineering practice, it is.’ definition provided by Brown and Short. In order for a component to be reusable by definition provided by Brown and Short. In order for a component to be form. third parties, it is essential that it should be completely ‘plug and play’ in This definition particularly adds the concept of since it implies that a component should not be aware of its context, especially in terms since it implies that a component should of the presence of some external shared of any embedded dependencies or expectation implication that a component needs to be integ- resource. Associated with this is the to provide the overall system functionality. In rated with other components in order a whole. other words, it is a part, rather than a component as: defines the characteristic properties of (Note that there is no concept of a specific architectural style being necessary, so a (Note that there is no concept of a could equally well be a framework, a process or component could be an object, but here is upon even an operating system.) The emphasis fication of interface) and upon Component Based Software Engineering (CBSE) in Component Based Software Engineering and Short (1997) describes a component as: An early and concise definition from Brown that of the object (although objects can of course be components, providing that they objects can of course be components, that of the object (although However, on occasion it is definitions that we discuss below). conform to the wider (1982) that we used at the the quotation from Tim Rentsch hard not to feel that accurately be rephrased for chapter could quite easily and beginning of the previous (1998) use very similar than objects! Indeed, Brown and Wallnau components rather writing an introduction to a special section on sentiments when they observe, in ideas about how to design with components and how to design components for reuse, design with components and how to ideas about how to the effects of the ‘proprietary factor’. as well as considering 17.1.1 component The software The more than one supplier in order to protect a supply chain exists only in a limited form, in a limited only chain exists a supply to protect in order supplier than one more be so different. may not practice this for adopting the motivations although we rest of this section domain. In the on to the software has been mapped ent concept soft- of a identify the characteristics been interpreted, how the concept has examine to be modified to cope models may have how business and consider ware component, more design-centred then examine following sections characteristics. The with these</p><p>Component-based design 404 SDC17 9/18/07 11:24 AM Page 404 AM Page 11:24 9/18/07 SDC17 The component concept 405 , that ‘defines how components can be composed to components can be composed to , that ‘defines how that incorporates ‘specific interaction and composition ‘specific interaction and composition that incorporates component model composition standard At the start of this chapter we observed that, in the wider context, reuse of com- At the start of this chapter we observed that, in the wider context, reuse None of these definitions is really contradictory in any way. Rather, they differ, if None of these definitions is really contradictory A slightly more evolved definition still is that provided in Heineman and Councill in Heineman that provided still is definition evolved more A slightly the create a larger structure’. the standards’; and ‘a software element that conforms to a component model and can be independ- model and to a component element that conforms ‘a software to a composition according without modification and composed ently deployed standard.’ ponents (of any form) required: as a quite pragmatic design decision that reduces the detailed design problem to that as a quite pragmatic design decision that reduces the detailed design problem remind of designing only a few components, rather than a whole system. (We should are typically ourselves too of the earlier observation that, while hardware systems set of com- scaled up through the inclusion of many instances of a possibly small of individual ponents, large-scale software systems tend to require a large number component forms.) 17.1.2 Reusability of software components, the concept of When looking at the preceding definitions the definition provided by Brown and Short, and reuse makes an explicit appearance in of course, reuse is not an essential charac- implicit appearances in the others. Strictly, one. If a large system contains one or two teristic for a component, only a desirable a set of reused ones, then this can be considered uniquely crafted components among apart from these technical characteristics, there are also business factors that influence apart from these technical characteristics, (Brereton and Budgen, 2000). Indeed, a more the component model and its acceptance in Brown (2000), but for this chapter we business-centred view of CBSE is presented discussion upon those technical aspects that have will generally continue to focus the implications for the CBSE design process. the question of architectural style, and the extent to which the process of composition the question of architectural style, and styles to be constrained to those that may need the range of component architectural conform to the ‘standard’ being used. used to express the ideas, and in terms of the anything, in the level of abstraction characteristics of a component. However, emphasis that they place upon particular n how we can design with concepts in terms of considering Both of these are important themselves should be designed in order to be components, and also how components a further issue about component reuse, which is reusable. They also raise, indirectly, This definition is interesting because it separates out two further supporting concepts, because it separates out two This definition is interesting which are those of: n (2001), where they define a software component as: component a software they define where (2001), SDC17 9/18/07 11:24 AM Page 405 AM Page 11:24 9/18/07 SDC17 , by which involved, and independence (black box) Component , whether internal to an stakeholders interface Component component marketplace Interface Functional specification Functional Characteristics of a software component. Characteristics of a software Specification of dependencies Specification Again, we are concerned here chiefly with the technical criteria that make reuse Again, we are concerned here chiefly To some extent, many other forms of component do have context-specific depend- To some extent, many other forms of well-defined functionality well-defined interfaces to be supported by some form of organization or open. 17.1.3 context The business than simply A component-based approach to software development clearly needs more approach, a set of technological criteria. Indeed, even more than an object-oriented this needs clarification of the various roles of the different (This latter is an essential. As an example of the need for this, and of the difficulty of (This latter is an essential. As an example the analysis of the $500 million failure of Ariane ensuring that it is fully achieved, see and Meyer (1997).) 5 in 1996 that is provided in Jézéquel in Lynex and Layzell (1998) still need to possible. The organizational issues identified be used within a business. So we complete this be considered if a CBSE strategy is to particular aspects of the business context. introductory section by examining some encies too. For example, the starter motor for a car will require an electrical supply encies too. For example, the starter rating. However, software dependencies can be with a specific voltage and power value, state). There is therefore a need to ensure much more subtle (types, ranges of as a black box as far as is reasonably pos- that a software component can be treated made explicit in the interface specification. sible, with any such dependencies being needed over and above these two. This is the characteristic of needed over and above these two. This dependencies. What dependencies a component should not have any context-specific This set of characteristics is summarized in do exist should also be fully specified. the UML component diagram is a very specific Figure 17.1. (We should note here that little use in CBSE. Indeed, perhaps because the interpretation of the concept and of with any one specific architectural style, there component concept lacks an association are widely used in developing CBSE systems.) are really no diagrammatical forms that n n characteristic for software components which is To this, we can now add a further Figure 17.1</p><p>Component-based design 406 SDC17 9/18/07 11:24 AM Page 406 AM Page 11:24 9/18/07 SDC17 The component concept 407 The integration role is where the major technical chal- The integration role is where the major Suppliers of components are needed in order to create a Suppliers of components are needed The role of the customer is (as usual) one of identifying the needs The key roles in CBSE development. The key roles in CBSE Within such a culture of greater specialism, we can identify three types of stake- Within such a culture of greater specialism, Culturally, designers in other disciplines expect to turn to specialist suppliers for in other disciplines expect to turn Culturally, designers centred around this. Customers. why cus- and acting as the end-user. While in principle there should be no reason is tomers should be concerned about, or even aware of, whether or not a product below. component-based, there are some relevant business issues that are discussed (Traas and van Hillegersberg, 2000). Providers of components need to be able to (Traas and van Hillegersberg, 2000). to meet any certification standards; and to index and describe their products; them to new technologies and platforms as maintain these in the sense of adapting as necessary. well as extending their functionality Component integrators. much of the discussion of this chapter is lenges are likely to occur and, indeed, Component providers. do exist within large organizations, component marketplace. Such marketplaces rudimentary form than in other domains and outside of these, albeit in a more The customer for component-based systems may need to take account of a number of The customer for component-based systems may need to take account of but also need factors. Most of these are relevant to any software acquisition process, 3. 2. many often do undertake multiple roles (Brereton and Budgen, 2000). These stake- many often do undertake multiple roles holder roles are as follows. 1. a speciality in itself, is also independent of specialist (and possibly very expensive) a speciality in itself, is also independent boundaries are less well-defined, the idea manufacturing facilities, and the functional is not yet a fully-developed part of the software of the specialist component producer instances. development culture, except in a few although any one person or organization may holder roles, as shown in Figure 17.2, roles. Indeed, for the reasons identified above, well undertake more than one of these Figure 17.2 such as pumps, integrated cir- that perform specialized functions, those components for themselves. Since software creation, while cuits etc., rather than fabricate them SDC17 9/18/07 11:24 AM Page 407 AM Page 11:24 9/18/07 SDC17 among gcc , storing source code in an independent, trusted , storing source code escrow Despite the existence of a fairly extensive and growing literature on CBSE, and on Despite the existence of a fairly extensive and growing literature on CBSE, However, there are a number of issues that we can consider, including possible However, there are a number of issues Lastly, the question of upgrades needs to be considered. Since individual suppliers of upgrades needs to be considered. Lastly, the question The existence of a supply chain is not wholly novel either, since few software sup- supply chain is not wholly novel either, The existence of a Long-term support becomes a more complex issue where there are many suppliers issue where there are a more complex support becomes Long-term they need. about the subject of component characteristics, there is very little guidance available might be most effectively shared and transferred. 17.2.1 components Finding components, Assuming that the design task is not limited to using locally-developed that then a key task for the designer is when and how to search for any components have yet evolved. Indeed, to use the terms we introduced in the previous chapter, the have yet evolved. Indeed, to use the for CBSE is more likely to be a revolu- development of systematic design procedures tionary process than one of synthesis. that support them. So in this section we look design strategies, as well as the activities available will permit, and then briefly con- at these inasmuch as the limited experiences and experience of component-based design ideas sider the question of how knowledge 17.2 components with Designing design elements used in CBSE design, we now Having discussed the nature of the basic systems using software components. The diverse address the question of how to design architectural styles used for their construction, nature of components, the variety of means that no well-established practices and the relative immaturity of the concept agement of overall system maintenance, and for the scheduling of upgrades. The dis- agement of overall system maintenance, make it more difficult to manage and, while the tributed nature of this process may with the integrator, the customer does need to technical responsibilities may lie chiefly their own risk-avoidance strategies and system be aware of this issue when planning upgrades. system developers probably stems at least in part from an awareness of this.) The probably stems at least in part from system developers of assigning responsibility for this provides for the customer is one major problem that and their relationship may arise in use. The role of the integrator, any problems that is likely to be a key element in this. with the customer, there are possible consequences for the man- may upgrade components independently, be employed include the use of preferred suppliers as well as the use of suppliers that the use of preferred suppliers as well be employed include such as employ a mechanism and secure repository. software, such as com- the basic tools that they use for creating pliers also construct compilers such as of the popularity of open source pilers. (Indeed, some to address some additional issues where CBSE is concerned. In brief, these issues these In brief, is concerned. CBSE where issues additional some to address and the chain; of a supply the existence support; long-term of the provision include of upgrades. management the use of ‘second this is where domains of engineering, elements. For other of system the the producer and security for both to provide greater is often employed sourcing’ can solutions that to some extent, other with software While this does occur end user.</p><p>Component-based design 408 SDC17 9/18/07 11:24 AM Page 408 AM Page 11:24 9/18/07 SDC17 Designing with components 409 ); roles (providing ‘layers’ of services vertical roles in a system (distributing the overall sys- roles in a system (distributing the overall element first horizontal Horizontal and vertical integration of components. When seeking components that will make up the given functionality of a system When seeking components that will make up the given functionality of to identify the general needs of the problem, and then to search for a set of com- to identify the general needs of the problem, and then to search for a set to ponents that collectively match that functionality, finally bringing these together form a system (we have termed this n the vertical design choices, and that it is therefore possible that the designer may need the vertical design choices, and that it is therefore possible that the designer to address both forms. component therefore, two possible strategies that might be employed within a wider marketplace are as follows: in interpreting this we should also recognize that components might be used in pro- in interpreting this we should also recognize or for either one by itself. Decisions about viding the structure for both directions, of as forming the architectural design ele- vertical structuring choices can be thought can be thought of as being the detailed design ment, whereas the horizontal structuring make sense in that order. In this chapter we are element, not least because they only design choices are made, although we do primarily concerned with how horizontal are made within a context which is influenced by need to recognize that these choices how to develop a design by using components, even for a well-established architectural how to develop a design by using components, is further complicated by the way that compon- style (for example, JavaBeans). This ents can be used to perform also tem functionality between them) and or .NET). This is illustrated in Figure 17.3, and through mechanisms such as CORBA Figure 17.3 SDC17 9/18/07 11:24 AM Page 409 AM Page 11:24 9/18/07 SDC17 to perform component brokers to look for components (which may be constrained by to look for components (which may strategy was more likely to result in a working solution. strategy was more ). where element-first framework first framework More recent work has focused on the idea of using More recent work has focused on the At a more tactical level, the question of how to find components requires both a level, the question of how to find components At a more tactical any human indexing effort; acquiring an understanding of the none of the methods adequately supported components. a component set should be represented in as many ways as possible; a component set should be represented best cost–benefit since there was no need for free-text keyword searches offered the to decompose the problem into fairly well-defined subproblems and then seek a set then seek and subproblems fairly well-defined into the problem to decompose be (this can subproblems the individual needs of fit the that will of components termed identify the potential for the occurrence of any of the problems shown schematically identify the potential for the occurrence of any of the problems shown in Figure 17.4. These problems can be classified as follows. escrow mechanism. 17.2.2 together components Fitting to be able to In composing a system from a set of components, the designer needs so doing, to model and predict their aggregate behaviour and functionality and, in that our subjects made extensive use of supporting documentation during the search- that our subjects made extensive use ing process.) ‘search space’ for the integrator. This separ- this service and to help provide a uniform ates out the question of and provides a third party role that can company policy or completely unconstrained) independent certification and possibly even an also assist through such means as n and Budgen (2000) we provided subjects (To reinforce this last point, in Pohthong of the forms they suggested, and also observed with a range of searching mechanisms that there were no significant differences between these strategies in terms of effective- that there were no significant differences did also tend to find different subsets of com- ness, but that the different strategies that: ponents. From this, the authors suggested n n means of specifying component characteristics (an on-going problem) and a search component characteristics (an on-going means of specifying this topic is the one described upon these. A fairly early study of strategy that is based as components (as did our (1994). This study used Unix processes in Frakes and Pole name-space. Their study a large set with a suitably unhelpful own), since these provide space using four different ways to index the com- explored the effects of searching this faceted and keyword). Their conclusion was ponents (attribute-value, enumerated, architectural style. As might be expected, for much of the time our subjects worked As might be expected, for much of architectural style. evolved. However, for less mixing the strategies as the solution opportunistically, to be a fairly clear indication (in the design sense), there did seem experienced subjects that pursuing an components can assist with cre- be because identifying the available This may possibly made to work. model of how the system might be ating a conceptual n for strategies is used of these two to which either investigated the extent We have empirical studies a number of small through selection of components ‘horizontal’ a fairly constrained conducted within 2001) that were and Budgen, 2000; (Pohthong</p><p>Component-based design 410 SDC17 9/18/07 11:24 AM Page 410 AM Page 11:24 9/18/07 SDC17 Designing with components 411 This occurs where two or more components are able This occurs where two or more components Components may well provide services over and above The problem arises when the total functionality available The problem arises when the total Illustrations of the problem that can arise during component integration. Illustrations of the problem that can arise tion), or to find some way to isolate and disable the unwanted functions. The tion), or to find some way to isolate and disable the unwanted functions. achieve. latter strategy is likely to be the sounder one, but may be quite difficult to one of identification. Redundant functionality. choice is those that are the basis for choosing those components. The designer’s con- then either to incorporate this added functionality (with possible adverse integra- sequences should this lead to overlapping functionality at a higher level of have the same function being provided by different elements (possibly with differ- have the same function being provided a problem for system maintenance and ent ranges and limits), and this also creates upgrading. Missing functionality. The solution to this is fairly simple (find from the system is less than that required. one). So the problem is chiefly a short-term another component or, possibly, create Overlapping functionality. The designer’s task is to determine which to provide a particular system function. to ensure that it is only performed by the one should perform the task, and how of view, it is particularly undesirable to chosen component. From a design point 3. 2. 1. Figure 17.4 SDC17 9/18/07 11:24 AM Page 411 AM Page 11:24 9/18/07 SDC17 linkable (1999), examples are pro- (1999), examples et al. of the properties of the individual ele- components, that may be scheduled components, that – concerning whether or not components aggregation independent – where this may be organized as control flow through – where this may be – where components may be constructed as – where components This problem was first identified and described in Garlan in and described identified was first problem This – concerning the way that control is organized and transferred – concerning the way – depending on the time at which components are attached to con- – depending on the time at which components (1995) and arises when there are mismatches between the expectations that expectations the between mismatches there are when and arises (1995) nectors, possibly during compilation, link-editing, execution, etc. nectors, possibly during compilation, component packaging be integrated into the libraries, etc.) that need to components (objects, or as executable system, independently; type of control within an appli- and whether this is managed centrally between components, mechanism); (possibly through an event-driven cation or concurrently flow type of information memory, or in a mixed format; method calls, data flow through shared synchronization between components (synchronous) or can continue can ‘block’ the execution of other components to run regardless (asynchronous); binding time Perhaps the one significant conclusion that we can draw from all of this is that, Perhaps the one significant conclusion n n n n connected in terms of topology. In Yakimovitch connected in terms by inconsistencies in: mismatches can be created vided of how architectural n Architectural mismatch. Architectural et al. may arise because a low level, this its context. At makes about each component use dif- construct the components languages used to programming (say) different a higher level, it calls. At parameters on subprogram for passing ferent structures (two com- that events are handled in the way the form of differences may take components are or the way that have responsibility), expecting to ponents both the weight of a mechanical system, which will simply be the sum of the weights of the weight of a mechanical system, which will simply be the sum of the its constituent parts; of the the memory size required for a software system, which again will be the sum sizes of the individual elements (assuming no shared parts). Unfortunately, while these are useful, the properties likely to be of principal interest to Unfortunately, while these are useful, the properties likely to be of principal use of more the designer are also the ones that are apt to be predicted only through the n n 17.2.3 behaviour Predicting system a set of components can be expected to have A system that is created by assembling properties that are in some way an concerned is simply additive, as for: ments. Sometimes the form of aggregation while component-based development has potential to bring together components while component-based development of forms, using components with a consistent from a variety of sources and in a range strategy to adopt. This does not prevent the architectural style is probably the wisest shown in Figure 17.4, but these are likely to be occurrence of the first three problems form of problem (architectural mismatch). Since much more tractable than the fourth supplemented in different ways, even this is not architectural styles can themselves be guaranteed by such a choice! 4.</p><p>Component-based design 412 SDC17 9/18/07 11:24 AM Page 412 AM Page 11:24 9/18/07 SDC17 Designing with components 413 design process? design Overall though, we can conclude that, as yet, component-based design practices Overall though, we can conclude that, as yet, component-based design Another question that this raises is whether the process of design is entirely Another question that this raises is We can identify several reasons why CBSE design practices have so far largely been We can identify several reasons why Once again, the use of a single architectural style for components is likely to help for components architectural style the use of a single Once again, are neither well understood nor in a state to be able to provide any form of structured are neither well understood nor in a state to be able to provide any form knowledge transfer. ponents that will complicate the maintenance process, and of misusing this option to ponents that will complicate the maintenance process, and of misusing this available. So, construct components that are really little different from those already care and, overall, while this may be possible, it does need to be justified with some used in the indeed, this is another reason why a more risk-driven approach such as that DSDM method may be a useful one to adopt. what can be achieved using such forms. the designer of a component-based system is to centred upon reuse? One option for necessary. There may be good reasons to do this, design their own components where specialist needs of the problem or domain, especially if the required elements address to be available. However, there are some for which reusable components are unlikely them the risk that arises of constructing com- obvious pitfalls to this route, among maps readily on to procedural forms or even to a mechanism such as design patterns. maps readily on to procedural forms variety of component forms leads to a lack of A second possible reason is that the to support any systematic description of design consistent representations, necessary complexity. The design processes described in knowledge. A third may just be sheer may well represent the realistic limits to what the last section of the preceding chapter with CBSE requiring additional support beyond can be done with procedural forms, such method would appear to exist. of component-based design itself. The design left uncodified. One of these is the nature of existing components (and by any pol- process is strongly driven by the availability components), and as such is strongly oppor- icies which define the set of acceptable influenced by the descriptions available to the tunistic in its form. It is also heavily and by feedback from prototypes. None of these designer, by past experience of use, The immediate answer to the above question has to be ‘no’. None of the forms to the above question has to The immediate answer in this book have as yet design knowledge that we have examined used for transferring Indeed, it seems questionable for component-based design. been successfully adapted in any form of procedural involved could ever be embodied whether the processes some form of ‘agile there would seem to be scope for developing method, although Chapter 12. However, at the time of writing, no method’, along the lines described in is too detailed an issue to pursue further here, the interested reader should consult the to pursue further here, the interested is too detailed an issue at the end of the chapter. website referenced 17.2.4 a model for a component-based Is there complex aggregation rules. For software, we can include functionality and behaviour include functionality we can software, For rules. aggregation complex measures. any performance well as these, as of as examples not even if these are for aggregation, a single set of rules since it does provide with this, of the research themes has formed one As a topic, this simple in themselves. necessarily and in the USA, Mellon University Institute at Carnegie Engineering for the Software it aggregation. While different aspects of Reports address of their Technical a number SDC17 9/18/07 11:24 AM Page 413 AM Page 11:24 9/18/07 SDC17 are probably still the most cohesion and coupling Our conclusion must be largely the same as in the preceding section when it comes Our conclusion must be largely the same provides one of the few published case In Crnkovic and Larsson (2002), which Returning to the question of functionality, designing components for reuse does Returning to the question of functionality, The general guidelines applying to component characteristics were discussed at the applying to component characteristics The general guidelines provides a set of well-defined interfaces; provides a set of well-defined explicit dependencies. clearly specifies any possesses well-defined functionality; possesses well-defined while the other is a class library), the general experiences seem relevant to components while the other is a class library), the general experiences seem relevant to as a whole. within the system being studied (a control system package used for industrial systems). within the system being studied (a control system package used for industrial looks at key While not specifically concerned with component development, this still that were component characteristics, and how they affect the two particular aspects of propri- studied: evolution of the components across platforms and the replacement sense etary components with industry-standard ones. Also, although in the ‘vertical’ middleware, the two components are relatively low-level (one can be considered as to providing any more specific guidelines. However, the concept of the design pattern to providing any more specific guidelines. styles other than just that of objects, and it does is adaptable for use with architectural more support for designing components than is have the potential to provide rather forms. likely to be obtained from procedural examine the evolution of two components studies on component use, the authors also imply that the designer should strive to make a component as general as is also imply that the designer should reasonably possible. The criteria of with thinking about what constitutes an accept- useful aids that can be used to assist relating to functionality. Some particularly good able form and degree of generality component functionality are found in GUI-based examples of clear-cut definitions of mechanisms such as Java’s AWT. enforced by tools such as compilers. As an example of the second, the interface form enforced by tools such as compilers. down to the form of identifiers to be used required for a JavaBean is very well defined, contrast to this, although a Unix process may use for the externally-visible methods. In mechanisms, there is no specific expectation the standard input and standard output within the component itself, nor about any other about how this should be organized dependencies that may be created. n n task, although the other two of these is very much a general design Achieving the first architectural style, possibly assisted or even may be influenced by the choice of lar architectural style. In addition, the characteristics that are common to all may still to all may that are common the characteristics style. In addition, lar architectural style. according to the chosen architectural need to be interpreted that a component: We can summarize these as requiring start of the chapter. n 17.3 components Designing be can themselves components guidelines for designing be expected, the As might are and those that of a component with general properties those that deal divided into words, there are char- style. In other architectural the needs of a particular specific to needed by a particu- and those that are to all components, that are common acteristics</p><p>Component-based design 414 SDC17 9/18/07 11:24 AM Page 414 AM Page 11:24 9/18/07 SDC17 At the extremity – COTS 415 compilers created some particular problems). compilers created aspect. A survey by Frakes and Fox (1995) observed that aspect. A survey by Frakes and Fox ++ domain (1999) a number of component developers identified the lessons learned from (1999) a number of component developers (Actually, this view is itself probably something of an extreme position! As Carney (Actually, this view is itself probably something of an extreme position! As There is of course a potential tension here. The commercial supplier of com- There is of course a potential tension One aspect of component development that has not received the attention it is One aspect of component development Some of the particular issues that the case study identifies from the viewpoint of viewpoint from the study identifies the case issues that of the particular Some arises largely because the system studied was a ‘product line’ rather than a single the system studied was a ‘product arises largely because system); that depend upon platform out those features of a component the need to separate differences to assist with ease of change (implementational interactions in order C when using different the benefits of large components that are easy to reuse in preference to smaller ones to reuse in preference that are easy of large components the benefits be developed in-house; that could installations (this with early backward compatibility cost of maintaining the high immaturity of CBSE means that few domains are likely to have developed widely used immaturity of CBSE means that few may well be that the future success of CBSE will ‘standard components’. However, it of a more domain-centred approach to com- depend upon the successful adoption ponent development. et al. in collaboration with educators, and developing educational software components of the domain as an important factor in deter- specifically identified the influence mining component granularity. marketplace for their products (unless these are ponents wants the largest possible and for their use alone). Also, the relative produced to the end-user’s specification there were ‘significant differences in the reuse of lifecycle objects between different there were ‘significant differences in reasons for this were not identified. In Roschelle industries’ (domains), although the and Long (2000) point out, COTS software spans something of a range of forms, and and Long (2000) point out, COTS software spans something of a range 17.4 At the extremity – COTS be regarded Those components generally considered as being in the form of COTS can no control as representing an extreme, in the sense that the end user or integrator has So a whatever over their form and properties and no knowledge about their workings. COTS component is one that is quite expressly black box in its nature. additional costs are easily predicted, since they may arise partly through external fac- additional costs are easily predicted, not under the developer’s control. tors such as platform changes that are probably due is the Overall, this case study emphasizes the need for thorough planning (including design study emphasizes the need for thorough Overall, this case components. Such systems when developing and maintaining planning) and control comment on the estimate in of additional costs (the authors have many sources requires 3–4that developing a reusable component Szyperski (1998) times the implementation, but provide no estimates of resources needed for a ‘non-component’ case study). In particular, not all of these additional effort required for this particular n individual component design are as follows: design are component individual n n SDC17 9/18/07 11:24 AM Page 415 AM Page 11:24 9/18/07 SDC17 (1999). or no Office whose et al. Legacy pragmas Very little Very Microsoft Standard component specialized modification source is lost compiler with 5 grid that relates the × Simple industry practice systems Standard with custom parameterization Oracle Financial Necessary tailoring and Modification customization code Internal revision practice with NDI Standard government (non-developmental item) custom of code systems escrowed reworking Extensive Commercial product with source code Most existing Source and modification axes for component classification. Source and modification axes for component item item Special Existing sources contract in-house produced Many other authors make little distinction between using COTS components and Many other authors make little distinction between using COTS components version of</p><p> component commercial</p><p>Component commercial Component produced by Independent from external Source However, this black box property does also constrain the designer’s options when However, this black box property does also constrain the designer’s options elements may seeking to integrate COTS elements in a system, especially since COTS result, they argue against the use of such terms as COTS, on the basis that these are too result, they argue against the use of such terms as COTS, on the basis that simplistic in their categorization.) any other forms, as, for example, in the study described in Yakimovitch Indeed, from the viewpoint of their use in the design process this is not unreasonable, business one. since the main characteristic that distinguishes COTS components is a some of these are capable of varying degrees of parameterization, with the degree of some of these are capable of varying upon the financial and political ‘clout’ of the modification possible often depending propose the use of a 5 customer. To help resolve this, they of modification that can be accommodated, as sourcing of a component to the degree some examples of such components. As a shown in Figure 17.5 which also contains Figure 17.5 (Taken from Carney and Long (2000) © IEEE 2000)</p><p>Component-based design 416 SDC17 9/18/07 11:24 AM Page 416 AM Page 11:24 9/18/07 SDC17 Further reading 417 Component-Based Software Engineering: Putting identifies the importance of this for CBSE. It provides some identifies the importance of this for CBSE. en route . Addison-Wesley. (6), 17–26 12 , So far, there would appear to be relatively little published research into the use of appear to be relatively little published So far, there would One of the key factors to consider for COTS is the ‘shelf-life’. The effect of The effect of is the ‘shelf-life’. consider for COTS key factors to One of the the Pieces Together IEEE Software Further reading Summary Garlan D., Allen R. and Ockerbloom J. (1995). Architectural mismatch: why reuse is so hard. Garlan D., Allen R. and Ockerbloom J. Many of the issues in this chapter have resonances with the issues that we discussed in Chapter Many of the issues in this chapter have resonances one of the motivations for using CBSE practices is to 12. This should not be surprising since concept of the agile method may be one of the more speed up system development. Indeed, the guidance on CBSE practices. useful ones for the longer-term goal of providing Component-based software development is still at a relatively immature stage, and hence there Component-based software development experiences and develop recommended prac- has so far been limited opportunity to consolidate accumulating and codifying the experiences of CBSE tices. For the designer, the problem of of architectural styles that can be employed. design is further compounded by the multiplicity than a passing state does not help! That this is a characteristic of CBSE rather COTS. This is perhaps not surprising, given its relative volatility, but it does mean that not surprising, given its relative COTS. This is perhaps available to the designer. there are few guidelines end-user probably has little or no influence upon any changes that may occur between has little or no influence upon any changes end-user probably and ‘emergent’ business is operating in a rapidly-changing versions. If the customer’s and it may be more than off- not form a particular disadvantage, context then this may there needs to be more doubt of rapid development. In contrast, set by the benefits to be used over a longer period. where an application may need about employing COTS well incorporate redundant functionality and may have particular expectations about expectations have particular and may functionality redundant incorporate well context. of any COTS likely that the supplier makes it and business pressures commercial (Obvious examples frequently. be upgraded reasonably will cause it to component and web browsers.) operating systems such as scale include components on a large the individual strongly market-driven, components is development of such Since the provides a useful baseline for learning about CBSE, even if the quality of the individual papers provides a useful baseline for learning about CBSE, even if the quality of the individual is rather mixed. The main shortcoming is that it is somewhat light on case studies. examples of particular problems encountered in a case study. Heineman G.T. and Councill W.T. (2001). been written This book is really a collection of papers on components, many of which have it to fit around the definitions provided by the principal authors and editors. Well-organized, An interesting paper that was really written primarily as a discussion of the effects of archi- An interesting paper that was really written tectural style, but which SDC17 9/18/07 11:24 AM Page 417 AM Page 11:24 9/18/07 SDC17 (a) executing on the same machine; (b) executing in a distributed environment. achieving reuse across different design solutions. What characteristics do these compon- different design solutions. What characteristics achieving reuse across be interpreted in a aid reuse, and how can these characteristics ents have that particularly software context? model matches the criteria this, and identify how well the JavaBean face. Find out about might this reuse be improved assisting with component reuse. How that were identified as or extended? the glue is likely to be a shell script). example, when using Unix processes as components, forms of component, and how this varies Identify other forms of glue used with different when the components are: Exercises 17.2 form of inter- that employs a very well-defined JavaBeans are a form of software component 17.3 to link components together (for Component-based systems usually use some form of ‘glue’ 17.1 as a means of components are extensively employed Identify a non-software domain where www.sei.edu has had a group working Mellon University (SEI) at Carnegie Engineering Institute The Software Reports available very useful Technical time and there are some of CBSE for some in the area and of COTS. of components on various aspects from this website</p><p>Component-based design 418 SDC17 9/18/07 11:24 AM Page 418 AM Page 11:24 9/18/07 SDC17 SDC18 9/18/07 11:25 AM Page 419</p><p> chapter 18 419 A Formal Approach to Design</p><p>18.1 The case for rigour 18.3 Property-based strategies 18.2 Model-based strategies</p><p>The design representations and methods that have so far been described in this book have largely been systematic in nature, lacking formal math- ematical underpinnings (the main exception has been the Statechart). While the informal syntax and semantics of systematic forms of notation can assist the designer with exploring and developing ideas about a design, their lack of rigour can sometimes create difficulties for such tasks as those involved in verifying a design, or communicating ideas about it to the implementors.</p><p>The topic of the so-called ‘formal methods’ is a very large one, and can only be treated fairly briefly in this text. This chapter therefore concentrates on examining how the mathematical underpinnings provided by such techniques can help to address such problems as those described above. diagrams have no well- diagrams have no all The role of formal methods can therefore be summarized as being to provide The role of formal methods can therefore be summarized as being to formal In terms of the framework for describing a ‘method’ used in this book, the Formal methods seek to overcome this problem through the use of formal Formal methods seek to overcome The problems caused by this lack of a firm syntax and well-defined semantics for The problems caused by this lack of The systematic software design methods, such as those described and analysed in design methods, such as those The systematic software have: mathematically based techniques that can be used for describing system properties – mathematically based techniques that can be used for describing system as in the remembering, though, that the notations can still be diagrammatical in form, example of the Statechart. in that they methods are skewed in a very different manner to the systematic methods, specification languages, based on mathematical structures. The use of such forms specification languages, based on mathematical techniques in reasoning about a design and permits the application of mathematical course a corresponding reduction in terms of the its properties. In return, there is of by such notations when compared with the powers of abstraction that are offered to remove ambiguity, the penalty incurred is systematic forms of diagram. In seeking greater attention to detail than may always be to reduce abstraction and enforce a design process. desirable in terms of the needs of the interpretation), that there is little or no scope to perform such checks in a rigorous interpretation), that there is little or the properties of the design itself. As a result manner, or to reason analytically about virtual machine that is used in the early stages of these transformations, the design be compatible with that which is used in a later of the design process is unlikely to stage. ical formalisms and therefore unambiguous in nature.) ical formalisms and therefore unambiguous used in systematic design practices can easily be many of the diagrammatical notations design verification. In many of the forms con- seen when we consider issues such as to perform any kind of verification operation sidered so far, it is virtually impossible design and the initial requirement. This is to make a comparison between the eventual so changed the forms of description (or their because the design transformations have difficult to reason about them in any ‘formal’ manner. In particular, to understand the about them in any ‘formal’ manner. difficult to reason of interpretation by we may well need to resolve ambiguities meaning of any diagram that components. (This is not to say consulting the textual form has a very well- semantics. Jackson’s Structure Diagram defined syntax and content, while the Statechart described in defined syntax, together with some semantic as more rigorous, since it is based on mathemat- Chapter 7 can certainly be regarded design process that was developed in Chapter 9. Taken together, these will allow us to these will allow us 9. Taken together, in Chapter that was developed design process systematic methods that were with the properties of the make some comparisons chapters. described in the previous forms, supported to all make use of graphical representation the preceding chapters, with these notations is structured text and free text. One problem varying degrees by foundations, and so it is lack any rigorous syntactic and semantic that they generally 18.1 rigour for case The process is a large software development methods’ in the of so-called ‘formal The role con- will chiefly be This chapter and evolving. one that is still developing topic, and and that they employ, the procedures of notation and describing the forms cerned with for the software within the framework application fits how their with considering</p><p>A formal approach to design 420 SDC18 9/18/07 11:25 AM Page 420 AM Page 11:25 9/18/07 SDC18 The case for rigour 421 design architectural Roles of formal and systematic description techniques and notations in the While FDTs can be used almost anywhere in the software development process used almost anywhere in the software While FDTs can be specifying system properties during requirements specification (black box); during requirements specification specifying system properties design stages (white box). form of a solution in the detailed specifying the detailed fairly simple process parts; simple process fairly design heuristics; few well-established relatively parts. powerful representation very but (in compensation) software development life-cycle activities. Figure 18.1 Both of these tasks are enhanced by the FDTs’ power of detailed notation. In contrast, are enhanced by the FDTs’ power of Both of these tasks term the in making what we might the operations involved modules and the division of with such issues as the choice of decisions (concerned manipulate relatively abstract in which the designer needs to function between them), to such forms. Figure 18.1 suggests how FDTs concepts, are much less well suited chapter. roles for which they are best suited are: and life-cycle, the n n n n n for (or ‘FDTs’ Description Techniques’ termed ‘Formal they are often For this reason this descriptions of be preferred in the this term will where appropriate, short) and, SDC18 9/18/07 11:25 AM Page 421 AM Page 11:25 9/18/07 SDC18 formal descriptions. (We .) There seems to be good reason understand understand of FDTs does require a good grounding in the of FDTs does require a good grounding use as opposed to those required to The second of the points in the above list perhaps merits a brief discussion. The second of the points in the above Although a number of FDTs are very well developed, their industrial use has so far their industrial are very well developed, a number of FDTs Although tory of software engineering has many examples of genuine technical advances that tory of software engineering has many did not prove to be universal panaceas!) have been unfairly criticized when they more difficult to manage when used for larger The limitation of scale. FDTs become would appear to have been those problems, and the most successful applications key elements of a system. where FDTs have been used to develop Only limited tool support has tended to be available (perhaps aggravated by the Only limited tool support has tended symbols used, presenting difficulties for the rather varied forms of mathematical a lack of standardization of notation). simple word processor, and also by on occasion, leading to unreasonably high There has been a degree of overselling (This is nothing new of course: the his- expectations and subsequent disillusionment. The use of FDTs requires some familiarity with logic and with discrete mathem- requires some familiarity with logic The use of FDTs atics (Gibbins, 1988). Such aspects as Human– are not suited for use with all problems. The existing forms of parallelism, the non-functional ele- Computer Interaction (HCI), some features difficulties for these forms of description. ments of real-time systems, all present The conservative approach of many project managers (like most software engin- of many project managers The conservative approach investment in training and FDTs require long-term ‘up-front’ eering techniques, also affect the expectations time). The same problem may in project development ‘unfamiliar’ techniques and may have a reluctance to adopt of customers, who notations. create to be considerably fewer than those who need only enough knowledge to understand to be considerably fewer than those who need only enough knowledge to have formal specifications, and it may well be that the ‘formal methods community’ appropriate mathematical techniques. What is much less clear is the extent to which appropriate mathematical techniques. What is much less clear is the extent this level of training is necessary to be able to levels needed have previously encountered this issue of the distinction between the skill to latter where to think that a much less extensive degree of training will be needed for the are likely FDTs are concerned. The staff on a project who need the higher skill levels Despite this, Hall (1990) notes that FDTs have been used on a reasonably large num- Despite this, Hall (1990) notes that (usually safety-critical) components of systems. ber of real projects, especially for key FDTs mandatory for certain tasks is also likely to The increased trend towards making increase interest in their use. Without a doubt, the effective n n n n n n might be employed for the main activities of the software life-cycle introduced earlier, earlier, introduced life-cycle of the software activities the main for be employed might 3. in Chapter of problem for which as is the scale undoubtedly growing, although it is been limited, slow adoption reasons for the relatively Some of the been used (Hall, 1990). they have and Hall, and these (2001) such as Sommerville identified by authors have been include:</p><p>A formal approach to design 422 SDC18 9/18/07 11:25 AM Page 422 AM Page 11:25 9/18/07 SDC18 The case for rigour 423 abstractions based on first-order predicate abstractions using axioms in the form of equa- data procedural forms, in which the specifier defines the behaviour of a system forms, in which the specifier defines the forms, in which the specifier defines the behaviour of a system forms, in which the specifier defines forms use forms model model-based property-based Axiomatic logic. Examples of these are OBJ, Anna and Larch. Algebraic tions. Examples of such forms include Clear and Act One. (b) tuples and sequences. Notable examples of these forms are VDM and Z. tuples and sequences. Notable examples that it must satisfy. There are two further indirectly, by stating a set of properties subcategories of these: (a) by constructing a ‘model’ of the system using structures such as sets, functions, by constructing a ‘model’ of the system This general classification of form provides the basis for the structure that has been This general classification of form provides the basis for the structure that It has been observed that a formal specification language provides the following It has been observed that a formal specification The more general issues involved in the use of FDTs have been well reviewed in a FDTs have been in the use of general issues involved The more a notation (the ‘syntactic domain’); a universe of objects (the ‘semantic domain’); specification. a rule stating which objects satisfy each aimed at verifying a solution against a requirement and supported by software a solution against a requirement aimed at verifying tools. developments in Europe have been based on exploiting the powers of formal speci- have been based on exploiting developments in Europe Method (VDM) and Z such as the Vienna Development fication, using languages of the end-system, to reason about the properties and behaviour (pronounced ‘zed’) use of tools; and making only limited techniques, the focus has been much more on program-proving in North America adopted for this chapter. This introduction is followed by two major sections that adopted for this chapter. This introduction is followed by two major forms. respectively examine the nature of the model-oriented and property-oriented This division is summarized in Figure 18.2. (2) The The formal techniques that are in current use can also be grouped into two principal The formal techniques that are in current categories: (1) The features (Wing, 1990): n n n So while both approaches seek to use mathematical forms and techniques to specify seek to use mathematical forms So while both approaches two communities are working properties of a system, the behavioural and structural from quite different starting points. n n unwittingly created a barrier to wider acceptance by failing to make this distinction to make by failing wider acceptance to a barrier created unwittingly clearer. the factors affecting such topics as the which she addresses Gerhart (1990), in paper by cul- out that there are Gerhart points In particular, of these techniques. wider adoption as: which can be summarized and the USA, between Europe tural differences SDC18 9/18/07 11:25 AM Page 423 AM Page 11:25 9/18/07 SDC18 (Bowen and Ten Commandments of Formal Methods use specifications that can be ‘executed’ via an interpreter. The use specifications that can be ‘executed’ use graphical forms for their syntactic content. Statecharts and use graphical forms for their syntactic General categorization of formal methods. Two further classifications that can be applied to FDTs, and which extend beyond Two further classifications that can be (Zave, 1984). Visual languages such forms. Petri Nets provide two examples of Executable forms be computable restricts the scope of these to requirement that their functions must forms, and their role and scope have been a greater degree than the non-executable 1989). Examples include <a href="/tags/Prolog/" rel="tag">Prolog</a> and PAISley subjects of debate (Hayes and Jones, Hinchey, 1995), which examines some of the misconceptions about the roles that Hinchey, 1995), which examines some of the misconceptions about the FDTs can play in system development. Shapiro (1997), and further analysed in Glass (2002). Glass views this debate as partly Shapiro (1997), and further analysed in Glass (2002). Glass views this debate a period a clash of diverse academic and industrial cultures, with the 1990s then being the of moving from extreme positions to a shared one, on the one hand abandoning formality ‘silver bullet’ claims, and on the other overcoming a reluctance to accept proselytizing in software development. An example of a more balanced and less approach is presented in The form and application of formal methods are very wide subjects, and it is well The form and application of formal to describe any of these methods in detail. beyond the scope of this book to attempt made less of an impact in the 1990s than might One obvious question is why they have level of interest through the 1980s? Some of the have been expected, given the growing occurred during the late 1980s are reviewed in debates about the role of FDTs that n n these, while being related to them, are as follows: these, while being related to them, are Figure 18.2</p><p>A formal approach to design 424 SDC18 9/18/07 11:26 AM Page 424 AM Page 11:26 9/18/07 SDC18 Model-based strategies 425 (1994) provides one of the few papers that examines how FDTs of the few papers that examines how (1994) provides one et al. One question that is raised by the use of such forms is whether formal methods are One question that is raised by the use This chapter is concerned less with the detailed nature of the forms used in a given This chapter is concerned less with the The collection of papers in Gehani and McGettrick (1986) are mostly ‘classical’ in in Gehani and McGettrick (1986) The collection of papers A slightly different, but not wholly incompatible, explanation is offered by is offered explanation incompatible, not wholly but different, A slightly forms concentrate more on describing the external features of a system than on the forms concentrate more on describing the external features of a system mechanisms that are used to produce these features. of the system. We begin a rather more detailed discussion of these design strategies of the system. We begin a rather more detailed discussion of these design that will be by examining one of the methods using such an approach. It has features forms readily recognizable to anyone with experience of imperative programming than the (although the analogy should be treated with due caution). It is also closer in the property-based forms to the approach used in the systematic methods described preceding chapters, in both its philosophy and its features; since the property-based 18.2 strategies Model-based specification forms were described as those in In the previous section, model-based forms to construct a ‘model’ of the sys- which the specifier uses various mathematical reasoning about the properties and behaviour tem, and then uses this as the basis for roles and uses of design heuristics are harder to identify; this point will be examined a roles and uses of design heuristics are little more in each of the next two sections. problems lend themselves more readily to the essentially domain-specific, in that some is a rather wide question, but it will be examined use of this type of design model. This considered. a little further when specific forms are category of method than with the question of how to describe them within our present category of method than with the question earlier, formal methods generally combine model of the design process. As observed quite weak process parts, with the latter usually very strong representation parts with (The use of the term ‘specification’ in involving some form of stepwise refinement. emphasis on representation as against describing these forms places a not inappropriate the creative design component is apt to get procedural content.) As such, therefore, the development of the basic model). Also, the pushed to a very early stage (usually can be incorporated into existing software development practices, and particularly into existing software development can be incorporated addressing small subproblems of how to scale their use up from addresses the problem draws together a forum which needs. Finally, Saiedian (1996) to meeting large-scale others, to examine why FDTs leading FDT researchers, as well as includes some of the than might have been expected. in terms of general acceptance have made less progress the most critical areas. of specification forms and the a useful introduction to the subject nature, and provide are provided in both Good reviews of strengths and weaknesses thinking behind them. some useful examples of ap- Hall (1990), with the latter citing Gibbins (1988) and plication. Fraser Sommerville (2001), who argues that the key change has been that of the marketplace that of has been key change that the argues who (2001), Sommerville 1990s, and continuing throughout the growing demands He argues that for software. will- together with a time to market, achieve more rapid into the 2000s, to unabated obtain earlier delivery, faults in order to with some users to accept software ingness by for emergent organ- of FDTs. Indeed, with the use generally incompatible have been but acceptable for all are simply not by the use of FDTs overheads implied izations, the SDC18 9/18/07 11:26 AM Page 425 AM Page 11:26 9/18/07 SDC18 of Z. There are . they should come how vocabulary specification is an important element of Z, it is not an essential one, is an important element of Z, it is not changes should occur, rather than proof what the set of all integers; and the set of all natural numbers (positive integers and zero). – – is a collection of elements (or set members), in which no sense of ordering of ele- is a collection of elements (or set members), in which no sense of ordering It is therefore useful to begin by reviewing the basic It is therefore useful to begin by reviewing Such a process is fairly typical of the formal methods in general. Iteration of refine- Such a process is fairly typical of the Formalisms rarely constrain design strategy, and Z is no exception. Specifications constrain design strategy, and Z is no Formalisms rarely � � set In addition, the user may specify their own set types (and, for many problems, is likely In addition, the user may specify their own set types (and, for many problems, letters for to want to do so of course). The convention is to employ all upper case italic A ments is involved. In Z there are some pre-defined set types such as: and in this section we will only discuss the role of Z for and in this section we will only discuss and logic, each with their own notational three elements of this: sets, set operations features. Sets 18.2.2 The Z formalism of using Z is its enthusiastic use of a very Perhaps one of the greatest inconveniences While presenting no problem when using a wide range of (mathematical) symbols. something of a strain for the word processor! We whiteboard, it does tend to become should note too that while a level that is suitable for being interpreted through the medium of a programming a level that is suitable for being interpreted language. and there is little of the interplay between ment tends to be the dominant strategy, of the systematic design methods. Each step has viewpoints that we observed for many are no transformations in this type of method. the form of an elaboration step; there basis, although the former is probably the easier to employ if the choice is available. former is probably the easier to employ basis, although the of a system using discrete begins with the creation of a model The development process predicate logic that is used to (primarily sets), together with mathematical structures then used to describe precisely between the structures. Logic is specify the relationships that the system can perform, be changed for each operation how the model will expressed in terms of gradually refine the specification until it reaches about. This process is repeated to widely regarded as being the authoritative definition, but there are now many texts on being the authoritative definition, but widely regarded as on the part of the reader. levels of mathematical sophistication Z, assuming various a fairly gentle introduc- text by Currie (1999) provides For example, the introductory Z. into some of the deeper waters of tion, without getting or bottom-up (compositional) on a top-down (decompositional) can be developed 18.2.1 Z language The a of a ‘language’ than as being more classify the Z FDT would probably Most users than in some com- less developed elements are probably the process method. Indeed, in the Programming by J-R Abrial VDM. Z was created such as parable formalisms development through underwent major of Oxford, Group at the University Research is by Spivey (1992) the 1990s. The text through and became established the 1980s,</p><p>A formal approach to design 426 SDC18 9/18/07 11:26 AM Page 426 AM Page 11:26 9/18/07 SDC18 Model-based strategies 427 as , used to test (clearly it may availableRunways of the set, and is denoted membership AIRCRAFT cardinality is the complementary operator that is is the complementary operator that ∉ and as being of the set type as being of the set west | stacked north | RUNWAY : {1..31} 3 main == ] the set of all aircraft in a given airspace all aircraft in a given ] the set of = = set membership operator of these types may be declared, and are given identifiers which are be declared, and are given identifiers of these types may :: AIRCRAFT : RUNWAY is the ∈ gateNumbers � ∈ ∉ ∈ The number of elements in a set is termed the Sets may also be described using a subset formalism, as in: Sets may also be described using a subset Variables RUNWAY AIRCRAFT # 3 main 40 gateNumbers stacked availableRunways RUNWAY [ can be assigned the value of the empty set (denoted by {}). can be assigned the value of the empty contain several aircraft that are waiting to land), and the variable contain several aircraft that are waiting that are currently free for use. Obviously, both likewise being a set of those runways where the airport has three runways, distinguished by their direction. has three runways, distinguished by where the airport a lower case letter, as in: and italics, and which begin with mainly in lower case the identifier of a set type, and the elements of the set may be described using plain text, using plain described may be of the set elements and the a set type, of the identifier as in: as in: the set elements, or by enumerating used to test for non-membership of a set. by prefixing the set identifier with the character #, as in: where 31. Set operations with sets is that of The most obvious operation to employ of a set (and therefore returning a boolean whether or not an object is a member would be true: value). For example, all of the following which indicates that an airport gate may have an identifier number in the series 1 to which indicates that an airport gate which identify the variable which identify the The operations upon sets that are used in Z are all fairly standard, and include those The operations upon sets that are used in Z are all fairly standard, and that are shown in Table 18.1. SDC18 9/18/07 11:26 AM Page 427 AM Page 11:26 9/18/07 SDC18 s Or Implies Equivalence (if and only if) For all (universal quantifier) There exists (existential quantifier) There exists exactly one It is true that Such that Not And , the value must also be 31 or lower, according to } Both sets contain the same members Both sets contain are all the other (its elements contained within One set is entirely both sets) members of of is the set of all subsets The powerset all elements of the two ‘input’ sets The resulting set contains are members of both sets The set of elements that are only members of one of the sets The set of elements that n Logic operations used in Z Logic operations used • expression • 10 > gateNumber 1 ⎢ Symbol¬ ∧ Description ∨ ⇒ ↔ ∀ ∃ ∃ • n ⎢ Table 18.2 s = ⊆ � ∪ ∩ \ predicate ⎢ introduces the variables of concern to the rule introduces the variables of concern to describes the resulting set of values constraints their values Set operations used in Z used Set operations gateNumber : n The logical operators can then be combined with the set elements and used to The logical operators can then be combined { declaration declaration predicate expression Union Intersection Difference OperationEquality Subset by Denoted Powerset Comment since it is of the set type our previous definition. As an example, we might identify a subset of terminal gates that can be used for some As an example, we might identify a subset of terminal gates that can be used particular operation, using the rule 10, but also, which identifies a set of gate numbers, where the values are greater than where the In Z, the operations and relations in a system specification are usually expressed by In Z, the operations and relations in logic. The set of symbols used for this in Z using the standard operators of predicate include those shown in Table 18.2. a set, usually in the general form of describe characteristic rules affecting Logic Table 18.1 Table </p><p>A formal approach to design 428 SDC18 9/18/07 11:26 AM Page 428 AM Page 11:26 9/18/07 SDC18 Model-based strategies 429 that is input ?} p { PERSON ∪ � : indicates that this is an ′ , describing how the elements of the sig- , describing how the p? aircraftCapacity aircraftCapacity passengers < ′≤ passenger ReserveSeat ), with the convention that the primed identifier ), with the convention that the primed , ′= ; passengers state invariants PERSON : ∉ PERSON passengers passengers passengers # passengers p? # p? ReserveSeat in Z is to describe a system operation, and this is usually drawn operation, and this describe a system in Z is to is ; that form the describes the ‘before’ and ‘after’ states of the set of passenger (ele- describes the ‘before’ and ‘after’ states that introduces any variables and assigns them to set theoretic types; variables and assigns them to set theoretic that introduces any describes the invariants required to reserve a seat, which are as follows: describes the invariants required to reserve schema name signature schema name signature predicates predicate ber of the initial set of passengers) (precondition 2); the the new passenger list will consist of the original set of elements and also passenger added in the operation (postcondition 1); the the number of passengers after the operation must now be either less than aircraft capacity or equal to it (postcondition 2). firstly the number of existing passengers should be fewer than the capacity of the firstly the number of existing passengers aircraft (precondition 1); have a reservation (and hence not a mem- the new passenger should not already n n denotes the state of the set after the operation; denotes the state of the set after the the n n the the ments in the powerset of the the are described in terms of and constrain the operation, and that nature are related postconditions. preconditions and the schema the schema Here: The use of the ‘?’ character in the identifier required for the operation. (An output identifier would end with ‘!’ instead.) n n n A very basic example is shown below, based upon a simplified airline (or train, coach, is shown below, based upon a simplified A very basic example etc.) reservation system. n n 18.2.3 Z schema The the The role of three key elements: box. A schema has as an open n SDC18 9/18/07 11:26 AM Page 429 AM Page 11:26 9/18/07 SDC18 } p? { ∪ below, which returns the number ′ PERSON PERSON aircraftCapacity aircraftCapacity passengers � < � ResSyst ′≤ : : ResSyst ′ ′= ReserveSeat ′ PassengerCount passengers PERSON : ∉ passengers passengers passengers # ResSyst p? p? passengers passengers # ResSyst schema. Note also that this type of specification is not an executable one is not an executable type of specification also that this schema. Note The Z schema is clearly something that very much specifies individual black box something that very much specifies The Z schema is clearly in ‘layers’ of abstrac- provides scope to use other schemas The schema mechanism Clearly this is not a complete specification (for example, we have not specified a specified have not we (for example, specification not a complete this is Clearly of passengers with reservations, but makes no change to the state of the reservation of passengers with reservations, but makes no change to the state of the list. We can also identify ‘inspection’ operations that do not cause any change to the state We can also identify ‘inspection’ operations that do not cause any change of the system, as in the operation which then allows us to rewrite the original schema as which then allows us to rewrite the original reservation system before and after the operation. These are shown below and, again, before and after the operation. These reservation system notation to indicate the new state. employ the prime operations, and as such could be used to refine both analysis and design activities. such could be used to refine both operations, and as an analysis of any use operations might then involve performing Deriving the actual of system analysis. or using more ‘traditional’ forms cases for the system, to describe the state of the our example, we can use two schemas tion. Continuing with value for the capacity of the aircraft, or that the passenger should have a ticket for the a ticket have should the passenger or that the aircraft, of for the capacity value our a Z schema. Here general style of to show the but it should be sufficient journey), the to be modified by booking list is state of an aircraft is to show how the objective ReserveSeat for used as the basis it could be although obviously be used as a prototype, that could one. producing</p><p>A formal approach to design 430 SDC18 9/18/07 11:26 AM Page 430 AM Page 11:26 9/18/07 SDC18 Model-based strategies 431 symbols). Ξ and PassengerCount Δ } p? { (denoted by ∪ xi ′ and the #passengers #passengers passengers � � ′ : = : = ResSyst delta ′= ResSyst operation in yet another (still more concise and operation in yet another (still more concise ResSyst ReserveSeat Δ PassengerCount PassengerCount ResSyst passengers Ξ count! count! ResSyst ResSyst count! count! PERSON : ∉ ResSyst Δ p? p? passengers ReserveSeat is an output variable by means of the ‘!’ suffix.) is an output variable count operator is used where no change of state occurs, so that the operator is used where no change of convention is used to represent a change of state, and combines the before and to represent a change of state, and convention is used Ξ Δ One last element in a specification is to specify what the initial state of the system One last element in a specification is to specify what the initial state of the Two further conventions that we ought to note in this very brief review of the that we ought to note in this Two further conventions should be. We can describe this using the following initialization operation. (Implicitly adding the constraint that the number of passengers is not altered by this (Implicitly adding the constraint that the number of passengers is not altered operation.) The more concise form as: operation can also be rewritten in a and we can then write the explicit) form as: after states in one otherwise empty schema. For our reservation example we get: otherwise empty schema. For our reservation after states in one The (Here we see that features of Z are the main specification SDC18 9/18/07 11:26 AM Page 431 AM Page 11:26 9/18/07 SDC18 state Ξ . While state and Δ , while the property-based requirements specification design { } , based on the type of plane allocated , based on the type ′= ′ InitResSyst ResSyst passengers a system is to operate in terms of how the model aircraftCapacity how the system is to do. what It could therefore be argued that the model-based strategy comes somewhat closer It could therefore be argued that the model-based strategy comes somewhat There is much more to specifying systems with Z than has been described here. There is much more to specifying systems The schema mechanism forms the building block for constructing more complex forms the building block for constructing The schema mechanism error cases. required for the system. specifications. to supporting the white box-centred activities of strategy is closer to meeting the black box needs of The model-based specification form of FDT that was described in the previous section The model-based specification form of FDT that was described in the previous is concerned with specifying described in states are changed by the operations. The property-based approach that is a system, and this section is more concerned with identifying the external properties of hence with codifying viewpoint of the model (nor does any other formal method of course). viewpoint of the model (nor does any 18.3 strategies Property-based 18.3.1 Overview cess, will be likely to involve iteration between the steps). Again, an analysis process cess, will be likely to involve iteration to identify the operations. such as use case analysis will be needed the basic elements, we can begin to recognize the However, from these descriptions of through the use of Z. This is basically a combin- type of model that will be produced viewpoints, with an element of the data mod- ation of the behavioural and functional does a Z specification create a constructional elling viewpoint included. At no point 3. one state exists. Specification of the initial state, to assert that at least 4. results and also the Specifications for all of the operations, identifying successful can be used for a specification, but it can also Indeed, not only is this a structure that process (and, of course, like any such pro- be regarded as the outline for a development 1.definitions user-defined sets, and global Specifications of the given sets (types), 2. by the Specification of the abstract states of the system, followed (This should also set a value for (This should also set will omit this detail here.) to the flight, but we by using logic to com- (For example, we can create new operations specifications in Z. specification for a system will So the general form of a full Z bine other operations.) following elements. include at least the</p><p>A formal approach to design 432 SDC18 9/18/07 11:26 AM Page 432 AM Page 11:26 9/18/07 SDC18 Property-based strategies 433 . An entity (or object) is sort relationship, the inheritance hierarchy, relationship, the inheritance uses This is an English-language description of the entity and of This is an English-language description . This specifies the entity being defined, together with its sort and the . This specifies the entity being defined, This defines the names of the operations, and provides the details of any . This part actually defines the operations and the relations that exist An algebraic specification usually consists of the following four main parts (these An algebraic specification usually consists A term that is widely used in algebraic specification is A term that is widely used in algebraic As in the previous section, most description and discussion will be centred on section, most description and discussion As in the previous In this context, algebraic specification can be regarded as a technique whereby an specification can be regarded In this context, algebraic In this section the general characteristics of algebraic specification will be exam- specification of algebraic the general characteristics In this section Signature. parameters that they require. Axioms between them. Introduction are needed for its description. names of any other specifications that Informal description. the operations performed upon it. Each of these will now be described a little more fully, using the specification of a Each of these will now be described a little more fully, using the specification system to simple structure. This is the ‘aircraft table’ used in an Air Traffic Control n n are shown schematically in the example of Figure 18.3). are shown schematically in the example n n general approach used with these forms. An alternative example of a fairly simple form general approach used with these forms. is used in Bradley (1989). sort, and so this is a concept that is essentially regarded as being an instance of a Strictly speaking, a sort is a set of objects, but we related to the idea of a type or class. closely in this section. will not be exploring this aspect particularly formal techniques in this area. 18.3.2 part representation specification: Algebraic the formal techniques is the relative complexity of One of the less attractive features of simplified form will be adopted, based their notations! In this section a relatively (2001) for the same purpose of describing the closely on that employed in Sommerville state might be absent, an algebraic specification is able to capture many of the exter- an algebraic specification is able state might be absent, object, including the nal properties of an of operations for use by other objects. and the provision part used for algebraic and properties of the representation examining the form really a reflection of the major strengths of the specification. Again, this emphasis is object class or type is specified in terms of the relationships between the operations is specified in terms of the relationships object class or type most easily demonstrated using For purposes of illustration, it is defined on that type. that the technique is not for the objects, but it should be recognized abstract data types that some elements of the gen- alone. Once again it can be seen restricted to this form Even though the concept of are reflected in this form of description. eral ‘object model’ this view is undoubtedly over-simplified, it does emphasize the difference between the difference emphasize it does over-simplified, view is undoubtedly this whereas changed, are of the system how the properties one emphasizes strategies: these the should not expect that reason, we responses. For focuses on its external the other the as was used in of system state, such an explicit model forms to use property-based example of Z. model-based for our needs. property-based approach of the sufficiently representative ined, as being SDC18 9/18/07 11:26 AM Page 433 AM Page 11:26 9/18/07 SDC18 directive sometimes used in programming lan- ) to emphasize this. (That is, we can describe a ) to emphasize this. (That is, we can relationship. In the same way that an operation Elem uses import a sort and its operations brings them into the scope of the new spe- ’. Schematic of an algebraic specification. Schematic of an algebraic A simple algebraic specification (1). The third part of the introduction is used to identify both the other object sorts or The third part of the introduction is used to identify both the other object The sort of the entity is also described in this introduction; in this case it is simply The sort of the entity is also described roughly corresponds to the guages, in order to identify a Importing it. (This cification, so that they can be used within it, but do not become a part of aircraft_table types that are used in the definition and the way in which they are used. Broadly speak- types that are used in the definition and the way in which they are used. Broadly ing, there are two ways in which a specification can make use of other types/sorts. n method. Figure 18.4 shows the heading parametrized by a set of elements, where the method. Figure 18.4 shows the heading So specific a parameterization is not essen- type of the elements is specified externally. external behaviour of an object, and could use a tial, since we are only describing the more general parameter (such as to be ‘instantiated’ for a specific type.) generic form that will eventually need ‘ essentially correspond to that of a hash table.) essentially correspond to that of a hash The introduction the ‘entity’ (or ‘object’ according to prefer- The heading of the introduction identifies syntax for this varies according to the preferred ence) that is to be described. The exact maintain a run-time record of aircraft in the airspace or on the ground. (For those who maintain a run-time record of aircraft of the behaviour of this abstract data type, it will like to have a more concrete picture Figure 18.4 Figure 18.3</p><p>A formal approach to design 434 SDC18 9/18/07 11:26 AM Page 434 AM Page 11:26 9/18/07 SDC18 Property-based strategies 435 ’. ’ (which may eventually be of type aircraft_details aircraft_track allows a new sort to be defined that inherits the operations and axioms allows a new sort to be defined that inherits A simple algebraic specification (2). A simple algebraic specification , since this is required in the later definitions. integer Enrichment new operations may be defined that will in of another specification. (In some cases, concept is obviously closely related to the effect overwrite some of these.) This programming. inheritance mechanism used in object-oriented in such a programming language may need to be prefixed (qualified) with the object in such a programming language may may need to be qualified with its sort, in type, so the identifier for an operation of the operation that is required.) The order to make clear the particular instance specification of Figure 18.4 uses ‘ also ‘ integer, but not necessarily so), and describing its basic properties using a set of operations. These operations usually fall describing its basic properties using a set of operations. These operations into two groups: in the case of the property-oriented forms. In Figure 18.5 this is added to the intro- in the case of the property-oriented forms. In Figure 18.5 this is added duction provided in Figure 18.4. The signature an object, by The purpose of the signature is to define the external ‘appearance’ of sort The informal description for, and the importance of, textual comments The previous section illustrated the need and to relate this to the real-world entities used to explain the mathematical formalism is performed by this section of the specification where appropriate. The same purpose n make use of enrichment, but it does import the The present example is too simple to Figure 18.5 SDC18 9/18/07 11:26 AM Page 435 AM Page 11:26 9/18/07 SDC18 , remove and aircraft_table . insert , add , create are inspection operations. update , eval and create last operations are used to create and modify entities of the defined sort. operations are used to create and modify operations are used to evaluate the attributes of the entity’s sort. operations are used to evaluate the attributes A simple algebraic specification (3). , since this is needed to provide an upper bound to the size of the table.) , since this is needed to provide an upper While the constructor operations are fairly standard, regardless of the sort of the While the constructor operations are These will typically have identifiers such as These will typically have identifiers such Inspection Constructor using this simplified form of algebraic notation. provides the definition of the inspection operations in terms of the constructor oper- provides the definition of the inspection operations in terms of the constructor as the main ations. Indeed, the construction of these definitions can be regarded further in technical problem of developing an algebraic specification, and is discussed gives math- the next section. Essentially, though, a set of equations is developed that example in ematical expressions defining these relationships. These are shown for our Figure 18.7, which now provides a fully expanded definition for the entity, the inspection operations are obviously very sort-specific. Figure 18.6 shows the entity, the inspection operations are obviously The operations example extended to include the signature. while are obviously constructor operations, The axioms of mathematical notation. Basically, this section It is here that we get into the use n see why it was necessary to import the sort (In the case of our example, we now integer n Figure 18.6</p><p>A formal approach to design 436 SDC18 9/18/07 11:26 AM Page 436 AM Page 11:26 9/18/07 SDC18 Property-based strategies 437 is last is then related to the last will return a value that cor- last operation. create , each of the inspection operations can be related , each of the inspection operations can , by stating that can be interpreted as meaning: ‘inspecting any element create aircraft_table create operations using a recursive form of definition. operation can also be related to each of the constructor operations. The A complete algebraic specification. remove eval and The In the example of the ing to read from it will have undefined effects. responds to the upper bound used in the insert axiom used to relate it to since no in a newly defined table will result in an undefined result’. This makes sense, so attempt- values will have been inserted into the table at the point of its creation, and Figure 18.7 So, for example, the inspection operation to each of the constructor operations. first related to the operation SDC18 9/18/07 11:26 AM Page 437 AM Page 11:26 9/18/07 SDC18 ) should make the interpre- make ) should insert therefore first tells us that if the therefore first tells are similar. Again, the second of these are similar. Again, and insert after it has been modified by a constructor been modified by after it has eval has been deleted from the table, then attempt- has been deleted from remove and and eval has been inserted for the chosen track, then the details has been inserted for eval . Failing such a correspondence, the rule will need to be . Failing such a correspondence, aircraft_table aircraft_track eval aircraft_details value is greater than the size of the table (however these are defined), the the size of the table (however these value is greater than mechanism also aid the designer in the task of partitioning the functional- mechanism also aid the designer in the uses The strategy for developing algebraic specifications, like that used for Z speci- The strategy for developing algebraic In the absence of any overall strategic guidelines on how a system should be struc- In the absence of any overall strategic The relationships between The relationships between of such a specification, therefore, something of the general form Having examined, The axiom used to relate The axiom used This (and the next relation between between next relation (and the This documented heuristics for algebraic forms, although this is not to imply that none have documented heuristics for algebraic forms, although this is not to imply that been developed by the practitioners. without very extensive experience of its use. 18.3.4 specification for property-based Heuristics along One thing that the algebraic form currently lacks is a good tutorial textbook are no well- the lines of those now available for Z. Partly as a result of this, there eer they have the particular attraction of using more familiar mathematical forms and eer they have the particular attraction side-effect is that the task of generating the techniques (algebra). An added useful of guidelines for testing the eventual implemen- axioms also effectively generates a set tation (Bradley, 1989). the top-down and bottom-up strategies. But it is fications, readily encompasses both this form of specification for a very large system probably more difficult to construct as the ity of a system. for the more detailed task of constructing the tured, there are various guidelines objects. The techniques for ensuring that the set specification of an object, or a set of also well established, and to the practising engin- of axioms is complete and correct are 18.3.3 part process specification: Algebraic technique really lacks any ‘process part’ Once again, the algebraic formal description design methods, and most of the literat- of the form that is provided by the systematic the form of a specification than its derivation. ure is more concerned with describing the form of the specification makes it equally As with the object-oriented strategies, bottom-up development strategy. Features such well suited for use with a top-down or observes that if a particular observes that if a particular produce an undefined result. ing to read this will briefly how this might be developed. we now need to consider aircraft_track goes on to show that if a par- by these relationships. It then result will not be specified ticular value of by of this will be retrieved element. applied to another tation of these axioms somewhat clearer. The axioms define the effect of performing of performing the effect define The axioms clearer. somewhat axioms of these tation However, rather is in a particular state. when the object on the object the operation in in Z), it is defined (as would be used to define the state an explicit model than using the effect of one of axiom relates the So each the constructor operations. terms of operations on the inspection operation.</p><p>A formal approach to design 438 SDC18 9/18/07 11:26 AM Page 438 AM Page 11:26 9/18/07 SDC18 Exercises 439 IEEE Com- (5), 11–19 7 , ) IEEE Software techniques needed for the derivation of a formal techniques needed for techniques) are much less well developed. This techniques) are much ReserveSeat design . Prentice Hall mathematical (an operation which returns the number of unreserved seats) (the opposite action to The Essence of Z (4), 56–63 the example of the simple reservation system used in Section 18.2.1, create CancelSeat AvailableSeats 28 , (a) (b) specifications for the following operations: puter Exercises Further reading Summary 18.1 For A highly-acclaimed paper written by an industrial practitioner and providing a refreshingly A highly-acclaimed paper written by an can provide, and where their limitations lie. unbiased appraisal of what such approaches Ten commandments of formal methods. Bowen J.P. and Hinchey M.G. (1995). Hall A. (1990). Seven myths of formal methods. Hall A. (1990). Seven myths of formal methods. approach to specification of behaviour, or of component structures, is needed, and it is important of behaviour, or of component structures, approach to specification when this arises. are techniques that can provide support to appreciate that there is that formal descriptions can pro- the material covered in this chapter What does emerge from issues such as consistency and aid to developing a design, especially when vide a very powerful However, the verification are considered. This chapter has only skimmed the surface of a large and technically complex topic, and one that topic, and one and technically complex the surface of a large has only skimmed This chapter detail to give the reader provided sufficient it should have for research. However, is still an area is of formal methods and limitations with the strengths of why some familiarity an appreciation when a more rigorous There are times designer’s repertoire. part of the software an important Currie E. (1999). of Z, beginning with a helpful tutorial on the mathe- A slim and readable volume on the basics book is on the use of Z for specification and modelling matical underpinnings. The emphasis of the of systems. A very practical set of guidelines for the successful use of formal methods in practical projects, A very practical set of guidelines for the projects. distilled from observations of their use in that we may well find that these techniques can make their largest contribution. that we may well find that these techniques specification (as opposed to the specification (as opposed and on what scale. There is of when to make use of these techniques leaves open the question of very large systems and, use of formal methods for the development relatively little documented strengths. There is evidence of be the best way of making use of their indeed, this may not systems – or at least, of those parts of a large increasing use for the development of high-integrity those often termed ‘safety-critical’). It is here system that may require high integrity (including SDC18 9/18/07 11:26 AM Page 439 AM Page 11:26 9/18/07 SDC18 aircraft_table → to enquire about the user’s current bank balance about the user’s current to enquire to make a cash withdrawal from the machine (note that the conditions the machine (note cash withdrawal from to make a RequestBalance WithdrawCash daily limit, is within the user’s amount to be withdrawn succeed are that the for this to hoppers in the as cash from the and is also available in their account, is available machine) update (aircraft_table, aircraft_track, aircraft_details) update (aircraft_table, updates the aircraft details for a given track, so that the signature will now include: details for a given track, so that the signature updates the aircraft autoteller machine, including the operations: machine, including the autoteller (a) (b) 18.3 that provided in Figure 18.4, add an operation For the example algebraic specification 18.2 of a bank operations the top-level some of describe that Z specifications simple Write</p><p>A formal approach to design 440 SDC18 9/18/07 11:26 AM Page 440 AM Page 11:26 9/18/07 SDC18 SDC19 9/18/07 11:32 AM Page 441</p><p> chapter 19 441 Whither Software Design?</p><p>19.1 What is software now? 19.3 Improving knowledge 19.2 Codifying design knowledge transfer</p><p>In drawing together the ideas of the preceding chapters, this final chapter seeks to ‘stand back’ a little, and to consider how software design prac- tices might evolve in the future. We begin by considering how far the changes in the form of software that have occurred through the 1990s and 2000s, and particularly the emergence of distributed networked systems, require corresponding changes to our thinking about design. Our main conclusion is that this is probably more a matter of embracing an extended interpretation of system structures than one that requires radical changes. We then review the ways in which design knowledge is currently codified for use and transfer, and consider how much further present forms might be able to evolve, and where particular limitations are becoming evident. Finally, we consider the longer-term needs of the future, and try to identify how we might improve our ability to capture, share and disseminate software design knowledge. , 2001). For the moment though, the designer still has to con- , 2001). For the moment though, the et al. to provide instantly reconfigurable responses to a user’s needs (Brereton to provide instantly reconfigurable responses services , 1999; Bennett Indeed, some of us would argue that the logical longer-term outcome will be to Indeed, some of us would argue that The economic consequences of these developments are also far-reaching and con- The economic consequences of these is no longer simply code written in a The point about form is important. Software The same can probably be argued for the developments of the 1990s, as the avail- be argued for the developments The same can probably fast, exhibit constant change, and involve new (often inexperienced) participants, then fast, exhibit constant change, and involve new (often inexperienced) participants, any thinking about design practices is almost bound to lag well behind. If we stand back a little, examine the frenetic announcements of yet more (new) soft- If we stand back a little, examine the frenetic announcements of yet more design think- ware technologies, and ask ourselves what impact these have had upon ing, then the answer is likely to be relatively little. This is not wholly unreasonable, nature a pro- given that developing ideas about designing in almost any form is by its thick and cess of accumulating and distilling experience. When the experiences come ferent et al. a variety of software elements in order to meet tend with the need to bring together user demand. 19.1.1 thinking The effect upon <a href="/tags/Design_language/" rel="tag">design language</a> such as C, Ada or (even) Java. It is increasingly likely to involve a complex language such as C, Ada or (even) Java. scripting languages such as perl, PHP and mix of forms, including HTML, XML, quite powerful and complex infrastructures such Javascript, as well as building upon as .NET, Enterprise JavaBeans and Websphere. and ownership, and that with continually divorce the use of software from possession designer will become more one of combining dif- increasing bandwidth, the task of the tinue to evolve rapidly. In particular, they have created enormous pressure upon devel- tinue to evolve rapidly. In particular, ‘software’ (in whatever form). Indeed, speed of opers to provide rapid delivery of new important factor, requiring developers to adapt production has been an increasingly improving delivery time. their practices and seek new ways of ability of cheap and powerful computers, of growing communications bandwidth, the powerful computers, of growing communications ability of cheap and have caused yet another and scripting forms coupled to HTML structures of the web, Many of them untutored, to arrive on the computing prairies! wave of new settlers markets, new opportunities they have nevertheless created new like their predecessors, techniques. (Oh, and some awful websites too, and the demand for new tools and at the doors of the inexperienced.) although not all of these can be laid practices. It is difficult to refute this view in its entirety since, at that time, the widen- to refute this view in its entirety practices. It is difficult reinvention of the wheel and to community did lead to much ing of the programming narrowly technical viewpoint, systems. However, from a less some poorly structured of the increasingly greater eco- benefits, not least because there were also longer-term the growing dependence of and impact of software, coupled with nomic importance systems. the support provided by their software many businesses upon 19.1 now? software is What of changed the face revolution available microprocessor cheap and widely When the users to begin writing causing many new and early 1980s, in the late 1970s computing the being to set back the effect as those who regarded programs, there were their own development ideas and well-structured engineering acceptance of software growing </p><p>Whither software design? 442 SDC19 9/18/07 11:32 AM Page 442 AM Page 11:32 9/18/07 SDC19 What is software now? 443 it is but , but the evidence, upon the form of a ++ rather than evolutionary constraints revolutionary it does exist. The question for this last chapter is therefore how this question for this last chapter is therefore it does exist. The but So for many of these developments, the task of design can be addressed by using So for many of these developments, the task of design can be addressed That said, one of the observations about component-based design that we made in That said, one of the observations about The further questions that this then raises are how well existing design knowledge The further questions that this then raises The previous 18 chapters have reviewed our knowledge and understanding of how have reviewed our knowledge The previous 18 chapters When reading the design literature of the 1990s, one noticeable feature is the feature is one noticeable 1990s, of the literature the design reading When should be one cases, a good design matter. In many this should not In many ways can be employed with the new and emerging forms, how it can be most effectively can be employed with the new and can be made accessible to others? The rest of this represented and codified, and how it while the others are discussed further in the section briefly addresses the first of these, following two sections. knowledge can be most effectively employed and interpreted in the ever widening con- most effectively employed and interpreted knowledge can be text of ‘software’. to design software-based systems. That knowledge may be incomplete, it may some- systems. That knowledge may to design software-based difficult to express it in a clear interpret or codify, it may be equally times be difficult to manner, unsystematic as it is, does suggest that this is what is often assumed and, of course, the is, does suggest that this is what is often unsystematic as it for the designer, espe- does create some constraints eventual form of implementation concerned. such as optimization and reuse are cially where issues existing mechanisms such as object-oriented design methods and design patterns, as existing mechanisms such as object-oriented design methods and design this can be seen as part of the transition from monolithic implementation forms to this can be seen as part of the transition from monolithic implementation distributed ones. The vertical layer may be constrained in scope and form, practices do nonetheless a part of the design task to address this, although most design (com- not really achieve this particularly well. Overall though, this forms an additional is radically plicating) element to the design task, rather than adding something that new or different. cerned with visual layout and syntactic form), while mechanisms such as CORBA and cerned with visual layout and syntactic in nature. Their influence upon the design process .NET are essentially object-oriented additional may well be more in the nature of placing that requires new procedures. design solution than in introducing anything were both ‘horizontal’ and ‘vertical’ strands of Chapter 17 was to the effect that there for CBSE solutions. As Figure 19.1 illustrates, <a href="/tags/Design_choice/" rel="tag">design choice</a> that needed to be made As demonstrated in Chapter 16, constructing software around a new and radically dif- As demonstrated in Chapter 16, constructing require ferent architectural style is apt to to cope with the new features that the architec- changes to the design process in order of the developments of the 1990s and 2000s can tural style introduces. However, few changes in terms of architectural style. Forms really be considered to have led to major that are primarily descriptive (respectively con- such as HTML and XML have roles 19.1.2 ideas design Applying that can be realized using a variety of technologies. Using the UML (say) to model a solu- using a variety of technologies. Using that can be realized Java or C an eventual implementation using tion need not assume degree of emphasis upon ‘conventional’ programming as the means for realizing a for realizing the means as programming ‘conventional’ upon of emphasis degree this period, in part- emerging during ‘agile methods’ were a system. Although design as of the remaining (Boehm, 2002), much faster delivery to the demand for response implementation expectation of eventual been geared to an has largely design thinking if not explicitly. at least implicitly paradigms, traditional programming via more SDC19 9/18/07 11:32 AM Page 443 AM Page 11:32 9/18/07 SDC19 of a sys- form of these forms when being used other that might be used to create it. processes interpretation Evolution of vertical architectural elements. Evolution of vertical In this section we begin by briefly considering knowledge about the What is less clear perhaps is how extensively such systems are developed by using What is less clear perhaps is how extensively to have the means of coping with designing Overall, therefore, we would appear For a typical web-based client–server system, neither the server structure nor the For a typical web-based client–server The same can be considered to apply to descriptive forms too. We have no short- to apply to descriptive forms The same can be considered Figure 19.1 Since design knowledge takes many forms and can encompass many ‘levels’ of abstrac- Since design knowledge takes many forms and can encompass many ‘levels’ the software tion, the problems of codifying such knowledge are not confined to character- domain! However, as we have recognized in the early chapters, the unique istics of software do present the designer with additional challenges and opportunities. tem, and then knowledge about the ture and codify design knowledge, and ask whether the existing forms and practices ture and codify design knowledge, and by what means this might occur. are likely to evolve further and, if so, 19.2 knowledge design Codifying any form of systematic design practice, whether methods or patterns. Indeed, the pro- any form of systematic design practice, probably very informal (and for smaller systems cesses of design for such systems are at least, this may well be quite adequate). in the form of software, even if this may require systems around most of the variations section we briefly review how well we can cap- some adaptation at times. In the next tem need to be modelled is more the key issue than the choice of forms to use. tem need to be modelled is more the the application designer (although they may con- browser form are of major interest to it is ‘pages, hyperlinks and dynamic content on strain the options of course). Instead modelled (Conallen, 1999). Much of this can be the client and server’ that need to be adapting existing forms. quite adequately achieved by using and experience fairly rapidly about structures that work (it is certainly a quicker process to about structures that work (it experience fairly rapidly a new design method). once recognized, than to develop write a new pattern, in the basic four viewpoints can describe the properties embodied age of notations that What may be needed, how- data modelling and construction). (function, behaviour, ever, is some adaptation of the question of which elements of a web-based sys- than with procedural code. Indeed, the well as the agile methods. Design patterns in particular do offer the ability to distil Design patterns in particular well as the agile methods.</p><p>Whither software design? 444 SDC19 9/18/07 11:32 AM Page 444 AM Page 11:32 9/18/07 SDC19 Codifying design knowledge 445 and design coupling and the , to this list, even though one can to this list, even though information hiding information architectural pattern is one that desperately needs further study is one that desperately needs further notations separation of concerns as a framework for design activities; to provide procedural practices that provide a structure for the to provide abstract templates describing ‘part-solutions’ that can be are still widely employed in the design of software, despite all the subsequent despite all the the design of software, employed in are still widely have provided useful means of codifying experience of implementation struc- means of codifying experience of have provided useful Much is still needed here, especially to support the emerging area of CBSE, for Much is still needed here, especially Indeed, the whole area of At a more detailed level, the concepts of the At a more detailed Maybe part of their durability as ideas lies in their very independence from the durability as ideas lies in their very Maybe part of their architectural style design methods design process itself; design patterns reused. n n n 19.2.2 about processes knowledge Codifying form of knowledge (illustrated in Figure 19.2) The three key elements in codifying this are: opment. We might also add opment. We might 19.2.1 form about knowledge Codifying that a topic is the way design as aspects of software one of the most curious Probably first since they were changed so little about quality have underpinning ideas the main of The concepts in the early 1970s. put forward cohesion involved in its devel- in the processes software itself, and in the form of developments and, especially, systematic investigation of its cognitive aspects. Diagrammatical forms and, especially, systematic investigation of experience and compromise, but the useful- such as the UML are based upon a mix evaluated empirically, nor do many of them have ness of particular forms has not been sort. As this book shows, there is an extensive solid theoretical underpinnings of any use, yet no over-arching theoretical model that range of notations (and variants) in that might help us to understand when describes them, nor empirical investigations and how to use particular forms. munity of experienced developers who are able to pool and share their experiences). munity of experienced developers who and little in the way of well-documented experi- which there are few usable notations, Perhaps the major underpinning need is to find ence of a type that might be reused. styles in a suitable abstract manner. better ways of representing architectural pattern that make it possible to adapt which also possess characteristics tures that work, and to widen the use of patterns to needed. There seems to be scope and change them as probably need to become more technologies, although the latter cope with emerging occur on any useful scale (not least because the stable and established before this can one that depends upon the emergence of a com- pattern development process is really argue that this has some overlap with coupling and cohesion, since both are concerned some overlap with coupling and cohesion, argue that this has is to be composed from separate modules. with how a system All four are relatively method or manner of implementation. specific forms of any of quantification. and all still elude any simple means abstract concepts, SDC19 9/18/07 11:32 AM Page 445 AM Page 11:32 9/18/07 SDC19 problems, and the characteristics of software (including its invisibility Elements of the software design process. Elements of the software wicked Forecasting future developments in technology is always a risky business. History Forecasting future developments in technology is always a risky business. So in terms of further potential, the design pattern probably offers much greater So in terms of further potential, the Design methods, in contrast, may well be a declining element of the designer’s Design methods, in contrast, may well reveals many famous examples of failure to anticipate new developments, technolo- reveals many famous examples of failure to anticipate new developments, that we use gical steps, or uses. Certainly our present knowledge, and the mechanisms we do to pass it on to others, could well benefit from new forms and ideas. However, are very need to avoid expectations of ‘silver bullets’ (Brooks, 1987). Design problems much and complexity) further compound the problems facing the software designer. scope for further development and evolution, including extending its scope to address scope for further development and evolution, architectural style. However, as we have already forms other than the object-oriented procedures for their use. Certainly patterns do observed, the need here is to improve needs of agile methods, which themselves place seem to offer the best way to meet the an emphasis upon reuse. complex architectural styles such as object-orientation. This is not to suggest that complex architectural styles such as to the designer, but it may well be that their design methods no longer have a value being used for well-defined parts of the overall role now needs to evolve, possibly to needs of agile methods, we might yet see the design task. Indeed, to meet the ‘strategy’ are intended to assist with designing particular, emergence of ‘micro-methods’, that JSP already performs such a role for the larger specialist elements of a system. (Indeed, and more elaborate SSADM method.) tectural style forms one of the most important contributions in the evolution of think- tectural style forms one of the most important to have a growing influence upon this. ing about software design, and continues embody assumptions about a waterfall life- repertoire. Many methods quite strongly forms are ill-suited to accommodating reuse; cycle of development; their procedural procedural approach is barely able to cope with and, as we saw in Chapter 16, the Strictly speaking, the notion of architectural style does not directly influence the struc- notion of architectural style does Strictly speaking, the of style, and the options that However, indirectly, the choice ture of a design process. that it has an important influence upon how a such a choice then provides, mean argue that the development of ideas about archi- design is developed. Indeed, we could Figure 19.2</p><p>Whither software design? 446 SDC19 9/18/07 11:32 AM Page 446 AM Page 11:32 9/18/07 SDC19 Improving knowledge transfer 447 , 1993). Certainly, , 1995). et al. et al. (1998). CBR has long been used in the et al. edge transfer edge In terms of techniques rather than tools, one possible route is to seek ideas from In terms of techniques rather than tools, We have already discussed one of the possible ways forward at the end of the pre- We have already discussed one of the Another class of tool that may offer some real help with developing design solu- that may offer some real help with Another class of tool CASE tools are also constrained by the notations that they use. Even if we consider constrained by the notations that they CASE tools are also Reasoning (CBR), as discussed in Grupe that software artificial intelligence domain, and is part predicated upon the premise needs to be objects and components embody reusable experience, since a CBR system while this built around a variety of previously successful design solutions. However, to the idea of may prove a valuable concept for future use (and is not wholly unrelated and well- a design pattern), its development needs a much richer basis of established documented design examples than is currently available. nized there, while tools are limited in what they can do because of the strongly creative nized there, while tools are limited in well be scope for them to do more. However, aspects of the design process, there may understanding of notations as well as of how such developments may need a better software design models can be described. the more promising of these is that of Case-Based other branches of computing. One of knowledge about how to design software and, indeed, all of the chapters deal with knowledge about how to design software as befits an academic text, the focus has been some aspect of this task. However, reasonably widespread use. In this final section largely on those practices that are in techniques might have the potential to provide though, we briefly consider what other new ways of transferring knowledge. use of tools to assist the process. As we recog- ceding section, namely making fuller provide really useful support for designers. 19.3 knowl Improving to throughout this book is the idea of transferring A key theme that we keep returning to record that in a systematic and usable manner (Reeves systematic and usable manner (Reeves to record that in a CBSE developments. A broker that we mentioned when discussing tions is the ‘broker’ and has the potential patterns, frameworks and components can help with locating forms of interface. Indeed, if a catalogue’ if provided with suitable to form a ‘design flexible form of CASE tool of the ‘tradi- broker could be combined with a suitable the scope of tools in terms of being able to tional’ type, then this might greatly extend ative elements of its development. Even where such a tool contains analytical elements development. Even where such a tool ative elements of its these can only address syn- for consistency and completeness, to help check a design against the requirements of the key need is for assessing a design tactic aspects, while is intended to address. the problem that it design model, it is quite difficult ‘projections’ from a single abstract our diagrams to be 19.2.3 tools design Using of the ‘silver bullets’ formed one Software Engineering) (Computer Assisted CASE tools was hoped for. There the impact that never quite achieved but somehow of the 1980s, and relative rigidity one must be their for this, but a major many reasons are probably curves (Budgen steep learning coupled with lack of flexibility, cre- use for the but of questionable the form of a design, useful for recording tools are SDC19 9/18/07 11:32 AM Page 447 AM Page 11:32 9/18/07 SDC19 Early across a range of domains have shown, across a range of concept as having the potential to improve their effectiveness. concept as having diffusion of <a href="/tags/Innovation/" rel="tag">innovation</a> The group who adopt a new process or product just before the The group who adopt a new process This group are often opinion leaders within their particular com- This group are often opinion leaders The members of this group tend to be cautious, and indeed their The members of this group tend to (Tomayko, 1996). This has been used successfully on a limited scale, on a limited used successfully has been This 1996). (Tomayko, These are people who actively seek information about new ideas; have These are people who actively seek information This group tend to be suspicious of innovation; the members are often This group tend to be suspicious of broker . Their role in forming opinions and influencing others is key to wider accept- Perhaps one group that really stands out as key from the above list is the Perhaps one group that really stands out as key from the above list is A number of researchers have begun to examine the factors that influence such A number of researchers have begun According to Rogers, successful acceptance of change (diffusion of ideas) is com- successful acceptance of change According to Rogers, All of these have some potential to improve our understanding of how software potential to improve our understanding All of these have some Another idea, and one that has been mentioned in an earlier chapter, is that of is that chapter, in an earlier been mentioned that has and one idea, Another existing tech- the question of how there is further from technology, Moving still Laggards. to accept a change, possibly also because of isolated, and hence hesitate longest limited resources. ideas to others. Early Majority. approach to acceptance of change. average, demonstrating a ‘deliberate’ Late Majority. pressure to keep up as with anything acceptance may be as much due to economic else. Innovators. cope with a high degree of uncertainty about a wide network of contacts; and can technology. the likely success of adopting a given Early Adopters. to deliver a subjective evaluation of new munity and, as part of this, are expected design studio design ance (although not a guarantee of this, the processes are much too complicated for so ance (although not a guarantee of this, the processes are much too complicated simplistic a model). Pfleeger, 1999; Pfleeger and Menezes, 2000). While we do not have scope to explore Pfleeger, 1999; Pfleeger and Menezes, 2000). While we do not have scope as it reflects a their findings here, the very existence of these studies is itself significant, but involves recognition that adoption of technology is not merely a technical matter, a social dimension too. Adopters 5. community’ (Fichman and Kemerer, 1999; processes of diffusion within the ‘software 3. 4. 1. 2. Indeed, as studies of Indeed, as studies excellence (Rogers, 1995). is not merely a matter of technical successful acceptance for success. is by no means a pre-requisite Indeed, technical excellence a relatively long timescale, and process, possibly spread over monly seen as a social by the following five groups. characterized by its (sequential) acceptance identified the as to whether procedures that we have raised the question Similarly for methods, might be a useful addition. address part-solutions they do need to become However, to realize that potential, might be designed. project managers and others. community, as well as by accepted by the technical the Its main limitations this approach. to extend and develop is probably scope and there and its rather labour- designers, a supply of experienced the need for are probably form. intensive of patterns, we have In the case widely and effectively. be deployed more niques can</p><p>Whither software design? 448 SDC19 9/18/07 11:32 AM Page 448 AM Page 11:32 9/18/07 SDC19 Further reading 449 4th edn. Simon and Schuster (1), 40–47 17 , Diffusion of <a href="/tags/Innovation/" rel="tag">Innovations</a>. IEEE Software So, in terms of the question that is implicit in the heading of this section, we need we this section, heading of in the is implicit that the question terms of So, in book, software first edition of this at the end of the as we observed However, ture. Further reading Summary Sharp H., Robinson H. and Woodman M. (2000). Software engineering: community and cul- Sharp H., Robinson H. and Woodman engineers report on studies of the software engin- An interesting paper in which three software drawn from ethnographical sociology and dis- eering community, conducted using techniques of specific specialist communities are examined, with cursive psychology. Some characteristics results that some may find surprising. Rogers E.M. (1995) processes by which innovative ideas (usually tech- This book offers an insight into the social fail to become established. As well as defining and nical, but not wholly) either succeed or briefly in the last section, it provides a range of case analysing the categories of adopter described studies drawn from a variety of domains. about the processes used to develop them. This chapter has examined some possible vehicles used to develop them. This chapter has about the processes which their acceptance is a social and has also looked at the extent to for improving these, process. the search for ways of improving our techniques will continue to be a vital part of it. of improving our techniques will continue the search for ways about products, and also remains elusive, in terms of knowledge Software design knowledge to recognize that improving knowledge transfer is more than just a matter of devising matter of just a more than is transfer knowledge improving that to recognize will it works, that what works and when evidence about Indeed, providing new forms. if as important as, is in many ways as the early adopters, to such groups be acceptable technologies. and refining important than, polishing not more and of design activity, exciting forms most creative and remain one of the design will SDC19 9/18/07 11:32 AM Page 449 AM Page 11:32 9/18/07 SDC19 SDC19 9/18/07 11:32 AM Page 450 SDD01 9/18/07 11:33 AM Page 451</p><p>451</p><p>Bibliography</p><p>Abbott R.J. (1983). Program design by informal English descriptions. Comm. ACM, 26(11), 882–894 Adelson B. and Soloway E. (1985). The role of domain experience in software design. IEEE Trans. Software Eng., SE-11(11), 1351–60 Akin O. (1990). Necessary conditions for design expertise and creativity. Design Studies, 11(2), 107–13 Alexander C., Ishikawa S., Silverstein M., Jacobson M., Fiksdahl-King I. and Angel S. (1977). A <a href="/tags/Pattern_language/" rel="tag">Pattern Language</a>. Oxford University Press Arlow J. and Neustadt I. (2002). UML and the Unified Process: Practical Object-Oriented Analysis and Design. Addison-Wesley Avison D.E. and Fitzgerald G. (1995). Information Systems Development: Methodologies, Techniques and Tools, 2nd edn. McGraw-Hill Baker F.T. (1972). Chief programmer team management of production programming. IBM Systems J., 11(1), 56–73 Barrow P.D.M. and Mayhew P.J. (2000). Investigating principles of stakeholder evaluation in a modern IS development approach. Journal of Systems & Software, 52(2/3), 95–103 Batini C., Ceri S. and Navathe S.B. (1992). Conceptual Database Design. Benjamin/Cummings Bennett K.H., Munro M., Gold N.E., Layzell P.J., Budgen D. and Brereton O.P. (2001). An archi- tectural model for service-based software with ultra rapid evolution. In Proceedings of ICSM’01, Florence, pp. 292–300. Los Alamitos, California: IEEE Computer Society Press Bieman J.M. and Kang B-K. (1998). Measuring design-level cohesion. IEEE Trans. Software Eng., 24(2), 111–24 Birrell N.D. and Ould M.A. (1985). A Practical Handbook for Software Development. Cambridge University Press Blackburn J.D., Scudder G.D. and Van Wassenhove L.N. (1996). Improving speed and product- ivity of software development: A global survey of software developers. IEEE Trans. Software Eng., 22(12), 875–84 Boehm B.W. (1981). Software Engineering Economics. Prentice-Hall Boehm B.W. (1988). A spiral model of software development and enhancement. IEEE Computer, 21(5), 61–72 Boehm B.W. (2002). Get ready for Agile Methods, with Care. IEEE Computer, 35(1), 64–9 Booch G.R. (1983). Software Engineering with Ada, 1st edn. Benjamin/Cummings Booch G.R. (1986). Object-oriented development. IEEE Trans. Software Eng., SE-12(2), 211–21 Booch G.R. (1987). Software Engineering with Ada, 2nd edn. Benjamin/Cummings Booch G.R. (1991). Object-Oriented Design with Applications. Benjamin/Cummings , , (5), (3), , Los IEEE IEEE 15 16 , May , , Proceed- (5), 133–6 IEEE Com- IBM Systems 16 AntiPatterns: , Pattern-Oriented , 2nd edn. Benjamin/ , 2nd (Loucopoulos P., ed.), Design Studies IEEE Software J. Systems & Software Prentice-Hall , University of Reading, UK, IEEE Software Advanced Information Systems (12), 78–84 42 . Wiley , Information & Software Technology Information & Software . Addison-Wesley . Wiley Comm. ACM (4), 235–9 1 , , Pittsburgh, PA, pp. 112–21, ed. E. Nahouraii. Los Alamitos, , Pittsburgh, PA, pp. 112–21, ed. E. Nahouraii. Advanced Information Systems Engineering Proceedings of 5th International Symposium on Assessment of Soft- Proceedings of 5th International Symposium The Mythical Man-Month (12), 49–55 Large-Scale Component-Based Development. 31 Object-Oriented Analysis and Design with Applications and Design Analysis Object-Oriented Proceedings 21st International Conference on Software Engineering Conference on Software 21st International Proceedings , (11), 54–62 (4), 10–19 (Loucopoulos P., ed.), Lecture Notes in Computer Science No. 593, 524–45.(Loucopoulos P., ed.), Lecture Notes in Knowledge-Based Systems 33 20 , , (4), 56–63 28 (3), 224–35 , 23 (7), 357–65 (3), 245–73 , Software Architecture: A System of Patterns design representations. In Lecture Notes in Computer Science No. 593, 378–93. Springer-Verlag assessment. ings of 1993 Software Engineering Environments Conference pp. 156–65. Society Press Los Alamitos, California: IEEE Computer Refactoring Software, Architectures, and Projects in Crisis Refactoring Software, Architectures, and 293–325 Springer-Verlag based development. In ware Tools and Technologies California: IEEE Computer Society Press 37–46 Computer Factors in Computer Systems Conference Proceedings of the ACM SIGCHI Human 1988, 1–11 Engineering Stannett C. (1999). The future of software. Stannett C. (1999). The Computer software quality in object-oriented systems. design measures and 51 31 J. IEEE Computer Cummings puter In architecture. pp. 555–63.Angeles, CA, Press Computer Society California: IEEE Los Alamitos, Buschmann F., Meunier R., Rohnert H., Sommerlad P. and Stal M. (1996). Budgen D. and Marashi M.M. (1988). Knowledge-based techniques applied to software design Budgen D. and Marashi M.M. (1988). Knowledge-based techniques applied to software In Budgen D., Marashi M. and Reeves A.C. (1993). CASE tools: masters or servants? Brown A.W. (2000) H.W. III and Mowbray T.J. (1998). Brown W.J., Malveau R.C., McCormick software design methods. Budgen D. (1995). ‘Design models’ from life belt or leg iron? Budgen D. (1999). Software design methods: the design process: transformations from abstract Budgen D. and Friel G. (1992). Augmenting Brown A.W. and Short K. (1997). On components and objects: the foundations of component- Brown A.W. and Short K. (1997). On components The current state of CBSE. Brown A.W. and Wallnau K.C. (1998). Brooks F.P. Jr (1987). No silver bullet: essence and accidents of software engineering. Brooks F.P. Jr (1987). No silver bullet: illusion – interactive graphics serving science. In Brooks F.P. Jr (1988). Grasping reality through generic framework. In Brough M. (1992). Methods for CASE: A Brereton P. and Budgen D. (2000). Component-based systems: a classification of issues. D. (2000). Component-based systems: Brereton P. and Budgen the relationships between Daly J.W., and Porter D.V. (2000). Exploring Briand L.C., Wüst J., Brooks F.P. Jr (1975). Bradley I.M. (1989). Notes on algebraic specifications. Bradley I.M. (1989). design challenge. Thomas J.C. (1984). Ease of use: A system Branscomb L.W. and the next maintenance mountain? D. and Hamilton G. (1998). Hypertext: Brereton P., Budgen Macaulay L., Griffiths D. and D., Bennett K.H., Munro M., Layzell P.J., Brereton P., Budgen Booch G.R. (1994) G.R. (1994) Booch methods. of formal (1995). Ten commandments and Hinchey M.G. Bowen J.P. Its extracted software Linux as a case study: N.V. (1999). Holt R.C. and Brewster Bowman I.T.,</p><p>Bibliography 452 SDD01 9/18/07 11:33 AM Page 452 AM Page 11:33 9/18/07 SDD01 Bibliography 453 , , . (1), (6), (10), , 2nd IEEE IEEE 40 14 , 42 , , Software , 2nd edn. J. of Systems ACM Trans. (2), 222–40. (Stapleton J., Comm. ACM SE-12 . Prentice-Hall , Comm. ACM Comm. ACM IEEE Software (5), 494–509 (10), 1453–60 (6), 8 . Yourdon Inc. 9 28 , , SE-14 , . Wiley . Springer Practitioner Series Information & Software Technology Information & Software (1), 9–23 . Prentice-Hall 32 Software Engineering Metrics and Models (Hoc J.-M., Green T.R.G., Samurçay R. and (Hoc J.-M., Green T.R.G., Samurçay R. , IEEE Trans. Software Eng. IEEE Trans. Engineering Design (R.H. Thayer and A.D. McGettrick, eds), IEEE Com- eds), IEEE A.D. McGettrick, Thayer and (R.H. Issue 3.0. European Space Agency Software Metrics: A Rigorous & Practical Approach Comm. ACM IEEE Trans. Software Eng. Prentice-Hall IEEE Trans. Software Eng. (11), 1268–87 Dynamic Systems Development Method (Version 3) (6), 476–93 31 20 , , JSP and JSD: The Jackson Approach to Software Development The Jackson Approach JSP and JSD: (1), 9–37 Psychology of Programming Developments in Design Methodology Structured Analysis and System Specification 1 , Software Design – Cognitive Aspects Information System Specification and Design Road Map Information System Specification and Design (3), 201–12 The Essence of Z. 61 (2), 83–6 , HOOD Reference Manual 17 , Comm. ACM (10), 32–8 (6), 373–83.Cameron (1988a). Reprinted in edn. PWS Publishing Co ed.). Tesseract Publishing size for Object-Oriented software. 40 53–61 development life-cycle models. (1989). Computing as a discipline. tional behaviour. In Gilmore D.J., eds), 253–70. Academic Press systems. & Software Trans. Software Eng. The Fusion Method Object-Oriented Development: 63–70 30 Software Database Systems Engineering: A European Perspective European A Engineering: Press, 222–5 puter Society in Cameron (1988a). Reprinted Society Press IEEE Computer Benjamin/Cummings 36–42 DSDM Consortium (1999). optimal class El Emam K., Benlarbi S., Goel N., Melo W., Lounis H. and Rai S.N. (2002). The Denning P.J., Comer D.E., Gries D., Mulder M.C., Tucker A., Turner A.J. and Young P.R. Denning P.J., Comer D.E., Gries D., Mulder Détienne F. (2002). Buxton J. and McDermid J. (1992). HOOD (Hierarchical Object Oriented Design). In In Oriented Design). Object HOOD (Hierarchical J. (1992). J. and McDermid Buxton of JSD. J.R. (1986). An overview Cameron (1988a). Cameron J.R. Fenton N.E. and Pfleeger S.L. (1997). ESA (1989). Fayad M.E. and Schmidt D.E. (1997). Object-oriented application frameworks. Cameron J.R. (1988b). The modelling phase of JSD. Cameron J.R. (1988b). Carney D. and Long F. (2000). What do you mean by COTS? Finally a useful answer. F. (2000). What do you mean by COTS? Carney D. and Long Chen P.P. (1976). The entity-relationship model: toward a unified view of data. entity-relationship model: toward a Chen P.P. (1976). The Davis A.M., Bersoff E.H. and Comer E.R. (1988). A strategy for comparing alternative software Davis A.M., Bersoff E.H. and Comer E.R. De Marco T. (1978). Currie E. (1999). of programming in the large: team and organiza- Curtis B. and Walz D. (1990). The psychology A field study of the software design process for large Curtis B., Krasner H. and Iscoe N. (1988). How Microsoft builds software. Cusumano M.A. and Selby R.W. (1997). Crnkovic I. and Larsson M. (2002). Challenges of component-based development. Crnkovic I. and Larsson M. (2002). Challenges Coleman D., Arnold P., Bodoff S., Dollin C., Gilchrist H., Hayes F. and Jeremes P. (1994). P., Bodoff S., Dollin C., Gilchrist H., Coleman D., Arnold with UML. web application architectures Conallen J. (1999). Modelling Connor D. (1985). (1986). Conte S.D., Dunsmore H.E. and Shen V.Y. Chidamber S.R. and Kemerer C.F. (1994). A metrics suite for object-oriented design. Kemerer C.F. (1994). A metrics suite Chidamber S.R. and Cooke P. (1984). Electronic design warning. Cooke P. (1984). Electronic design warning. as architectural literature. Coplien J.O. (1997). Idioms and patterns Cross N. (ed) (1984). SDD01 9/18/07 11:33 AM Page 453 AM Page 11:33 9/18/07 SDD01 , , AI 40 (6), (3), , IEEE 30 38 , , (Sutcliffe (Budde R., Information (7), 657–63 . Prentice-Hall 29 , , 131–74 Int. J. of Software (4), 17–19 . Addison-Wesley 7 Comm. ACM , 42 , 11th International Con- (8), 19–21 45 , Comm. ACM People and Computers V ACM Software Engineering Notes (10), 74–86 (Verrijn-Stuart A.A., Olle T.W. and (Verrijn-Stuart A.A., Comm. ACM (3), 255–75 (8), 617–30 37 Design Patterns – Elements of Reusable , Approaches to Prototyping 10 20 , , Information & Software Technology (2), 91–105 Comm. ACM Information & Software Technology 39 , Comm. ACM Software Specification Techniques (10), 22–39 (10), J. Visual Languages and Computing 25 , pp. 290–301. Los Alamitos, California: IEEE Computer , (4), 269–74 (10), 47–59 21 (1), 31–57 , Structured Systems Analysis: Tools and Techniques 30 2 , . Addison-Wesley ., IEEE Trans. on Softw. Eng. IEEE Trans. on Softw. Information Systems Research Information (6), 17–26 12 IEEE Computer IEEE , (4), 26–36 (5), 7–10 11 7 IEEE Computer , , Information & Software Technology (2), 35–9 reasoning to the software development process. 493–9 ference on Software Engineering Society A. and Macaulay L., eds) 443–60. Cambridge University Press ‘cognitive dimensions’ framework. 131–7 IEEE Trans. on Softw. Eng. Software Magazine points. Object-Oriented Software IEEE Software 75–87 software components. specifications in software development. framework for integrating multiple perspectives in system development. multiple perspectives in system development. framework for integrating Eng Eng. and Knowledge Springer-Verlag L. and Zullighoven H., eds) 1–18. Kuhlenkamp K., Mathiassen Improving the Practice Systems Design Methodologies: Sol H.G., eds), 19–54. North-Holland methodologies. methodologies. adopters. gaps. of assimilation 7 Green T.R.G. (1989). Cognitive dimensions of notations. In a Green T.R.G. and Petre M. (1996). Usability analysis of visual programming environments: of case-based Grupe F.H., Urwiler R., Ramarapu N.K. and Owrang M. (1998). The application Gladden G.R. (1982). Stop the life-cycle, I want to get off. Gladden G.R. (1982). Stop the life-cycle, findings. Glass R.L. (1999). Inspections – some surprising wars. Glass R.L. (2002). The proof of correctness of real-time systems. Gomaa H. (1986). Software development real-time system design. In Gomaa H. (1989). Structuring criteria for Gehani N. and McGettrick A.D. (1986). Gehani N. and McGettrick A.D. (1986). methods: developing virtuoso software. Gerhart S. (1990). Applications of formal a knowledge representation scheme for design. Gero J.S. (1990). Design prototypes: Gibbins P.F. (1988). What are formal methods? Gamma E., Helm R., Johnson R. and Vlissides J. (1995). Gamma E., Helm R., Johnson R. and Vlissides Gane C. and Sarsen T. (1979). (1995). Architectural mismatch: why reuse is so hard. Garlan D., Allen R. and Ockerbloom J. to the special issue on software architecture, Garlan D. and Perry D.E. (1995). Introduction Frakes W.B. and Fox C.J. (1995). Sixteen questions about software reuse. C.J. (1995). Sixteen questions about software Frakes W.B. and Fox methods for reusable T.P. (1994). An empirical study of representation Frakes W.B. and Pole for incorporating formal K. and Vaishnavi V.K. (1994). Strategies Fraser M.D., Kumar transformation and prototyping using multiple view- Friel G. and Budgen D. (1997). Design Floyd C. (1984). A systematic look at prototyping. In Floyd C. (1984). A methods. In comparative evaluation of system development Floyd C. (1986). A Fichman R.G. and Kemerer C.F. (1992). Object-oriented and conventional analysis and design analysis and and conventional Object-oriented C.F. (1992). Kemerer R.G. and Fichman early lessons from technology and reuse: C.F. (1997). Object and Kemerer Fichman R.G. an examination diffusion of innovation: (1999). The illusory and Kemerer C.F. Fichman R.G. a (1992). Viewpoints: L. and Goedicke M. B., Finkelstein A., Kramer J., Nuseibeh Finkelstein</p><p>Bibliography 454 SDD01 9/18/07 11:33 AM Page 454 AM Page 11:33 9/18/07 SDD01 Bibliography 455 , , , IEEE Comm. . Dorset Human– Software (10), 39–42 40 (8), 666–7 IEEE Computer IEEE Computer , 21 ACM Software Eng. IBM J. Research and IBM J. Research , Science of Computer Information & Software Object-Oriented Software (5), 11–19 7 , Comm. ACM , 561–73 Comm. ACM 14 (4), 403–13 , (5), 514–30 Information & Software Technology . Addison-Wesley 31 (5), 11–17 , Academic Press SE-16 . North-Holland 3 , , The Unified Software Development Process. IEEE Software , 263–8. ACM Press . Addison-Wesley Component-Based Software Engineering: Putting Component-Based Software Engineering: Prentice-Hall Comm. ACM Strategies for Real-Time System Specification (Components + Patterns). (1), 5–12 = 48 , , 305–44 5 Managing the Software Process IEEE Trans. Software Eng. IEEE Trans. Software Software Practice and Experience , Elements of Software Science Elements of Software Addison-Wesley Proceedings of CHI’88 Proceedings Principles of Program Design. System Development. (1), 15–27 (6), 330–38 , 231–74 J. Object-Oriented Programming (9), 467–77 4 8 28 , (1), 8–20 , , 37 , 25 , (5), 82–8 (9), 142–59 23 33 J. Systems & Software , , (1), 129–30 (3), 155–63 (7), 31–42 tudes. Engineering: A Use Case Driven Approach Addison-Wesley 30 parison of six methods for object-oriented analysis. parison of six methods for object-oriented 37 decomposition. ACM tive software metrics. House Engineering J. the Pieces Together. Computer for the development of com- STATEMATE: a working environment Trakhtenbrot M. (1990). plex reactive systems. 30 of structured systems development methods in the United Kingdom. development methods in the United Kingdom. of structured systems Technology Programming Computer Interaction Computer In tools are needed? Development Notes Humphrey W.S. (1991). Halstead M.H. (1977). Halstead M.H. (1977). use, limitations and customization J.B. and Edwards H.M. (1995). The Hardy C.J., Thompson systems. a visual formalism for complex Harel D. (1987). Statecharts: Guindon R. (1990). Designing the design process: exploiting opportunistic thoughts. thoughts. opportunistic exploiting design process: the Designing R. (1990). Guindon software design: What processes during Control of cognitive and Curtis B. (1988). Guindon R. complexity measures. Combined network and Preiser S. (1984). Hall N.R. formal methods. Seven myths of Hall A. (1990). Johnson R.A. and Hardgrave W.C. (1999). Object-oriented methods: current practices and atti- Johnson R.A. and Hardgrave W.C. (1999). Object-oriented methods: current practices Jacobson I., Christerson M., Jonsson P. and Overgaard G. (1992). Jacobson I., Booch G. and Rumbaugh J. (1999). Jézéquel J-M. and Meyer B. (1997). <a href="/tags/Design_by_contract/" rel="tag">Design by contract</a>: the lessons of Ariane. Johnson R.E. (1997). Frameworks Iivari J. (1995). Object-orientation as structural, functional and behavioural modelling: a com- Iivari J. (1995). Object-orientation as structural, Jackson M.A. (1975). Jackson M.A. (1983). Harel D. (1992). Biting the silver bullet: toward a brighter future for system development. the silver bullet: toward a brighter future Harel D. (1992). Biting Harel D. (1988). On visual formalisms. Harel D. (1988). On Harel D., Lachover H., Naamad A., Pnueli A., Politi M., Sherman R., Shtull-Trauring A. and H., Naamad A., Pnueli A., Politi M., Sherman Harel D., Lachover Hatley D.J. and Pirbhai I. (1988). are not (necessarily) executable. Hayes I.J. and Jones C.B. (1989). Specifications Harel D. and Gery E. (1997). Executable object modeling with Statecharts. Harel D. and Gery E. (1997). Executable Henderson-Sellers B. and Edwards J.M. (1990). The object-oriented systems life-cycle. Henderson-Sellers B. and Edwards J.M. of software systems’ structure using quantita- Henry S. and Kafura D. (1984). The evaluation Heineman G.T. and Councill W.T. (2001). Heineman G.T. and Councill W.T. (2001). (1991). Object-oriented development and functional Henderson-Sellers B. and Constantine L.L. Hoare C.A.R. (1978). Communicating sequential processes. Hoare C.A.R. (1978). Communicating sequential object-oriented design method. Huang R. (1998). Formalizing hierarchical SDD01 9/18/07 11:33 AM Page 455 AM Page 11:33 9/18/07 SDD01 . ACM IEEE Comm. (4), July, Annals of J. Systems 26 IEEE Trans. , , Austin, TX, (4), 308–20 (6), 42–50 12 , 2nd edn. Prentice- , 2nd edn. Springer- , . Addison-Wesley SE-2 , (9), 100–102 (3), 10–14 19 24 , , . (Revised edn 1981) Wiley- edn . (Revised IEEE Software Datamation Improving the Delivery of Government . Blackwell , 81–97 63 (2), 38–53 , 9 ACM Software Engineering Notes ACM Software Engineering , IEEE Trans. Software Eng. (1), 43–52 SADT: Structured Analysis and Design Technique SADT: Structured Analysis and Design (4), 269–76 ACM Software Eng. Notes 14 12 , , <a href="/tags/Software_maintenance/" rel="tag">Software Maintenance</a> Management Software Maintenance (1), 15–44 , 351–5 11 7 , , (2), 29–32 7 (2), 251–7 , Engineering Design: A Systematic Approach 1 <a href="/tags/View_model/" rel="tag">view model</a> of architecture. 1 view model + Psychological Review (10), 81–7 SE-12 IEEE Software The Practical Guide to Structured Systems Design The Practical Guide to Structured Systems , 42 Introducing SSADM Version 4 (2), 128–37 , (1), 27–30 (1), 50–8 Design Methods: Seeds of Human Futures of Human Seeds Methods: Design 5 , 105–24 14 ., SE-5 5 , , 259–65 , , 7 , . HMSO ACM Software Engineering Notes ACM Software Engineering (12), 1053–8 J. Systems & Software 15 Comm. ACM , & Software ACM Software Eng. Trans. Software Eng. IT Projects Hall Verlag Software Engineering Notes IEEE Software Software Eng. McGraw-Hill tions. tenance. 68–76 Proceedings of the 13th International Conference on Software Engineering 13th International Conference on Software Proceedings of the pp. 114–25. Society Los Alamitos, California: IEEE Computer odology. Annals of Software Engineering Interscience J Software Eng. the History of Computing Annals of processing information. patterns, and objects. Parnas D.L. and Weiss D.M. (1987). Active design reviews: principles and practices. Parnas D.L. and Weiss D.M. (1987). Active design reviews: principles and practices. Parnas D.L. (1972). On the criteria to be used in decomposing systems into modules. Parnas D.L. (1972). On the criteria to be used in decomposing systems into modules. Parnas D.L. (1979). Designing software for ease of extension and contraction. Parnas D.L. (1999). ACM fellow profile. fake it. Parnas D.L. and Clements P.C. (1986). A rational design process: how and why to PAC (1999). Committee of Public Accounts first report: PAC (1999). Committee of Public Accounts Page-Jones M. (1988). Pahl G. and Beitz W. (1996). Mellor S.J. and Johnson R. (1997). Why explore object methods, patterns, and architectures? Mellor S.J. and Johnson R. (1997). Why Marca D.A. and McGowan C.L. (1988). Marca D.A. and McGowan C.L. (1988). Framework integration: problems, causes, solu- Mattsson M., Bosch J. and Fayad M.E. (1999). McCabe T.J. (1976). A complexity measure. Life-cycle concept considered harmful. McCracken D.D. and Jackson M.A. (1982). Lientz B.P. and Swanson E.B. (1980). Lientz B.P. and Swanson models and software main- J., Letovsky S. and Soloway E. (1987). Mental Littman D.C., Pinto reuse antipatterns. Long J. (2001). Software Longworth G. (1992). considerations for software reuse. Lynex A. and Layzell P.J. (1998). Organisational Lee J. (1991). Extending the Potts and Bruns model for recording <a href="/tags/Design_rationale/" rel="tag">design rationale</a>. In the Potts and Bruns model for Lee J. (1991). Extending look at software design meth- V. and Turski W.M. (1984). Another Lehman M.M., Stenning and software evolution processes. Ramil J.F. (2002). Software evolution Lehman M.M. and Jones J.C. (1970). J.C. (1970). Jones of some design metrics. An evaluation and Linkman S.J. (1990). B., Pickard L.M. Kitchenham ed.), (Tomayko J.E., ideas. In ‘Anecdotes’ of software design (1990). The evolution Koepke D.J. (1994). The 4 Kruchten P.B. Myers G.J. (1973). Characteristics of composite design, Myers G.J. (1973). Characteristics of composite Miller G.A. (1957). The magical number 7 plus or minus 2: some limits on our capacity for Miller G.A. (1957). The magical number and Garlan D. (1997). Architectural styles, design Monroe R.T., Kompanek A., Melton R.</p><p>Bibliography 456 SDD01 9/18/07 11:33 AM Page 456 AM Page 11:33 9/18/07 SDD01 Bibliography 457 , , , (3), ACM IEEE IEEE 26 , Develop- Addison- Comm. ACM Proceedings of (5), 127 (9), 50–58 22 , 32 (4), 16–30 , 29 , 5th edn. McGraw-Hill Proceedings of the 11th , . Los Alamitos, California: (9), 51–7 IEEE Trans. on Softw. Eng. J. Systems & Software 17 , Singapore, pp. 418–27. Los , , 2nd edn. Prentice-Hall Datamation . Prentice-Hall IEEE Computer (6), 365–86 43 IEEE Computer , , Pittsburgh, PA, pp. 217–26. Los Alamitos, , Pittsburgh, PA, pp. The Unified Modeling Language Reference ACM Sigplan (9), 561–75 43 . Penguin Books , 4th edn. Simon and Schuster. , Proceedings of ICSE 9 <a href="/tags/Interaction_design/" rel="tag">Interaction Design</a>: beyond human–computer inter- Interaction Design: beyond human–computer (4), 141–55 10 , (Cross N., ed.), 135–44. Wiley , 111–24 Proceedings of 7th Asia-Pacific Software Engineering Conference Proceedings of 7th Asia-Pacific 47 , (4), 40–52 . (Also available in 17 , Software Engineering: A Practitioner’s Approach Hierarchical Object-Oriented Design Software Eng. J. Diffusion of Innovations Software Engineering Theory and Practice Software Engineering Isambard Kingdom Brunel (7), 66–71 Information & Software Technology Total Design: Integrated Methods for Successful Product Engineering. Total Design: Integrated Methods for Successful (1), 27–33 33 Proc. Wescon , 17 designers. , . Addison-Wesley Information & Software Technology Information & Software . Wiley real (10), 1059–67 (12), 1134–44 28 (1999). Developing educational software components. niques. In IEEE Computer Society Press.) Manual 211–20 ments in Design Methodology Computer specification. port 27 action Wesley International Conference on Software Engineering International Conference Society Press California: IEEE Computer Conference on Software Engineering the 10th International IEEE Computer Society Press Alamitos, California: to simpler solutions. in maintenance comparing design patterns An observational study. In An observational study. Singapore, pp. 196–203. California: IEEE Computer Society Press Los Alamitos, study. Software Eng. Notes Software & Software J. of Systems Software Royce W.W. (1970). Managing the development of large software systems: concepts and tech- Royce W.W. (1970). Managing the development of large software systems: concepts Rogers E.M. (1995). Repenning A., Phillips J., Jackiw N. and Suthers D. Roschelle J., DiGiano C., Koutlis M., Perry D.E. and Wolf A.L. (1992). Foundations for the study of software architecture, architecture, software study of for the Foundations (1992). Wolf A.L. D.E. and Perry ‘wicked’? Is software design and Tripp L.L. (1976). Peters L.J. in software engineering. technology transfer and improving (1999). Understanding Pfleeger S.L. Rumbaugh J., Jacobson I. and Booch G. (1999). Saiedian H. (1996). An invitation to formal methods. Rolt L.T.C. (1970). Pfleeger S.L. and Menezes W. (2000). Marketing technology to software practitioners. technology to software (2000). Marketing and Menezes W. Pfleeger S.L. Sanden B. (1985). Systems programming with JSP: example – a VDU controller. Sanden B. (1985). Systems programming with JSP: example – a VDU controller. Pfleeger S.L. (2001). Pfleeger S.L. (2001). documents during design: D. (2000). Accessing software component Pohthong A. and Budgen development: an empirical D. (2001). Reuse strategies in software Pohthong A. and Budgen Preece J., Roger Y. and Sharp H. (2002). Preece J., Roger Y. and Sharp H. (2002). Pressman R.S. (2000). Pugh S. (1991). A staged model for the software life cycle. Rajlich V.T. and Bennett K.H. (2000). Potts C. and Bruns G. (1988). Recording the reasons for design decisions. In G. (1988). Recording the reasons for design Potts C. and Bruns P. and Votta L.G. (2001). A controlled experiment Prechelt L., Unger B., Tichy W.F., Brössler Potts C. (1989). A generic model for representing design methods. In model for representing design methods. Potts C. (1989). A generic Rittel H.J. and Webber M.M. (1984). Planning problems are wicked problems. In Rittel H.J. and Webber M.M. (1984). Robinson P.J. (1992). Ratcliffe M. and Budgen D. (2001). The application of use case definitions in system design Ratcliffe M. and Budgen D. (2001). The (1995). A software design framework or how to sup- Reeves A.C., Marashi M. and Budgen D. Rentsch T. (1982). Object oriented programming. metric. Rising L.S. and Callis F.W. (1994). An information-hiding SDD01 9/18/07 11:33 AM Page 457 AM Page 11:33 9/18/07 SDD01 , , . , 13 , Addison- . Clarendon (Olsen G.M., Computer J. (1), 31–42 J. Systems and , Daytona, FL, 11 , IBM Systems J. (1), 3–16 (1), 114–17 21 Psychology of Program- 25 , , Developments in Design , 2nd edn. Wiley (2), 198–210 . Prentice-Hall IEEE Software (1), January–March, 20–54(1), January–March, ACM Software Engineering Notes 19 , , 2nd edn. Prentice-Hall SE-12 , Prentice-Hall J. Systems & Software , August 1997, Washington, DC, pp. 6–13. Washington, DC, , August 1997, Los ACM Softw. Eng. Notes , 6th edn. Addison-Wesley (4), 165–95 3 , Proceedings COMPSAC’97, 21st International Com- COMPSAC’97, 21st Proceedings (5), 102–13 Derivation and Validation of Software Metrics Derivation and Validation Using UML: Software Engineering with Objects and Com- Using UML: Software Engineering with 37 Software Architecture: Perspectives on an Emerging Discipline Software Architecture: , IEEE Trans. Software Eng. Empirical Studies of Programmers: Second Workshop (1), 40–47 17 Software Engineering , Component Software: Beyond Object-Oriented Programming. Component Software: Beyond Object-Oriented Software Design: Concepts and Methods Software Engineering Principles and Practice The Z Notation: A Reference Manual (8), 117–23 Jackson System Development. Comm. ACM 42 (Cross N., ed.), 145–66. Wiley Object Oriented Systems , IEEE Annals of the History of Computing the History Annals of IEEE Proceedings 9th Conference on Software <a href="/tags/Engineering_education/" rel="tag">Engineering Education</a> Proceedings 9th Conference on Software , 113–20 2 , . Addison-Wesley (Hoc J.-M., Green T.R.G., Samurçay R. and Gilmore D.J., eds), 235–49. Academic Press IEEE Software (4), 332–45 (2), 79–83 resent control and timing. methodologies. fessional programmer. In Sheppard S. and Soloway E., eds.), 217–30. Ablex ming Current status and conditions for growth. Current status and conditions for growth. Software Comm. ACM 21 Wesley spective. In 119–29. Press. Los Alamitos, California: IEEE Computer Society ponents 115–39 Methodology 22 Alamitos, California: IEEE Computer Society Press Alamitos, California: Prentice-Hall student view. Press Engineering. Engineering. ture. for software systems. tectural styles Conference and Applications puter Software Ward P.T. (1986). The transformation schema: an extension of the data-flow diagram to rep- Ward P.T. (1986). The transformation schema: an extension of the data-flow diagram Vessey I. and Conger S.A. (1994). Requirements specification: learning object, process and data Vessey I. and Conger S.A. (1994). Requirements specification: learning object, process on a pro- Visser W. (1987). Strategies in programming programmable controllers: a field study Visser W. and Hoc J.-M. (1990). Expert software design strategies. In Traas V. and van Hillegersberg J. (2000). The software component market on the internet: Traas V. and van Hillegersberg J. (2000). the quality of structured designs. Troy D.A. and Zweben S.H. (1981). Measuring (1999). Growing systems in emergent organisations. Truex D., Baskerville R. and Klein H. Van Vliet H. (2000) Szyperski C. (1998). object. Taivalsaari A. (1993). On the notion of Software Development Studio: A Five Year Retro- Tomayko J.E. (1996). Carnegie Mellon’s Stevens P. and Pooley R. (2000). Stevens W.P. (1991). L.L. (1974). Structured design. Stevens W.P., Myers G.J. and Constantine Sutcliffe A. (1988). baggage system? Swartz A. J. (1996). Airport 95: Automated Simon H.A. (1984). The structure of ill-structured problems. In The structure of ill-structured problems. Simon H.A. (1984). in MASCOT. Jackson K. (1979). Process synchronisation Simpson H.R. and essence of objects: concepts and terms. Snyder A. (1993). The Sommerville I. (2001). Spivey M.J. (1992). Shaw M. and Garlan D. (1996). Shaw M. and Garlan of object oriented systems: a D.P. (1996). Perceptual complexity Sheetz S.D. and Tegarden D. (1993). Shepperd M. and Ince Shapiro S. (1997). Splitting the difference: the historical necessity of synthesis in Software in of synthesis necessity the historical the difference: Splitting S. (1997). Shapiro cul- community and Software engineering: M. (2000). Robinson H. and Woodman Sharp H., classification of archi- boxology: preliminary A field guide to Clements P. (1997). Shaw M. and</p><p>Bibliography 458 SDD01 9/18/07 11:33 AM Page 458 AM Page 11:33 9/18/07 SDD01 Bibliography 459 , (2), IEEE IEEE 13 , (9), 8–24 , Vols 1–3. , Vols 23 (4), 221–7 , 14 , IEEE Computer (7/8), 3–7 , 13–26 2 , . Van Nostrand Reinhold . Van Nostrand 48 , IEEE Computer Comm. ACM . Prentice-Hall Van Nostrand ACM Software Engineering Notes Am. Programmer Proceedings of 21st International Conference Proceedings of 21st (4), 459–527 . Yourdon Press 30 , Structured Design (5), 57–61 J. of Systems & Software 23 , Structured Development for Real-Time Systems for Real-Time Development Structured (1), 68–72 , Los Angeles, CA, pp. 296–302., Los Angeles, CA, Alamitos, California: IEEE Los SE-10 The Psychology of Computer Programming of Computer The Psychology , Logical Construction of Programs. Logical Construction Structured Walkthroughs (2), 104–18 ACM Computing Surveys 27 (6), 33–8 , 34 , ACM Software Eng. Notes (12), 8–23 HOOD. April, 22–4 Comm. ACM Computer of COTS integration. In estimating the cost on Software Engineering Computer Society Press Trans. Software Eng. and techniques. technology. igation of object-oriented Yourdon Press Yourdon 21 Weinberg G.M. and Freedman D.P. (1984). Reviews, walkthroughs and inspections. walkthroughs D.P. (1984). Reviews, G.M. and Freedman Weinberg Wieringa R. (1998). A survey of structured and object-oriented software specification methods A survey of structured and object-oriented Wieringa R. (1998). Ward P.T. and Mellor S.J. (1985). Mellor S.J. P.T. and Ward (1980). Warnier J.D. terrain. representation the design information (1988). Mapping Webster D.E. G.M. (1971). Weinberg Wing J.M. (1990), A specifier’s introduction to formal methods. specifier’s introduction to formal methods. Wing J.M. (1990), A Wu M.-W. and Lin Y.-D. (2001). Open source software development: an overview. Y.-D. (2001). Open source software Wu M.-W. and Lin Wirth N. (1971). Program development by stepwise refinement. development by stepwise refinement. Wirth N. (1971). Program research: an empirical invest- J. and Roper M. (1999). Multi-method Wood M., Daly J., Miller Yourdon E. and Constantine L.L. (1979). Yourdon E. and Constantine L.L. (1979). Yourdon E. (1989). Object-oriented observations. design. Zahniser R.A. (1988). The perils of top-down Yakimovitch D., Bieman J.M. and Basili V.R. (1999). Software architecture classification for J.M. and Basili V.R. (1999). Software Yakimovitch D., Bieman Yourdon E. (1979). Zave P. (1984). The operational versus the conventional approach to software development. Zave P. (1984). The operational versus Integrating a formal specification notation with Zheng M., Zhang J. and Wang Y. (1998). SDD01 9/18/07 11:33 AM Page 459 AM Page 11:33 9/18/07 SDD01 SDD01 9/18/07 11:33 AM Page 460 SDD02-Index 9/18/07 11:34 AM Page 461</p><p>461</p><p>Index</p><p><<keyword>> 152, 162 mismatch 111, 188, 371, 412 4+1 view 96 model 30, 97 7 plus or minus 2 99 pattern 219, 226, 445 Δ (as used in Z) 431–2 style 26, 37, 38, 109, 111, 112–18, 119, 123, Ξ (as used in Z) 431–2 158, 166, 181, 182, 183, 187, 188, 199, 201, 215, 227, 229, 235, 244, 254, 277, 354, 365, 404, 405, 406, 408, 409, 412, 413, 414, 443, A 445, 446 architecture 37, 109–18, 370 abstract data type 217, 343, 346, 433, 434 arrowheads 152 abstraction 18, 19, 28, 68, 75, 90, 92, 94, 101, artifact 4, 7, 64 122, 134, 147, 167, 168, 178, 182, 186, 206, association (relationship) 153 214, 278, 299, 347, 349, 357, 379, 389, 420 attributes (of design or design entity) 64, 66, 68, access procedure 79 69, 70, 95, 137, 201 active objects (in HOOD) 373 axiom 433, 436–8 activity diagram 129, 156–7 axiomatic form (of FDT) 423 actor 154, 164 adaptive maintenance 57 ADT see abstract data type B advisor (in DSDM) 248 aggregation (of properties) 410, 412, 413 backtracking (in design process) 9, 50, 238, 249, agile methods 242, 244, 413, 443, 444, 446 303, 337 algebraic form (of FDT) 423, 433–8 batch systems 188 algorithm design 292 behaviour 17, 94, 139, 143, 217, 346, 363, 364 ambassador (in DSDM) 248 behavioural (viewpoint) 95, 97–8, 141, 144, 147, ambiguity (in design representation) 99, 102, 420 148, 154, 156, 165, 182, 275, 332, 334, 386, analysis 48, 49, 98, 112, 131, 134, 139, 170, 183, 397, 432 258, 278, 355, 361, 365, 382, 389, 392, 430 behavioural pattern 218 anti-pattern 225 binding time 26, 353, 412 application domain see problem domain black box 6, 29, 90, 98, 128, 129–57, 201, 242, Ariane-5 406 243, 271, 324, 369, 382, 384, 396, 404, 406, architectural 416, 421, 430, 432 complexity 76 blackboard (as expert system) 116 design (phase) 29, 48, 181, 183, 245, 258, 267, boundary clash (in JSP) see structure clash 370, 392, 393, 409, 421 box and line (notation) 90, 100, 108, 152, 163, 164 design pattern 121 broker 410, 447, 448 information flow see also anti-pattern heuristics see see plan Commercial Off The Shelf Commercial class-responsibility-collaborators see see see 216–29, 367, 368, 370, 371, 414, 443, 444, 445, 446, 447 259, 263, 266–72, 278–81, 283, 364 208, 238, 261, 275, 333, 382, 386, 432 234–8, 258, 265, 266, 278, 345, 364, 378, 425, 426, 438 118–20, 176–87, 194, 199, 214, 445, 446 382, 384, 386 model 8, 28, 29, 31, 83, 92, 93, 447 pattern 33, 37, 59, 109, 120–1, 214, 215, plan (nature of ) 5 anti-pattern attribute 75–81 audit 39 element 201 execution 122, 246, 394 heuristic inspection 81–2 knowledge 443 method 33, 34, 35, 37, 59, 91, 92, 109, metrics 65–75 dataflow 97, 114, 204 Data Flow Diagram (DFD) 129, 130–6, 203, 204, data-flow stream (in JSD) 320, 326, 330, 336 database systems 116, 139 data-modelling (viewpoint) 95, 98, 139, 147, 148, data-processing 187, 259, 316, 330 decision diamond 156 declarative knowledge 177–9 decomposition (as design strategy) 199, 205–7, dependency (relationship) 153 derived viewpoint 95 design context diagramcontext 278 265, 271, 263, Flow DiagramControl 262 control couplingcoordinating 78 coroutine 310, 336 corrective maintenance 57 COTS couple 159 coupling274, 414, 445 77–9, 235, 271, CRC creational pattern 218 cyclomatic complexity 67 D (architectural style)data-centred repository 237 data dictionary 263, 266, 272, 281, 259, 261, component-based software engineering component-based software design heuristic case-based reasoning see see see 158, 161, 332, 335, 372, 376, 381, 386, 389 443 415, 445 258, 266, 290, 297, 316, 426, 438 446 395, 397 237, 258, 261, 352, 354, 355 237, 258, 261, (of components) 403 (of patterns) 225, 226 constructor (operation) 436, 437 concurrent systems 188 conformity 27 connector 113 consistency 384 constraints 13, 37, 38, 98, 111, 176, 366, 382, constructional (viewpoint) 94, 95, 96–7, 111, 153, component diagram 161 compositional (strategy) 199, 207–9, 211, 227, comprehension 77 concealing (design decisions) 80 conceptual model 410 Commercial Off The Shelf 415–17 communicating sequential processes 316 completeness 299, 384 complexity 27, 75, 76, 120, 158, 229, 274, 413, component 113, 161, 370, 402–17, 422, 443 component-based software engineering 404, 408, cliché client–server 116, 316 coding (phase) 48 cognitive dimensions 72–5 cognitive load 182, 356 cohesion 77–9, 235, 271, 274, 414, 445 collaboration diagram 364, 395 chain of responsibility (pattern)chain of responsibility 220, 223–4 changeability 27 child objects (in HOOD) 373, 374, 375, 376 class 153, 345, 348–51, 353, 356, 385, 388, 389, class diagram 129, 153, 161–4, 395 381, class-responsibility-collaborators 395 catalogue causal 97, 262 CBR CBSE central transform 273, 283, 284, 285 269, 270, C (architectural style)call and return 115–16, 236, call graph236, 276, 352 158, CASE (tools) 267, 447 68, case-based reasoning 447</p><p>Index 462 SDD02-Index 9/18/07 11:34 AM Page 462 11:34 AM 9/18/07 SDD02-Index SDD02-Index 9/18/07 11:34 AM Page 463</p><p> design (continued ) Entity–Relationship Diagram (ERD) 129, 136–9, 463 process 90 147, 153, 261, 262, 381</p><p>(for) reuse 366 see also reuse Entity–Structure Diagram (ESD) 318–20, 322, Index review 38, 55, 81–2, 246 326, 328, 330 strategy 118, 183, 194–200, 247 ERD see Entity–Relationship Diagram studio 14, 448 ESD see Entity–Structure Diagram team 40–2, 184 event 140, 145, 188, 262, 267, 374, 384 template see template event partitioning 258, 265, 278 trade-offs 18, 121, 227, 229 evolution see maintenance transformations see transformation step evolutionary prototype 51, 245, 246 viewpoint see viewpoint exception 200, 263, 271, 375 virtual machine 182–4, 187, 198, 420 experimental prototype 52, 84, 245 detailed design (phase) 29, 48, 258 experimental studies 32, 121 see also empirical DFD see Data-Flow Diagram studies D-matrix 200–4, 206, 208, 271–3, 300, 301, expert problem solving 107 332–5, 386–8, 398 exploratory prototype 52, 84, 243, 245, 246, 392 diagrammatical descriptive forms 99, 169 see also representation part diffusion of innovation 448 F divide and conquer 263 see also decompositional strategy facilitated workshop (DSDM) 253 documentation 182, 184 see also records factoring 274 domain knowledge 16, 32, 33, 41, 83, 84, 108, FBS framework (Function–Behaviour–Structure) 6 177, 181, 415 FDT see Formal Description Technique DSDM see Dynamic Systems Development feasibility study 48, 52, 243, 251, 252–3, 392 Method finite-state machine 97, 139, 364 duplication 206, 238 fitness for purpose 18, 65, 68, 248 DVM see design virtual machine flow (relationship) 153 dynamic attributes 69 flow of information see information flow Dynamic Systems Development Method 247–54, flowchart 100, 101, 267 390, 392, 413 fork 156 Formal Description Technique (FDT) 179, 421, 422, 424, 425 see also formal method E formal method 179, 180, 420, 424 framework see object-oriented framework early adopter 448, 449 framework first (strategy) 410 E-type systems 58 functional (viewpoint) 95, 98, 147, 148, 154, 158, efficiency 71, 72, 80 165, 168, 207, 238, 259, 332, 432 elaboration (step in design) 34, 36, 195, 198, 200, functional composition 373 see also 203, 206, 208, 234, 271, 301, 335, 388, 426 compositional strategy element first (strategy) 409, 410 functional decomposition see decomposition emergent organization 243, 244, 246, 417, 425 functionality 17, 199, 382, 385, 402, 414 empirical studies 31, 227, 229, 358, 398, 445 Fusion (design method) 163, 380–90, 398 see also experimental studies encapsulation 347, 356, 357, 364, 371, 379, 382, 389 see also information hiding G enrichment 435 entity 66, 136, 137, 142, 207, 275, 318–20, 325, Gang of Four 217, 218 346, 433, 434 generalization (relationship) 153 Entity Life-History Diagram (ELHD) 170–2 GoF see Gang of Four Entity Life-History matrix 171 graceful degradation 71 JSP JSD see see Structure Diagram see program inversion program see 449 181, 182, 229, 402 216, 446 332, 446 management review 81, 84 MASCOT 115, 210 mathematical notations 102, 179 maturity model (software process) 83 measurable characteristic 67 K knowledge transfer 32–7, 176, 181, 413, 447, L label for plans 31, 121, 122, 217 layout (conventions) 74 levelling 259, 273, 279 library 366, 368 life-cycle 20, 46, 50, 54, 56, 59 logic 428 logical design (phase) 29, 183 logical DFD 134, 266 look and feel 49 M made to measure (systems) 46, 50 magic number seven 99 maintainability 72, 77 maintenance 39, 48, 57, 58, 59, 74, 77, 112, 118, inversion of controlinversion 370 software)invisibility (of 119, 176, 28, 90, 108, invocation 261, 269, 347 97, 204, iteration (describing) 147 design process)iteration (in 9, 13 J Jackson Structure Diagram Jackson Structured Programming Jackson Structured Development join 156 JSD 362 149, 195, 208, 290, 316–37, JSP 274, 289–312, 149, 180, 187, 208, 258, 316, HOOD see data flow design inspection see see also 271, 343, 345, 347, 356, 445 369, 371, 372, 386, 389, 395, 397, 433 412 244, 252, 254, 265, 396, 397 273, 301–11, 332, 336–7, 363, 378–9, 438 142, 145, 158, 159, 195 (of components) 407 (of patterns) 227 interrupt 308 invariant 382, 384, 429 inspection instance 153, 348 integration testing 48 interacting-processes architectural style 316 interface 162, 403, 406, 414 Internet 26 internet time 27 information overload 90 information systems 248 inheritance 153, 161, 226, 348, 349, 351, 367, inheritance graph 382, 386, 388 initialization (design for) 271, 303 incremental development 51–5, 242–54 indexing information flow 130, 132, 261, 263, 266, 269, information hiding 79–81, 160, 199, 209, 235, idiom 121, 214, 219, 227 ilities 68, 70–2 ill-structured problem (ISP) 21 imperative programming languages 38 implementation 16, 26, 38, 48, 108, 153, 198, import 434, 435, 436 HOOD 210, 372–9 hot spot 369 human–computer interface 49, 200 I hidden dependencies 74 Design Hierarchical Object-Oriented (of diagrams)hierarchical organization 101, 133, hierarchy 348, 389 higraph 143 graphical user interface (GUI) user interface graphical 368 (model)grey box 369 H heuristics 195, 214, 106, 107, 179, 180, 34, 35,</p><p>Index 464 SDD02-Index 9/18/07 11:34 AM Page 464 11:34 AM 9/18/07 SDD02-Index SDD02-Index 9/18/07 11:34 AM Page 465</p><p> measurement (of design properties) 65, 66, 68 framework 367–71 465 measurement scales 65 paradigm 161</p><p> mental execution (of design model) 31, 96, 355 programming 343 Index mental model 30, 31, 49, 70, 82, 121, 181 Object Request Broker (ORB) 369 MERISE 210 Objectory 390, 398 message sequence diagram see sequence diagram object visibility graph 382 method see design method ODS see Object Description Skeleton method knowledge 83, 181 OMG see Object Management Group methodology 176 OOP see object-oriented programming methods (of objects) 353, 356 open source 40, 53, 54 metric see design metric operation (phase) 48 mini-specs 259 opportunistic (strategy for design) 33, 83, 181, mismatch see architectural mismatch 182, 203, 254, 410, 413 model see design model ordering clash see structure clash model-based (forms of FDT) 423, 425–32 ordinal scale (measurement) 66 model management 152, 157 organizational (design strategy) 199, 209–11 modularity 13, 41, 76–9, 209, 235, 347, 357, orthogonality 145 371, 379, 389 OS/360 158 module 199, 348 MoSCoW rules (DSDM) 250–1 multiple inheritance 350 P multithreading clash see structure clash P-Specs 259 package (UML) 395, 397 N parent–child (HOOD) 374, 379 passive object (HOOD) 373 n-ary properties 137 pattern book 215 non-functional (design properties) 363, 392, 394, pattern description template 219 422 perfective maintenance 57, 58, 185 notation (forms of ) 98–102 persistence (of information/objects) 266, 396, note-making (by designers) 278, 279, 281 397 noun–verb (analysis) 325, 357, 382, 395 Petri Net Graph 156, 246, 424 physical design 29, 183, 261, 317, 331, 393 physical DFD 134, 266 O pipe and filter (architectural style) 114–15, 236, 237, 290, 302, 355 object 153, 164, 199, 207, 217, 342–98, 434 plan (from design process) 14, 15, 16, 17 model 151, 353–6, 433 polymorphism 352–3, 356, 369, 371 size 366 postcondition 384, 429 object-based design 316, 352, 356, 371–9 precondition 384, 429 Object Description Skeleton (ODS) 375–6, 379 predicate (part of specification) 429 object diagram 129, 161–4 predicate logic 426 object interaction graph 163, 382, 384, 385, 387 premature commitment 73, 74 Object Management Group (OMG) 150 problem domain 32, 179, 180, 181, 187–9, 259, object-oriented 316 (architectural style) 120, 151, 157, 199, 216, problem restructuring step 35 229, 258, 355, 446 procedural (form of design method) 118, 176, analysis 361 177, 194, 195, 199, 203, 229, 242, 413 design 164, 342, 361, 379–98 procedural knowledge 35, 178–9 design method 163, 342, 358, 360, 361, 364, process part (of method) 34, 35, 179, 180, 194, 365, 443 195, 203 maturity model see design method architecture see life-cycle see Structured Systems Analysis and see see System Specification Diagram see 262 336 395 Structured Design 290, 446 382, 390 (nature of ) 26–7 architecture design method life-cycle process maturity model State Transition Table 169–70 state vector (in JSD) 320, 321, 326, 330, 331, sequence diagram 164–6, 129, 151, 364, 382, service 442 set 426–8, 432, 433 shells of knowledge 107 signature (of specification) 429, 433, 435–6 silver bullet 27, 229, 424, 446, 447 simplicity 75 simulation 30, 31 single inheritance 350 software solution space 38 sort 433, 435, 436 spiral model 52, 53, 59, 243 SSA/SD SSADM 99, 130, 139, 149, 170, 180, 207, 210, SSD stakeholder 93, 406, 407 state 139, 140, 141, 143, 145, 217 Statechart 129, 143–6, 246, 364, 420, 424 State Transition Diagram 129, 139–42, 143, 169, S S-type systems 58 SADT 378 (systems)safety-critical 71 scale 379 169, 180, 216, 238, 28, 76, 110, scenario 166, 246, 384 153, 164, schema (knowledge) 217 schema (Z) 429–32 scope 80, 97 scripting languages 38 methodssecond-generation design 316, 335, 380, secondary notation 74 selection (describing) 147 semantics 101, 420 separation of concerns 276, 347, 368, 445 76, sequence (describing) 147 RAD see real-time heuristics see see 397, 402, 403, 404, 405–6, 413, 414, 415, 443, 446 421, 433 372, 379 248, 253, 254, 413, 430 specification 15, 29, 242, 276, 325, 421, 432 elicitation 48, 49, 392, 393 in JSD 336 in JSP 303–11, 336 rules of thumb reuse 14, 37, 59, 112, 214–16, 274, 365, 366–71, revolutionary 360, 379, 408, 443 risk 243, 244, 392, 413 rough merge (in JSD) 321, 327 representation 17, 18, 28, 90, 91, 92, 93, 94, 98 representation form 185, 291 representation part (of method) 34, 178, 179, 180, required interface 162 requirements real-time 140, 142, 187, 188, 259, 262, 275, 330, realization (relationship) 153 recognition step 35 record (of design decisions) 38, 39, 181 relationship 136, 183 reliability 71, 77 RAD 242, 247, 249, 250, 252 Rapid Application Development ratio scale (measurement) 65, 67 reactive (life-cycle) 53, 54 reactive (system) read-ahead (in JSP) 302 Q quality 13, 39, 64–84, 271, 445 R prototype54, 55, 57, 84, 245–7, 48, 51, 52, 53, provided interface 162 provided operations 375, 433 374, proxy (pattern) 220, 221–3 pseudocode 166–8, 129, 149, 158, 262, 292 program designprogram 290 inversion program program-proving 423 in the largeprogramming 31, 40, 42 (forms of FDT)property-based 432–8 423, </p><p>Index 466 SDD02-Index 9/18/07 11:34 AM Page 466 11:34 AM 9/18/07 SDD02-Index SDD02-Index 9/18/07 11:34 AM Page 467</p><p> state vector separation (in JSD) 336–7 top-down (strategy) 179, 211, 259, 263 see also 467 static attributes 69 decompositional strategy</p><p>STD see State Transition Diagram trade-offs see design trade-offs Index stepwise refinement see decompositional transaction analysis 263, 267–9, 272, 282 strategy transform analysis 263, 269–71, 272, 273, stopping rule (wicked problem) 20, 206, 238 282–5 story-board 246, 253 transform model (life-cycle) 51 strategy see design strategy transformation step (in design) 34, 36, 195, 198, structural complexity 66 200, 203, 204, 263, 388 structural pattern 218 transition (between states) 140, 145, 156 Structure Chart 129, 158–61, 168, 204, 235, transition action 140 261, 262, 263, 267–71, 273, 275, 276, 284, transition condition 140 346 type 348, 349, 352, 432 structure clash (in JSP) 303–11, 330 Structure Diagram (Jackson) 129, 143, 144, 147–50, 168, 170, 236, 291, 293, 296–8, U 300, 301, 318, 420 Structured Design 235, 258, 261, 262, 263, 265, UML 129, 150–7, 345, 364, 380, 390, 445 343, 346, 348 understanding 112 Structured Systems Analysis 258, 262, 263–7, UniCon 113 277–81, 378 Unified Modeling Language see UML Structured Systems Analysis and Structured Design Unified Process 151, 156, 365, 380, 390–8 139, 140, 207, 258–85 <a href="/tags/Unit_testing/" rel="tag">unit testing</a> 48 STT see State Transition Table UP see Unified Process subprogram 77, 116, 158, 199, 234, 236, 347, usability 72, 77 348, 352, 353, 366 usage (relationship) 153 supply chain 403, 404, 408 use case 153–6, 164, 165, 166, 384, 392, 393, switch parameter 78 394, 395, 397, 398 synchronization 156, 412 use case diagram 129, 153–6 syntax 101, 420, 447 user interface design 64, 200, 215 synthesis 360 uses hierarchy 78, 97, 351–3, 373, 379 System Specification Diagram (SSD) 320–2, 326, uses relationship 153, 161, 348, 367, 371, 374, 329, 330 395, 433, 438 systematic methods 180, 420, 444 V T validation 56, 65 VDM (Vienna Development Method) 423, 426 tabular 160, 168, 169-72 verification 56, 65, 420 tcl/tk 246 verification procedure (JSP) 298 technical review 81, 84 Vienna Development Method see VDM template 153, 199, 214–16, 276, 348, 375 viewpoint 17, 92–8, 128, 129, 134, 139, 141, testability 77 144, 148, 157, 183, 195, 198, 200, 201, textual descriptive forms 99 208, 334, 346, 361, 379, 388, 389, 426, thread 165, 186, 332, 373 444 three amigos 390 virtual machine 182 see also design virtual timebox 250, 251, 254 machine timeline 164 viscosity 74 time ordering 316, 318 visibility graph 164, 385, 387 426–32 Y Y2K problem 58 Z Z (formal description language) 113, 376, 423, 243, 254, 369, 382, 385, 395, 421 243, 254, 369, 382, 385, wicked problem 19–22, 47, 171fn, 206, 446 workflow (Unified Process) 391, 392, 393, 394–7 W walkthrough 81 (life-cycle)waterfall model 446 47, 48, 50, web engineering 55 website442 55, 74, white box 90, 98, 128, 129, 158–68, 6, 29, 242,</p><p>Index 468 SDD02-Index 9/18/07 11:34 AM Page 468 11:34 AM 9/18/07 SDD02-Index SDD02-Index 9/18/07 11:34 AM Page 469 SDD02-Index 9/18/07 11:34 AM Page 470 SDD02-Index 9/18/07 11:34 AM Page 471 SDD02-Index 9/18/07 11:34 AM Page 472</p> </div> </div> </div> </div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js" integrity="sha512-aVKKRRi/Q/YV+4mjoKBsE4x3H+BkegoM/em46NNlCqNTmUYADjBbeNefNxYV7giUp0VxICtqdrbqU7iVaeZNXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> <script src="/js/details118.16.js"></script> <script> var sc_project = 11552861; var sc_invisible = 1; var sc_security = "b956b151"; </script> <script src="https://www.statcounter.com/counter/counter.js" async></script> <noscript><div class="statcounter"><a title="Web Analytics" href="http://statcounter.com/" target="_blank"><img class="statcounter" src="//c.statcounter.com/11552861/0/b956b151/1/" alt="Web Analytics"></a></div></noscript> </body> </html>