logo资料库

Object Thinking 无水印原版pdf.pdf

第1页 / 共369页
第2页 / 共369页
第3页 / 共369页
第4页 / 共369页
第5页 / 共369页
第6页 / 共369页
第7页 / 共369页
第8页 / 共369页
资料共369页,剩余部分请下载后查看
Cover
Copyright
Table of Contents
Preface
A Different (and Possibly Controversial) Kind of Software Book
Paths and Destinations
Who Should Read This Book
How This Book Is Organized
Introduction
Curiosities
The "People Issue"
The Need for Better Developers
Producing Better Developers
Object Thinking
XP and Object Thinking
1: Object Thinking
Observing the Object Difference
Object Thinking = Think Like an Object
Problem = Solution
Object Thinking and Agile Development Practices
Values
Selected Practices
Thinking Is Key
Software Development Is a Cultural Activity
Onward
2: Philosophical Context
Philosophy Made Manifest—Dueling Languages
SIMULA
C++
Smalltalk
Formalism and Hermeneutics
Postmodern Critiques
3: From Philosophy to Culture
Four Presuppositions
One: Everything is an object.
Two: Simulation of a problem domain drives object discovery and definition.
Three: Objects must be composable.
Four: Distributed cooperation and communication must replace hierarchical centralized control as an organizational paradigm.
Object Principles—Software Principles
Cooperating Cultures
4: Metaphor: Bridge to the Unfamiliar
The Lego Brick Metaphor
The Object-as-Person Metaphor
Software as Theater; Programmers as Directors
Ants, Not Autocrats
Two Human-Derived Metaphors
Inheritance
Responsibility
Thinking Like an Object
5: Vocabulary: Words to Think With
Essential Terms
Object
Responsibility
Message
Interface (Protocol)
Extension Terms
Collaboration and Collaborator
Class
Class Hierarchy (Library)
Abstract/Concrete
Inheritance
Delegation
Polymorphism
Encapsulation
Component
Framework
Pattern
Implementation Terms
Method
Variable
Late/Dynamic Binding
Auxiliary Concepts
Domain
Business Requirement
Business Process Reengineering
Application
6: Method, Process, and Models
Two Decades of Object Methodology
Purpose and Use of Method
A Syncretic Approach
Models
Semantic Net
Object Cubes
Interaction Diagram
Static Relation Diagram
Object State Chart
7: Discovery
Domain Understanding
Domain Anthropology
Object Definition
Heuristics
8: Thinking Toward Design
Object Internals
Knowledge Required
Message Protocol
Message Contracts
State Change Notification
Object Appearance
Occasions Requiring an Appearance
Object State, Object Constraints
9: All the World's a Stage
Static Relationships
Is-a-Kind-of Relationship
Collaborates-with Relationship
Situational Relationship
Dynamic Relationships
Scripts
Event Dispatching
Constraints
Self-Evaluating Rules
Implementation
Methods
Knowledge Maintenance Objects
Development at the Speed of Thought
10: Wrapping Up
Vexations
The Impedance Mismatch Problem
A Problem with GUIs
Extensions
Frameworks
Object-Based Evocative Architecture
Provocation—The Future of Objects
Bibliography
Index
A
B, C
D
E, F
G, H
I, J, K, L, M
N, O
P
Q, R
S
T, U, V
W, X, Y
About the Author
PUBLISHED BY Microsoft Press A Division of Microsoft Corporation One Microsoft Way Redmond, Washington 98052-6399 Copyright © 2004 by David West All rights reserved. No part of the contents of this book may be reproduced or transmitted in any form or by any means without the written permission of the publisher. Library of Congress Cataloging-in-Publication Data pending. Printed and bound in the United States of America. 1 2 3 4 5 6 7 8 9 QWE 8 7 6 5 4 3 Distributed in Canada by H.B. Fenn and Company Ltd. A CIP catalogue record for this book is available from the British Library. Microsoft Press books are available through booksellers and distributors worldwide. For further information about international editions, contact your local Microsoft Corporation office or contact Microsoft Press International directly at fax (425) 936-7329. Visit our Web site at www.microsoft.com/mspress. Send comments to mspinput@microsoft.com. Microsoft, Visual Basic, Visual C++, Visual C#, Visual Studio, and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Other product and company names mentioned herein may be the trademarks of their respective owners. The example companies, organizations, products, domain names, e-mail addresses, logos, people, places, and events depicted herein are fictitious. No association with any real company, organization, product, domain name, e-mail address, logo, person, place, or event is intended or should be inferred. This book expresses the author’s views and opinions. The information contained in this book is provided without any express, statutory, or implied warranties. Neither the authors, Microsoft Corporation, nor its resellers or distributors will be held liable for any damages caused or alleged to be caused either directly or indirectly by this book. Acquisitions Editor: Robin Van Steenburgh and Linda Engelman Project Editor: Denise Bankaitis and Devon Musgrave Indexer: Shawn Peck Body Part No. X10-25675
Table of Contents Acknowledgments Preface Introduction Object Thinking 1 Observing the Object Difference Object Thinking = Think Like an Object Problem = Solution Object Thinking and Agile Development Practices Values Selected Practices Thinking Is Key Software Development Is a Cultural Activity Onward 2 Philosophical Context Philosophy Made Manifest—Dueling Languages SIMULA C++ Smalltalk Formalism and Hermeneutics Postmodern Critiques 3 From Philosophy to Culture Four Presuppositions One: Everything is an object. Two: Simulation of a problem domain drives object discovery and definition. Three: Objects must be composable. Four: Distributed cooperation and communication must replace hierarchical centralized control as an organizational paradigm. Object Principles—Software Principles Cooperating Cultures vii ix xvii 1 2 12 16 18 19 22 24 25 30 33 36 38 41 43 48 58 63 66 66 71 78 81 83 87 iii
iv Table of Contents 4 Metaphor: Bridge to the Unfamiliar The Lego Brick Metaphor The Object-as-Person Metaphor Software as Theater; Programmers as Directors Ants, Not Autocrats Two Human-Derived Metaphors Inheritance Responsibility Thinking Like an Object 5 Vocabulary: Words to Think With Essential Terms Object Responsibility Message Interface (Protocol) Extension Terms Collaboration and Collaborator Class Class Hierarchy (Library) Abstract/Concrete Inheritance Delegation Polymorphism Encapsulation Component Framework Pattern Implementation Terms Method Variable Late/Dynamic Binding 91 96 101 108 112 113 114 115 116 117 121 121 123 128 129 130 130 130 132 133 133 139 140 141 142 142 143 145 145 145 146
Auxiliary Concepts Domain Business Requirement Business Process Reengineering Application 6 Method, Process, and Models Two Decades of Object Methodology Purpose and Use of Method A Syncretic Approach Models Semantic Net Object Cubes Interaction Diagram Static Relation Diagram Object State Chart 7 Discovery Domain Understanding Domain Anthropology Object Definition Heuristics 8 Thinking Toward Design Object Internals Knowledge Required Message Protocol Message Contracts State Change Notification Object Appearance Occasions Requiring an Appearance Object State, Object Constraints Table of Contents v 147 147 149 149 149 151 153 159 164 168 169 173 175 178 181 183 185 186 200 212 219 220 221 227 234 236 240 241 245
vi Table of Contents 9 All the World’s a Stage Static Relationships Is-a-Kind-of Relationship Collaborates-with Relationship Situational Relationship Dynamic Relationships Scripts Event Dispatching Constraints Self-Evaluating Rules Implementation Methods Knowledge Maintenance Objects Development at the Speed of Thought 10 Wrapping Up Vexations The Impedance Mismatch Problem A Problem with GUIs Extensions Frameworks Object-Based Evocative Architecture Provocation—The Future of Objects Bibliography Index 247 251 251 254 256 273 274 277 281 282 286 287 288 291 293 294 294 297 299 299 302 305 309 321
Acknowledgments One name appears on the cover as author of this book, hiding the fact that every book is a collaborative effort involving scores of contributors. Although it is impossible to acknowledge and thank everyone who played a role, I can and must name some individuals. Each is owed my personal thanks, and each stands as a proxy for many others whom I acknowledge in my mind and heart. Mary—without whom this would never have been done. My muse, my friend, my spouse of twenty-one years. Maurine, Bob, Sara, Ryan, and Kathleen—my family, whose support was required and freely given. Kevin—the best programmer with whom I have ever worked. You proved, sometimes after a lot of discussion as to why it was impossible, that my crazy ideas could be implemented. Tom, Pam, Don, Dion, Julie, Kyle, Dave, Steve, and J.P.—our initial con- tact was as student and professor, but you became colleagues and friends and represent the hundreds of St. Thomas alumni who helped shape object thinking and then applied it in the real world with notable success. Tom and Ken—your technical review, insightful comments, correction of errors, and honest advice were invaluable. This would not have been as useful a book without your assistance. Linda, Devon, Denise, Robin, Shawn, Joel, Sandi, and Elizabeth—the editors and staff at Microsoft Press who smoothly dealt with all the technical aspects of getting a book out the door (including an author with deadline issues). An author could not have found a friendlier, more helpful, or more professional group of editors and craftspeople with whom to work. vii
分享到:
收藏