Software Design Methodology Software Design Methodology Hong Zhu AMSTERDAM BOSTON HEIDELBERG LONDON NEW YORK OXFORD PARIS SAN DIEGO SAN FRANCISCO SINGAPORE SYDNEY TOKYO Butterworth-Heinemann An imprint of Elsevier Linacre House, Jordan Hill, Oxford OX2 8DP 30 Corporate Drive, Burlington MA 01803 First published 2005 Copyright © 2005, Hong Zhu. All rights reserved The right of Hong Zhu to be identified as the author of this work has been asserted in accordance with the Copyright, Designs and Patents Act 1988 No part of this publication may be reproduced in any material form (including photocopying or storing in any medium by electronic means and whether or not transiently or incidentally to some other use of this publication) without the written permission of the copyright holder except in accordance with the provisions of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London, England W1T 4LP. Applications for the copyright holder's written permission to reproduce any part of this publication should be addressed to the publisher Permissions may be sought directly from Elsevier’s Science and Technology Rights Department in Oxford, UK: phone: (+44) (0) 1865 843830; fax: (+44) (0) 1865 853333; e-mail: [email protected]. You may also complete your request on-line via the Elsevier homepage (http://www.elsevier.com), by selecting ‘Customer Support’ and then ‘Obtaining Permissions’ The following figure supplied courtesy of Diagram Visual Information Ltd Figure 4.2 The following figures supplied courtesy of ACM Publications Figures 4.9, 4.10, 4.12, 4.13, 4.16 The following figure supplied courtesy of AAAI Press Figure 5.10 British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Cataloguing in Publication Data A catalogue record for this book is available from the Library of Congress ISBN 0 7506 6075 9 For information on all Butterworth-Heinemann publications visit our website at www.books.elsevier.com Printed and bound in Great Britain Table of Contents Preface x 1 Basic Concepts of Design 1 1.1 Introduction............................................................................................................2 1.2 Characteristics of design activities.........................................................................4 1.2.1 The input and start point of designs.............................................................4 1.2.2 The outcome and results of designs.............................................................4 1.2.3 Transformation of data.................................................................................5 1.2.4 Generation of new ideas..............................................................................5 1.2.5 Problem solving and decision making.........................................................5 1.2.6 Satisfying and discovering constraints.........................................................6 1.2.7 Evolution and optimisation in a solution space of diversity........................6 1.3 Essential elements of designs.................................................................................7 1.3.1 Statement of design problem and objectives................................................7 1.3.2 Constraints.................................................................................................11 1.3.3 Description of product...............................................................................11 1.3.4 Rationale....................................................................................................13 1.3.5 Plan of production......................................................................................14 1.3.6 Description of usage..................................................................................15 1.4 The factors that affect designs..............................................................................16 Summary..............................................................................................................21 Exercises...............................................................................................................23 2 Design Quality 27 2.1 Software quality models.......................................................................................28 2.1.1 Hierarchical models...................................................................................28 2.1.2 Relational models......................................................................................29 2.2 The effect of design on software quality...............................................................33 2.2.1 Efficiency...................................................................................................33 2.2.2 Correctness and reliability.........................................................................35 2.2.3 Portability..................................................................................................35 2.2.4 Maintainability...........................................................................................36 2.2.5 Reusability.................................................................................................36 ii Table of Contents 2.2.6 Interoperability..........................................................................................37 2.3 Quality attributes of software design....................................................................39 2.3.1 Witt, Baker and Merritt’s design objectives..............................................39 2.3.2 Parnas and Weiss’s requirements of good designs....................................40 2.3.3 Quality of development process.................................................................41 Summary..............................................................................................................43 Exercises...............................................................................................................44 3 Design Principles 47 3.1 Basic rules of software design..............................................................................48 3.1.1 Causes of difficulties.................................................................................48 3.1.2 Vehicles to overcome difficulties..............................................................51 3.1.3 Basic rules of software design...................................................................53 3.2 Design processes..................................................................................................55 3.2.1 The context of design in software development process............................55 3.2.2 Generic design process: descriptive models..............................................58 3.2.3 Design strategies: prescriptive models.......................................................60 3.3 Structure of software design methods...................................................................66 Summary..............................................................................................................68 Exercises...............................................................................................................68 4 Software Architecture 73 4.1 The notion of architecture.....................................................................................74 4.1.1 Architecture in the discipline of buildings.................................................74 4.1.2 Architecture in the discipline of computer hardware.................................77 4.1.3 The general notion of architecture.............................................................82 4.2 The notion of software architecture......................................................................84 4.2.1 Prescriptive models....................................................................................85 4.2.2 Descriptive models....................................................................................86 4.2.3 Multiple view models................................................................................87 4.2.4 The roles of architecture in software design..............................................92 4.3 Software architectural style..................................................................................94 4.3.1 Introductory examples...............................................................................94 4.3.2 The notion of software architectural style................................................101 Summary............................................................................................................104 Exercises.............................................................................................................106 5 Description of Software Architectures 111 5.1 The visual notation.............................................................................................112 5.1.1 Active and passive elements....................................................................112 5.1.2 Data and control.......................................................................................113 5.1.3 Relationships............................................................................................114 Software Design Methodology iii 5.1.4 Decomposition/composition of architectural elements............................115 5.2 Example 1: www client-server pair....................................................................117 5.3 Example 2: robot soccer UNSW.........................................................................120 5.4 Example 3: training centres’ management information system..........................123 Summary............................................................................................................130 Exercises.............................................................................................................131 6 Typical Architectural Styles 135 6.1 Data flow............................................................................................................138 6.1.1 The general data flow style......................................................................138 6.1.2 The pipe-and-filter sub-style....................................................................141 6.1.3 The batch sequential processing sub-style...............................................144 6.2 Independent components....................................................................................147 6.2.1 The general independent components style.............................................147 6.2.2 The event-based implicit invocation systems sub-style...........................149 6.2.3 The communicating processes sub-style..................................................152 6.3 Call and return....................................................................................................154 6.3.1 The general call and return style..............................................................154 6.3.2 The layered systems sub-style.................................................................158 6.3.3 Data abstraction: the abstract data type and object-oriented sub-styles...159 6.4 Data-centred.......................................................................................................162 6.5 Virtual machine..................................................................................................164 Summary............................................................................................................168 Exercises.............................................................................................................169 7 Using Styles In Design 173 7.1 Choices of styles.................................................................................................174 7.2 Combinations of styles.......................................................................................179 7.2.1 Hierarchical heterogeneous styles............................................................179 7.2.2 Simultaneously heterogeneous styles.......................................................180 7.2.3 Locationally heterogeneous styles...........................................................181 7.3 Case study: keyword frequency vector...............................................................184 7.3.1 Specification of the problem....................................................................184 7.3.2 Designs in various styles..........................................................................185 7.3.3 Analysis and comparison.........................................................................190 Summary............................................................................................................194 Exercises.............................................................................................................195 8 Architectural Design Space 199 8.1 Theory of design spaces.....................................................................................200 8.1.1 Structure of design spaces........................................................................200 8.1.2 Solving design synthesis and analysis problems......................................203 iv Table of Contents 8.2 Design space of architectural elements...............................................................205 8.2.1 Behaviour features...................................................................................205 8.2.2 Static features...........................................................................................210 8.3 Design space of architectural styles....................................................................216 8.3.1 Characteristic features of architectural styles..........................................216 8.3.2 Classification of styles.............................................................................218 Summary............................................................................................................221 Exercises.............................................................................................................222 9 Scenario-Based Analysis and Evaluation 225 9.1 The concept of scenario......................................................................................226 9.2 Scenarios for evaluating modifiability................................................................229 9.2.1 Changes of users’ functional requirements..............................................229 9.2.2 Changes of hardware environment..........................................................231 9.2.3 Changes of software environment...........................................................232 9.2.4 Changes of software components............................................................233 9.2.5 Evaluation of modifiability......................................................................234 9.3 Scenarios for evaluating performance................................................................235 9.3.1 Specification of operational profiles........................................................235 9.3.2 Evaluation and analysis of performance..................................................237 9.4 Scenarios for evaluating reusability....................................................................241 Summary............................................................................................................244 Exercises.............................................................................................................245 10 Analysis and Evaluation Of Modifiability: The SAAM Method··········249 10.1 The input and output...........................................................................................250 10.2 The process.........................................................................................................252 10.2.1 Development of scenarios........................................................................254 10.2.2 Description of candidate architecture......................................................255 10.2.3 Classification of scenarios.......................................................................258 10.2.4 Scenario evaluation..................................................................................258 10.2.5 Revealing scenario interaction.................................................................259 10.2.6 Overall evaluation....................................................................................261 10.3 Case study: analysing architectural designs of keyword frequency vector extraction system................................................................................................263 10.3.1 Development of scenarios........................................................................263 10.3.2 Main program/subroutine with shared data architecture..........................263 10.3.3 Abstract data type architecture.................................................................267 10.3.4 Implicit invocation architecture...............................................................268 10.3.5 Pipe-and-filter architecture......................................................................270 10.3.6 Overall evaluation....................................................................................272 Summary............................................................................................................273 Exercises.............................................................................................................275 Software Design Methodology v 11 Quality Trade-Off Analysis: The ATAM Method 277 11.1 ATAM analysis process......................................................................................279 11.2 ATAM analysis activities....................................................................................283 11.2.1 Step 1: Present the ATAM.......................................................................283 11.2.2 Step 2: Present the business drivers.........................................................283 11.2.3 Step 3: Present the architectural design...................................................283 11.2.4 Step 4: Identify architectural design decisions.........................................284 11.2.5 Step 5: Generate the quality attribute utility tree.....................................284 11.2.6 Step 6: Analyse the architectural design decisions..................................285 11.2.7 Step 7: Brainstorm and prioritise scenarios.............................................291 11.2.8 Step 8: Analyse the architectural design decisions..................................293 11.2.9 Step 9: Present the results........................................................................293 Summary............................................................................................................295 Exercises.............................................................................................................296 12 Model-Based Analysis: The HASARD Method 299 12.1 Representation of quality models.......................................................................301 12.2 Construction of quality models...........................................................................306 12.2.1 Hazard identification................................................................................307 12.2.2 Cause-consequence analysis....................................................................310 12.2.3 Assembling graphic model......................................................................314 12.2.4 Identification of quality concerns............................................................315 12.3 Derivation of quality features.............................................................................317 12.3.1 Contribution factors of a quality concern................................................317 12.3.2 Sensitive quality attributes of a component.............................................318 12.3.3 Quality risks.............................................................................................320 12.3.4 Trade-off points.......................................................................................321 12.4 Case study: client-server web systems................................................................322 12.4.1 Description of the architecture.................................................................322 12.4.2 Construction of quality model.................................................................323 12.4.3 Analysis of quality features.....................................................................328 Summary............................................................................................................330 Exercises.............................................................................................................330 Index 335
Description: