CONTENTS
Preface xi
Chapter 1 Introduction 1
1.1 My gosh, what happened? 1
1.2 Large projects 3
1.3 The legacy of structured programming 5
1.4 Levelization for the procedural paradigm 14
1.5 The program as a record of an idea 19
1.6 The human brain does not like general graphs 21
Chapter 2 Class Dependency 25
2.1 Networks in object-oriented programming 25
2.2 Free floating functions 33
2.3 Dependency among classes 38
2.4 Levelizing classes 42
2.5 Patterns and pattern classes 48
2.6 More on pattern classes 61
Chapter 3 Transparent Features 81
3.1 Arrays or lists 81
3.2 Lists or rings 88
3.3 Invisible links 94
Chapter 4 Implementing Patterns 109
4.1 Indirect links 109
4.2 Templates 119
4.3 Instances of a list 124
4.4 A more complex example 129
4.5 Generating Part B automatically 139
4.6 Members instead of inheritance 148
Chapter 5 Pattern Libraries 155
5.1 Existing class libraries 155
5.2 Drawbacks of the existing class libraries 161
5.3 A more sophisticated code generator 168
5.4 A pattern style library 179
5.5 Internal data structures as a database 200
Chapter 6 Concepts and Frameworks 213
6.1 Software architects versus programmers 213
6.2 Application exercises 216
6.3 Comparing two library styles 225
6.4 Comparing Smalltalk and C++ 251
6.5 Object-oriented design methodologies 267
6.6 Frameworks 268
6.7 Reverse frameworks 274
Chapter 7 Abstract Data Types 279
7.1 Concrete and abstract data types 279
7.2 Value of the architecture 290
7.3 Another alternative 306
Chapter 8 Persistence 315
8.1 Types of persistence 316
8.2 Hidden pointers 320
8.3 Experiment yourself 326
8.4 Problem with pointers 327
8.5 Generating a mask 331
8.6 Relational pointers 335
8.7 Persistence based on a common base class 339
8.8 Persistence based on an external class 348
8.9 Run-time type information 354
8.10 Collecting all objects 363
8.11 Writing objects to disk 367
8.12 Reading objects from disk 371
8.13 Converting pointers 374
8.14 Saving in binary format 378
8.15 Memory blasting 379
8.16 Interrupting the virtual paging system 386
Chapter 9 Case Studies 393
Case 1: Integrating several CAE packages (by Hans Gethoffer) 393
Case 2: Incremental development of large C++ project (by Naresh Bhatia) 394
Case 3: Troubles with a String class on a large project (by Rob Bartel) 395
Case 4: Avoiding cyclic dependencies on a large project (by John S.Lakos) 397
Case 5: Universal interface to commercial CAD systems (by Mark Bales) 402
Case 6: Adding persistence to a large existing project (by Brad Hutchings) 403
References 407
Index 413
|