■ INDEX
PEAR and, 129
PHP and, 129
Portland Pattern Repository, 126
programming-related web sites, list of, 464
promoting good design, 128
recognizing and contextualizing problems,
125
recursive descent parser, 124
reference articles and books, list of, 463
representing best practices in an object-
oriented context, 128
rule of three, 127
Strategy pattern, 135
unnecessary or inappropriate use of
patterns, 143
using tried-and-tested techniques, 127
Vlissides, John, 125
working with a pattern catalog, 143
See also object-oriented design
destructor methods, 62
detach(), 204–205, 209
Dialekt package
contents tag, code listing, 337
Dialekt.php, 338
directory and file structure, 337
Diamond class, 182
die(), 46
dir attribute, 417
dir element, 336
DIRECTORY_SEPARATOR character, 80
discard(), 476
DocBlock comments, 350, 352
doCreateObject(), 278–279, 286–287, 296
documentation
adding source-level documentation during
coding, 348
improving code clarity and transparency,
320
measuring the true cost of undocumented
code, 347
megaquiz project, documenting using
phpDocumentor, 349
phpDocumentor, 321, 348
problems caused by undocumented code,
321
See also phpDocumentor
doExecute(), 243, 256
doInsert(), 277–279
doInterpret(), 194
DokuWiki, 460
dollar sign as the command prompt, 362, 367
Domain class, 294
Domain Model pattern, 222
advantages and disadvantages of, 272
extracting and embodying the participants
and process of a system, 269
implementing, 270
markDirty(), 272
overview of, 269
separating the model from the database,
271
Venue class, code listing, 271
Domain Object Factory
addToMap(), 300
altered Collection implementation, code
listing, 300
createObject(), 299–300
decoupling database row data from object
field data, 300
getCollection(), 300
getFromMap(), 300
implementing, 299
Nock, Clifton, 298
parallel hierarchy of classes, 299
PersistenceFactory class, illustration of, 301
using for testing, 300
VenueObjectFactory class, 299
Domain Specific Language (DSL), 189
DomainObject class, 49–50
DomainObject class, code listing, 284, 293
DomainObjectAssembler class, code listing, 311
doScan(), 476–478
doStatement(), 267–268
doUpdate(), 206
■ E
eatWhiteSpace(), 477
EBNF notation, 482, 484
echo element, 423
Echo task, 421
email element, 446
Employee class, 146, 148
encapsulation
benefits of, 108
definition of, 107