Object-Oriented Construction Handbook This page intentionally left blank Zull-FM.qxd 31/8/04 2:38 PM Page iii Object-Oriented Construction Handbook Developing Application-Oriented Software with the Tools & Materials Approach Heinz Züllighoven IT-Workplace Solutions, Inc., and University of Hamburg, Germany With contributions by as lead authors as co-authors Robert F. Beeger Dirk Bäumer Wolf-Gideon Bleek Petra Becker-Pechau Guido Gryczan Holger Breitling Carola Lilienthal Ute Bürkle Martin Lippert Rolf Knoll Stefan Roock Anita Krabbel Wolf Siberski Daniel Megert Thomas Slotos Dirk Riehle Dirk Weske Axel Schmolitzky Ingrid Wetzel Wolfgang Strunk Henning Wolf AMSTERDAM (cid:2) BOSTON (cid:2) HEIDELBERG (cid:2) LONDON (cid:2) NEW YORK (cid:2) OXFORD HEIDELBERG PARIS (cid:2) SAN DIEGO (cid:2) SAN FRANCISCO (cid:2) SINGAPORE (cid:2) SYDNEY (cid:2) TOKYO MORGAN KAUFMANN PUBLISHERS IS AN IMPRINT OF ELSEVIER Copublished by Morgan Kaufmann Publishers and dpunkt.verlag Morgan Kaufmann Publishers dpunkt.verlag Senior Editor: Tim Cox Senior Editor: Christa Preisendanz Publishing Services Manager: Simon Crump Project Manager: Brandy Palacios Editorial Assistant: Richard Camp Cover Design: Frances Baca Design Cover Image: Montage of tools in boxes, courtesy of Digital Vision and Getty Images Text Design: Julio Esperas Composition: Newgen Imaging Systems Technical Illustration: RDC Tech Translators: Angelika Shafir, Bob Bach Copyeditor: Harbour Fraser Hodder Proofreader: Graphic World Inc. Indexer: Graphic World Inc. Interior printer: The Maple-Vail Book Manufacturing Group Cover printer: Phoenix Color Corp. Morgan Kaufmann Publishers is an imprint of Elsevier. 500 Sansome Street, Suite 400, San Francisco, CA 94111 Available in Germany, Austria, and Switzerland from dpunkt.verlag Ringstraße 19B 69115 Heidelberg, Germany http://www.dpunkt.de © 2005 by Elsevier Inc. (USA) and dpunkt.verlag (Germany) Designations used by companies to distinguish their products are often claimed as trademarks or registered trademarks. In all instances in which Morgan Kaufmann Publishers is aware of a claim, the product names appear in initial capital or all capital letters. Readers, however, should contact the appropriate companies for more complete information regarding trademarks and registration. 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, scanning, or otherwise-without prior written permission of the publisher. Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone: (+44) 1865 843830, fax: (+44) 1865 853333, e-mail: [email protected]. You may also complete your request on-line via the Elsevier home-page (http://elsevier.com) by selecting “Customer Support” and then “Obtaining Permissions.” Library of Congress Cataloging-in-Publication Data Application submitted MK ISBN: 1-55860-687-4 dpunkt ISBN: 3-89864-254-2 This book is printed on acid-free paper. For information on all Morgan Kaufmann publications, visit our website at www.mkp.com. Printed in the United States of America 04 05 06 07 08 5 4 3 2 1 CONTENTS Preface xvii 1 Introduction 1.1 APPLICATION ORIENTATION — THE SUBJECT OF THIS BOOK 1 1.1.1 Motivation 1 1.1.2 Structure of This Book 3 1.2 THE TOOLS & MATERIALS APPROACH (T&M) 4 1.2.1 The T&M Approach in a Nutshell 4 1.2.2 T&M As a Method 8 1.3 PROJECTS BEHIND THIS BOOK 9 1.3.1 The Scope of the T&M Projects 10 1.4 THE EQUIPMENT MANAGEMENT SYSTEM EXAMPLE 14 1.5 REFERENCES 15 2 The T&M Object Metamodel 2.1 THE OBJECT METAMODEL 17 2.1.1 Introduction 17 2.1.2 Definition: The Object Metamodel 18 2.1.3 Context: What’s the Purpose of an Object Metamodel? 18 2.1.4 Context: A Classification of Programming Languages 19 2.1.5 The Object Metamodel and the Software Model 20 2.1.6 Definition: Objects 20 2.1.7 Discussion: Object Identity 24 2.1.8 T&M Design: Structuring an Interface 25 2.1.9 Definition: Classes 25 2.1.10 Discussion: Generic Operations 27 2.1.11 T&M Design: Generic Operations 27 2.1.12 Discussion: The Object Life Cycle 28 2.1.13 T&M Design: The Object Life Cycle 29 vi CONTENTS 2.1.14 Definition: Inheritance 30 2.1.15 Discussion: Inheritance 30 2.1.16 T&M Design: Inheritance 31 2.1.17 Discussion: Role Relationships as an Alternative to Inheritance 32 2.1.18 Definition: Use Relationships 32 2.1.19 Discussion: Use Relationships 33 2.1.20 Definition: Polymorphism 33 2.1.21 Definition: Abstract Classes 34 2.1.22 Discussion: Specification and Implementation 35 2.1.23 Definition: Loose Coupling 35 2.1.24 Discussion: Loose Coupling 36 2.2 MODULARIZATION 36 2.2.1 Introduction 36 2.2.2 Context: Modules and Object Orientation 36 2.2.3 Definition: Principles of Object-Oriented Modularization 37 2.3 THE CONTRACT MODEL 38 2.3.1 Introduction 38 2.3.2 Definition: Contract Model 38 2.3.3 Discussion: The Contract Model 39 2.3.4 Context: The Contract Model and Abstract Data Types 39 2.3.5 T&M Design: The Contract Model 40 2.4 TYPES 40 2.4.1 Introduction 40 2.4.2 Definition: Types 41 2.4.3 Context: The Theoretical Concept of Types 41 2.4.4 Discussion: Types 42 2.5 CLASSES AND TYPES 43 2.5.1 Introduction 43 2.5.2 Classes in Your Design 43 2.5.3 Differences between Types and Classes 43 2.5.4 Discussion: Classes versus Types 44 2.5.5 Background: Programming Languages and Types 44 2.5.6 T&M Design: Classes and Types 45 2.6 VALUES AND OBJECTS 45 2.6.1 Introduction 45 2.6.2 Characteristics of Values and Objects 46 2.6.3 Using Values 47 2.6.4 Context: Values and Objects in Programming Languages 48 2.6.5 Definition: Domain Values 49 CONTENTS vii 2.6.6 T&M Design: Domain Values 49 2.6.7 Implementing Domain Values 49 2.7 METAOBJECT PROTOCOLS 50 2.7.1 Introduction 50 2.7.2 Motivation for a Metaobject Protocol 51 2.7.3 Definition: Metaobject Protocol (MOP) 51 2.7.4 Representing Your Application Model 51 2.7.5 Representing Your Runtime System 53 2.8 REFERENCES 55 3 Guiding Metaphors and Design Metaphors 3.1 INTRODUCTION 57 3.2 DESIGNING APPLICATION SOFTWARE 57 3.2.1 Definition: The Usage Model 58 3.2.2 Background: Methodology Books versus Design Guidelines 58 3.3 GUIDING METAPHORS FOR APPLICATION SOFTWARE 59 3.3.1 Background: Guiding Metaphors in Software Development 60 3.3.2 The “Object Worlds” Guiding Metaphor 60 3.3.3 The Direct Manipulation Guiding Metaphor 61 3.3.4 Discussion: Guiding Metaphor of Direct Manipulation 61 3.3.5 The Guiding Metaphor of the Factory 62 3.3.6 Discussion: The Factory Guiding Metaphor 62 3.4 DESIGN METAPHORS 63 3.4.1 Definition: Metaphors 63 3.5 T&M GUIDING METAPHORS AND DESIGN METAPHORS 64 3.5.1 A T&M Guiding Metaphor: The Expert Workplace 64 3.5.2 Background: The Supportive View 65 3.5.3 Discussion: Metaphors and Patterns 66 3.5.4 Definition: A Tool 67 3.5.5 The Tool as a Design Metaphor 67 3.5.6 T&M Design: Software Tools 67 3.5.7 Definition: Material 68 3.5.8 Material as a Design Metaphor 68 3.5.9 T&M Design: Software Materials 68 3.5.10 Definition: The Work Environment 69 viii CONTENTS 3.5.11 The Work Environment as a Design Metaphor 69 3.5.12 T&M Design: The Work Environment 70 3.5.13 Definition: Automatons 70 3.5.14 The Automaton as a Design Metaphor 70 3.5.15 T&M Design: Software Automatons 71 3.5.16 Definition: The Container 71 3.5.17 The Container as a Design Metaphor 72 3.5.18 T&M Design: Containers 72 3.5.19 Discussion: Design Metaphors 73 3.6 WORKPLACE TYPES 73 3.6.1 Definition: Workplace Types 74 3.6.2 T&M Design: The Expert Workplace Type 74 3.6.3 T&M Design: The Functional Workplace Type 74 3.6.4 T&M Design: The Back-Office Workplace Type 75 3.6.5 T&M Design: The Electronic Commerce Frontend Workplace Type 76 3.7 REFERENCES 77 4 Patterns, Frameworks, and Components 4.1 INTRODUCTION 79 4.2 BACKGROUND: PATTERNS, FRAMEWORKS, AND COMPONENTS 80 4.3 PATTERNS 80 4.3.1 Definition: Patterns 80 4.3.2 The Characteristics of a Pattern 81 4.3.3 A Taxonomy of T&M Patterns 83 4.3.4 Conceptual Patterns 83 4.3.5 Design Patterns 84 4.3.6 Programming Patterns 85 4.3.7 T&M Design: Design Patterns 86 4.3.8 T&M Design: Models, Metaphors, and Patterns 86 4.3.9 Background: Pattern Form 88 4.3.10 T&M Design: Pattern Form 88 4.3.11 Pattern Collections 89 4.4 FRAMEWORKS 90 4.4.1 Background: Class Libraries 90 4.4.2 Definition: Frameworks 91 4.4.3 Application Frameworks 91 4.4.4 Black-Box and White-Box Frameworks 92 4.4.5 Connectors between Frameworks 94 4.4.6 JWAM Framework: Layered Framework Architecture 95 CONTENTS ix 4.5 COMPONENTS 96 4.5.1 Background: Software Components 96 4.5.2 Definition: Components 97 4.5.3 Current Component Products 98 4.5.4 Components and Frameworks 98 4.6 REFERENCES 99 5 Application-Oriented Software Development 5.1 INTRODUCTION 101 5.2 APPLICATION-ORIENTED SOFTWARE 101 5.2.1 Application Software 102 5.2.2 Definition: Application Orientation 102 5.2.3 Background: Application Orientation 103 5.2.4 Usage Quality 104 5.2.5 T&M Design: Structural Similarity 104 5.3 THE DEVELOPMENT PROCESS 105 5.3.1 Definition: Software Development 105 5.3.2 The Application-Oriented Development Process 105 5.3.3 Discussion: The Development Process 106 5.3.4 The Author-Critic Cycle 107 5.3.5 Discussion: The Author-Critic Cycle 107 5.3.6 Evolutionary System Development 108 5.3.7 Documentation in Software Development 108 5.3.8 Discussion: Documentation 109 5.3.9 Application-Oriented Development Documents 109 5.3.10 Discussion: Application-Oriented Document Types 110 5.3.11 T&M Design: Application-Oriented Document Types 111 5.3.12 Discussion: T&M Document Types 113 5.3.13 Project Documents 113 5.3.14 Documentation Guidelines 114 5.4 REFERENCES 115 6 Software Development as a Modeling Process 6.1 INTRODUCTION 117 6.2 A SIMPLIFIED SOFTWARE DEVELOPMENT MODEL 117 6.2.1 Discussion: A Descriptive Software Development Model 118 6.3 THE APPLICATION DOMAIN 119 6.3.1 Definition: Application Domain 119 6.3.2 Discussion: Analyzing the Application Domain 119
Description: