Lean Architecture for Agile Software Development
Total Page:16
File Type:pdf, Size:1020Kb
LEAN ARCHITECTURE FOR AGILE SOFTWARE DEVELOPMENT This manuscript is Copyright ©2009 by James O. Coplien and Gertrud Bjørnvig. All rights reserved. No portion of this manuscript may be copied or repro- duced in any form nor by any means, whether elec- tronic, reprographic, or photographic, without prior written consent of the authors and all pertinent legal stakeholders. For a printable copy of this draft, contact Jim Co- plien at [email protected] Draft of August 2, 2009 ii LEAN ARCHITECTURE FOR AGILE SOFTWARE DEVELOPMENT James O. Coplien Gertrud Bjørnvig JOHN WILEY AND SONS Chichester • New York • Brisbane • Toronto • Singapore Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book and Wiley was aware of a trademark claim, the designations have been pointed in initial caps or all caps. The authors and publishers have taken care in the preparation of this book, but make not expressed or implied warranty of any kind and assume no responsibility for errors or omis- sions. No liability is assumed for incidental or consequential damages in connection with or arising out of the use of the information or programs contained herein. Library of Congress Cataloging-in-Publication Data Coplien, James O. and Gertrud Bjørnvig Lean Software Architecture and Agile Production / James O. Coplien and Gertrud Bjørnvig. p. cm. Includes bibliographical references and index ISBN 0-XXX-YYYYY-1 C++ (Computer program language) I. Title QA7673C153C675 2010 05. 13’3-dcl21 08-36336 CIP Copyright ©2010 James O. Coplien and Gertrud Bjørnvig. All rights reserved. No part of this publication may be reproduced, stored in a retrieval sys- tem, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United Kingdom. ISBN 0-XXX-YYYYY-1 Text printed on recycled and acid-free paper 1 2 3 4 5 6 7 8 9 0 First printing, MONTH YEAR iv Table of Contents Table of Contents ________________________________________________v Preface_______________________________________________________ xiii CHAPTER 1 Introduction ____________________________________1 1.1 The touchstones: Lean and Agile _______________________________ 1 1.2 Lean Architecture____________________________________________ 4 1.3 Agile Production _____________________________________________ 7 1.4 The Book in a Very Small Nutshell ______________________________ 8 1.5 Lean and Agile: Contrasting and Complementary ________________ 10 1.5.1 Architecture in the Value Stream ____________________________________ 12 1.5.2 The Lean Secret _________________________________________________ 13 1.6 Lost Practices ______________________________________________ 17 1.6.1 Architecture ____________________________________________________ 17 1.6.2 Requirements Dependency Management______________________________ 18 1.6.3 Foundations for Usability__________________________________________ 18 1.6.4 Documentation __________________________________________________ 18 1.6.5 Common sense, thinking, and caring _________________________________ 21 1.7 What this book is not about ___________________________________ 23 1.8 Agile, Lean— oh, yeah, and Scrum and methodologies and such ____ 24 CHAPTER 2 Agile Production in a Nutshell_____________________27 2.1 Engage the stakeholders______________________________________ 28 2.2 Define the problem __________________________________________ 30 2.3 Focusing on what the system is: the foundations of form ___________ 31 2.4 Focusing on what the system does: the system lifeblood____________ 33 2.5 Design and Code ____________________________________________ 35 2.6 Countdown: 3, 2, 1… ________________________________________ 36 CHAPTER 3 Stakeholder Engagement _________________________37 3.1 The key stakeholders ________________________________________ 40 3.1.1 End Users ______________________________________________________ 43 Psyching out the end users ________________________________________________ 44 Don’t forget behavior ____________________________________________________ 46 The End User landscape __________________________________________________ 47 3.1.2 The Business ___________________________________________________ 48 A special note for Managers_______________________________________________ 49 3.1.3 Customers______________________________________________________ 50 … as contrasted with end users ____________________________________________ 50 “Customers” in the value stream ___________________________________________ 53 3.1.4 Domain Experts _________________________________________________ 53 No ivory tower architects _________________________________________________ 54 Experts in both problem and solution domains ________________________________ 55 3.1.5 Developers and Testers ___________________________________________ 56 3.2 Process elements of stakeholder engagement_____________________ 58 3.2.1 Getting started __________________________________________________ 59 3.2.2 Customer Engagement ____________________________________________ 61 3.2.3 Pipelining ______________________________________________________ 62 3.3 The Network of Stakeholders: Trimming Wasted Time____________ 64 3.3.1 Stovepipe versus Swarm __________________________________________ 64 3.3.2 The first thing you build___________________________________________ 68 3.3.3 Keep the Team Together __________________________________________ 69 CHAPTER 4 Problem Definition ______________________________71 vi 4.1 What’s Agile about problem definitions?________________________ 72 4.2 What’s Lean about problem definitions? ________________________ 73 4.3 Good problem definitions ____________________________________ 74 4.4 Problems and solutions ______________________________________ 77 4.5 The process around problem definitions ________________________ 78 4.5.1 Value the hunt over the prize _______________________________________ 78 4.5.2 Problem Ownership ______________________________________________ 79 4.5.3 Creeping featurism _______________________________________________ 81 4.6 Problem definitions, goals, charters, visions, and objectives ________ 82 4.7 Documentation? ____________________________________________ 83 CHAPTER 5 What the System Is: Lean Architecture ______________85 5.1 Some Surprises about Architecture ____________________________ 87 5.1.1 What’s Lean about this?___________________________________________ 88 The place of thought_____________________________________________________ 89 Failure-proof constraints or “poka-yoke”_____________________________________ 89 The Lean mantras of conservation, consistency and focus________________________ 90 5.1.2 What’s Agile about architecture?____________________________________ 91 It’s all about individuals and interactions_____________________________________ 91 Past excesses___________________________________________________________ 92 Dispelling a couple of Agile myths _________________________________________ 93 5.2 The first design step: Partitioning______________________________ 95 5.2.1 The first partition: domain form versus behavioral form __________________ 96 5.2.2 The second partitioning: Conway’s Law ______________________________ 97 5.2.3 The real complexity of partitioning _________________________________ 100 5.2.4 Dimensions of complexity ________________________________________ 101 5.2.5 Domains: a particularly interesting partitioning________________________ 102 5.2.6 Back to dimensions of complexity __________________________________ 104 5.2.7 Wrap-up on Conway’s Law _______________________________________ 108 5.3 The second design step: selecting a design style__________________ 109 5.3.1 Contrasting structuring with partitioning _____________________________ 110 5.3.2 The fundamentals of style: commonality and variation __________________ 112 5.3.3 Starting with tacit commonality and variation _________________________ 114 5.3.4 Commonality, variation and scope__________________________________ 117 5.3.5 Making the commonalities and variations explicit______________________ 120 Next steps ____________________________________________________________ 124 vii 5.3.6 The most common style: object orientation ___________________________ 124 Just what is object orientation?____________________________________________ 125 5.3.7 Other styles within the Von Neumann world__________________________ 128 5.3.8 Domain-specific languages and application generators __________________ 131 The state of the art in DSLs ______________________________________________ 132 DSLs’ place in architecture ______________________________________________ 133 5.3.9 Codified Forms: Pattern Languages_________________________________ 134 5.3.10 Third-party software and other paradigms _________________________ 136 5.4 The rough framing: Delivering the First Code __________________ 139 5.4.1 Abstract Base Classes ___________________________________________ 140 5.4.2 Pre-conditions and post-conditions _________________________________ 144 5.4.3 Algorithmic scaling: the opposite of static assertions ___________________ 147 5.4.4 Form versus accessible services____________________________________ 147 5.4.5 Scaffolding ____________________________________________________ 147 5.4.6 Testing the architecture __________________________________________ 148 Usability testing _______________________________________________________ 148 Architecture testing ____________________________________________________