abstract classes
Contact Manager, 56
support, 29
abstract functions, 25
abstraction, factory method design pattern and, 179
database abstraction and, 182
AbstractWidget class, observer pattern and, 81
academic skills, career as developer, 567
accessor methods, 10 11
account manager (Widget World project), selecting, 387
activation, objects, 45
activity diagrams (UML), 42
actors, case diagrams, 33
addItem() method
Collection class, 104 105
obj parameter, 103
agenda, project recipient (Widget World), 372 373
algorithms, bottleneck location, 603
Apache installation, 616 617
testing, 617 619
Application class
Builder pattern, 96 97
Facade pattern and, 93
applications
event-driven, designing, 189 191
Web, MVC and, 243
arrays, Smarty templates
associative, 269 270
linear, 269
multidimensional, 273 274
artificial intelligence, FSMs and, 354
associations, relationships, class diagrams (UML), 37
associative arrays, Smarty templates, 269 270
attributes of class diagrams (UML), 35
authentication class sessions, session management connection to database, 316 317
BeginBuildNumber() method, 351 352
bi-directional navigability, associations (UML class diagrams), 37
binary files, version control and, 581
bindings/operation in WSDL documents, 230
bottlenecks, 599 600
avoiding, 605 606
locating
algorithms, 603
database queries, 602 603
types, differences, 600 601
branching, version control and, 580 581
budget (Widget World project), 378 379
bugs (Widget World project), change management and, 403 404
build phase (Widget World project), 398
Builder pattern, 93 97
implementation, 94 96
BuildNumber() method, 352
business requirements (Widget World), 375 376
callbacks, lazy instantiation, 108
implementation, 110 112
call_user_func, Collection class, 108 110
capturing output, Smarty templates, 274 275
career as developer
academic skills, 567
community skills, 567
soft skills, 566 567
Web development skills, 566
case diagrams, UML, 32 35
CGI (Common Gateway Interface), 301
change management (Widget World project) bugs reported, 403 404
disputes, difference in interpretation and, 403
specification revisions, 402 403
after sign-off, 403
CIR (Committed Information Rate), systems architecture design, 409 411
monthly transfer calculation, 411
rack space, 411
class diagrams, UML
attributes, 35
domain modeling, 35 36
implementation, 39 42
operations, 35
relationships, 36 42
associations, 37
composites, 38 39
generalizations, 37 38
realizations, 37 38
class keyword, 7
class.Dispatcher.php class, 191 193
classes. See also subclasses
abstract support, 29
AbstractWidget observer pattern and, 81
Collection, 101
design, 102 103
CollectionIterator, 101, 127 129
Communication, 285 286
Contact Manager, 50
contact type classes, Contact Manager, 56 60
creating, 7
database class, 162 164
DataManager, Contact Manager, 60 62
Debugger, 217 220
declaration, object instantiation and, 7
definition, 5
EmailRecipient, 285 286
Entity, Contact Manager, 62 70
FSM, 348 350
GenericObject , 133, 134 156
GenericObjectCollection, 146 156
hierarchy, communication as, 281 286
Individual, Contact Manager, 62 70
inheritance and, 15 19
InterbaseConnection, 185
KeyInUseException, 104
Logger, 203 207
LoggerBackend, 211 212
subclassing, 212 213
methods, 6
adding, 7 8
modularity, 4
Organization, Contact Manager, 62 70
overview, 6
properties, 6
adding, 8 10
PropertyObject, Contact Manager, 54 56
Recipient, 281 282
Request, 249 256
unit testing and
implementation, 332
interfaces, 330
test suite, 331
UserSession, 317
class.Event_Handler.php, 193 194
class.Handler_Edit.php, 195
class.Handler_View.php, 194 195
client interviews, UML requirements gathering, 32
client side designers (Widget World project), selecting, 388
clients
management, reporting and (Widget World project), 544 545
reporting and, 544
role (Widget World project), 389
SOAP
creating, 227 235
exception handling, 234 235
request and response envelopes, 232 234
clone operator, Iterator interface, 130 132
close() function, 25 26
session management, 316 317
code
editing
Komodo, 594 595
Zend Studio Client, 585 587
inspection, Zend Studio Client, 587 588
reusing, 4
inheritance and, 16
Collection class
addItem() method, 104 105
basics, 103 107
call_user_func, 108 110
design, 102 103
getItem() method, 105
improvements, 122
introduction, 101
Iterator interface, clone operator, 130 132
lazy instantiation, 107 116
purpose, 101 102
removeItem() method, 105
setLoadCallback() function, 112 116
uses, 106 107, 116 122
CollectionIterator class, 101, 125, 127 129
comments, version control and, 581
commercial terms (Widget World), 380
communication, 277
characteristics of communications, 280
as class hierarchy, 281
Communication class, 285 286
EmailRecipient class, 282 285
Recipient class, 281 282
e-mail, 286 298
EmailCommunication class, 287 290
Smarty templates, 296 298
e-mail-to-fax gateways, 299
reasons
information, 279
notification, 278
validation, 279 280
recipients, 281
SMS text messaging, 298 299
subclasses, 298
types, 280 281
Communication class, 285 286
community skills, career as developer, 567
Component abstract class, composite pattern and, 74
component diagrams, 46 47
Composite objects, 74
composite pattern, 73 74
considerations, 79 80
implementation, 75 79
composites, UML, 38 39
concurrent versioning, 570 572
conflicts, 572 574
exclusive versioning comparison, 570 572
conditionals in Smarty templates, 270
Config class, PEAR, 357 358
writing configuration files, 358
XML file parsing, 358
configuration
database abstraction layers, 158
Mantis, 522 523
runtime, Smarty templates, 273
configuration files
best practices, 358 359
custom
INI files, 355 356
INI files, parsing, 356 357
PHP, 354 355
XML, 355
FSMs, 353 354
writing, Config class (PEAR), 358
connection string, Logger class
parsing, 208 209
using, 209 211
connections, PEAR DB class, 164 166
constants
increments, 248
MVC mini toolkit, 246 249
Constraint class, MVC mini toolkit, 256 257
ConstraintFailure class, MVC mini toolkit, 257 258
constructors, 11 12
unified, 28
UserSession class, 326 327
Contact Manager, 49 50
abstract classes, 56
contact type classes, 56 60
DataManager class, 60 62
diagrams, 50 54
Entity class, 62 70
Individual class, 62 70
Organization class, 62 70
PropertyObject class, 54 56
relationships, symbols, 52
contact type classes Contact Manager, 56 60
controller (MVC), 243
cookies, session perpetuation, 306 307
creative specification (Widget World project), 397
current() function, 126
customer contacts (Widget World project)
per-week items, 460 468
requirements, 440 441
screen creation, 446 447
tests, 441 446
CVS (Concurrent Versioning System) version control, 578 580
Widget World project, 536 538
data extraction, reporting (Widget World project), 547 549
data handling, PEAR DB class, 167 168
database abstraction layers
building, PEAR DB class and, 170 177
connection, 159
implementation
configuration file, 158
connection, 159
information selection, 159 160
introduction, 157
overview, 158
syntax, 158
Database class
exceptions, 171
instance() method, 176
uses, 177
database class, 162 164
database tables, logging, 214 217
database_fields property, GenericObject class, 143
databases
abstraction, factory interface and, 182
connections
DSN syntax, 164
PEAR DB and, 165 166
delete() method, 160 162
development databases (Widget World project), 534 535
holdups, patching, 603 604
information selection, 159 160
insert() method, 160 162
PEAR DB and, 164
PHP installation, 612
queries, bottleneck location, 602 603
servers, multiple, systems architecture and, 413
session management and, 316 317
database schema, 317 318
Singleton design pattern, 175 177
transactions, 174 175
factory interface and, 184 185
type strings, 165
update() method, 160 162
DataManager class, Contact Manager, 60 62
DataSource object, observer pattern, 83 85
DB::connect() method, 166
Debugger class, 217 220
debugging
bug annotation, Mantis, 529
bug assignment, Mantis, 528 529
bug categories, Mantis, 526 527
bug reporting, Mantis, 528
Komodo and, 595 596
mechanism creation, 217 220
Zend Studio Client and, 588 593
debugPrint() function, 219
decision point, activity diagrams (UML), 42
declaring classes, 7
object instantiation and, 7
Decorator pattern, 86 91
combining, 89 91
considerations, 91
definitions, WSDL documents, 230
delete() method, databases, 160 162
DELETE statement, transactions and, 174
dependencies, component diagrams, 46
deployment diagrams, 46 47
deployment (Widget World project)
development environments
development databases, 534 535
live production environment, 534
live staging environment, 533 534
studio development environment, 531 532
studio staging environment, 532 533
version control
CVS, 536 538
rsync, 539 542
Visual SourceSafe, 538 539
dereferencing, support, 28
design
Collection class, 102 103
event-driven applications, 189 191
reports (Widget World project)
data extraction, 547 549
interface, 546 547
output, 547
systems architecture
CIR, 409 411
connectivity, 409
hosting, 409
maintenance, 414
network, 413
redundancy and resilience, 414
security, 414 415
servers, 411 413
Widget World project, 367
design patterns
Builder, 93 97
composite pattern, 73 80
implementation, 75 79
Decorator pattern, 86 91
Facade, 92 93
factory interface and, 179
factory method, 179
introduction, 73
MVC, 242
observer pattern, 80 86
design phase (Widget World project), 396 397
creative specification, 397
page maps, 397
software architecture, 397 398
destroy() function, session management, 317
Destroy method, GenericObject class, 144
destroying objects, 12 15
_destruct function, 12 15
destructor support, 29
development environments (Widget World project)
development databases, 534 535
live production environment, 534
live staging environment, 533 534
studio development environment, 531 532
studio staging environment, 532 533
diagrams (UML)
activity diagrams, 42
case diagrams, 32 35
class diagrams, 35
component, 46 47
Contact Manager, 50 54
deployment, 46 47
sequence diagrams, 42 45
state diagrams, 45 46
dispatcher classes, event handling, 189
documentation, WSDL documents, 230
documents, WSDL, 230 232
DoEqual() method, 353
domain expert, UML, 32
domain modeling, UML class diagrams, 35 36
DoOperator() method, 352 353
draw() method, 86
DSN (data source name) syntax, database connections and, 164
e-mail-to-fax gateways, 299
EmailCommunication class
sending message, 290 296
Smarty templates, 296 298
test version, 287 290
recipients, 281
edit events, 189
editing code, Zend Studio Client, 585 587
EditPlus, 597
EmailCommunication class
sending message, 290 296
test version, 287 290
EmailRecipient class, 282 285
encapsulation, 5, 27 28
EndBuildNumber() method, 352
Entity class (Contact Manager), 62 70
event-driven applications
designing, 189 191
implementation
class.Dispatcher.php, 191 193
class.Event_Handler.php, 193 194
class.Handler_Edit.php, 195
class.Handler_View.php, 194 195
interface.Handled.php, 193
security, 195 198
event handlers
Handler_Edit, 192 193
Handler_View, 192 193
event handling, 188 189
events
edit events, 189
introduction, 187
exception handling, SOAP clients, 234 235
exceptional notification, 278
expiry times, sessions, 310 311
extends keyword, 16
Facade pattern, 92 93
factory interface, 179
example, 180 184
transactions and, 184 185
factory method design pattern, 179
abstraction and, 179
database abstraction, 182
runtime flexibility and, 179
fault tracking, QA
introduction, 521 522
Mantis
administrator log in, 523 524
bug annotation, 529
bug assignment, 528 529
bug reporting, 528
bug resolution, 529
configuration, 522 523
installation, 522
new projects, 526
project bug categories, 526 527
users, adding, 525 526
users, creating/editing, 524 525
fetch*() methods, PEAR DB, 167 168
file logging, 201 202
file system layout example, 202
files
binary, version control and, 581
configuration
best practices, 358 359
FSMs, 353 354
INI files, 355 356
INI files, parsing, 356 357
PHP, 354 355
XML, 355
management, Zend Studio Client, 585
splitting, MVC and, 244
writing to, 202
financial layer, Widget World project, 366
fopen() method, 202
ForceLoaded method, GenericObject class, 144
framework, PHPUnit testing and, 337
FSM class
installation, 348 349
syntax, 349
default transition, 349 350
instantiation, 349
transitions, setting, 350
FSM (Finite State Machine), 345
artificial intelligence and, 354
configuration files, 353 354
implementation
FSM class, 348 350
theoretical, 348
introduction, 346
RPN (Reverse Polish Notation) Calculator, 346 348
transition tables, 348
functional specification (Widget World project), 394 395
functional testing (Widget World project), 398 399
Functional Test Paper, 519 520
functions
abstract, 25
current(), 126
debugPrint(), 219
_destruct, 12 15
get functions, 10 11
getConnection(),61
GetUserID(), 327 328
GetUserObject(), 327 328
impress(), 327
IsLoggedIn(), 327
key(), 126
next(), 126
PEAR DB class
nextID(), 168 169
query(), 168
quoteSmart(), 170
PHP5 SOAP extension, 226 227
rewind(), 126
set functions, 10 11
Smarty templates, 274
SoapClient object, 225 226
SoapServer object, 226
fwrite() method, 202
gc() function, session management, 317
generalizations, UML, 37 38
GenericObject class
benefits of, 146
capabilities, 134 135
database connectivity, 141 143
implementation
suitability, 135 136
typical, 136 138
introduction, 133
methods, 144
parent class, 138 141
properties, 143
Save method, 145 146
when to use, 134
GenericObjectCollection class, 146 147
id values, 149
implementation
traditional, 147 148
typical, 152 153
_get() overload method, UserSession class, 328
get functions, 10 11
getAll() method, 166
GetAllFields method, GenericObject class, 144
getConnection() function, 61
GetField method, GenericObject class, 144
GetID method, GenericObject class, 144
getInstance() method, 205
getItem() method, 103
Collection class, 105
getIterator() method, 129
getName() accessor method, 11
getOne() method, 166
GetSessionIdentifier() function, 328
GetUserID() function, UserSession class, 327 328
GetUserObject() function, UserSession class, 327 328
grace during failure, QA, 516
Handler_Edit event handler, 192 193
Handler_View event handler, 192 193
handling events. See event handling
handling exceptions. See exception handling
handover (Widget World project), 399
hierarchy, communication as, 281
Communication class, 285 286
EmailRecipient class, 282 285
Recipient class, 281 282
hosting, system architecture and, 406
HTML (Hypertext Markup Language)
.php (control page) and, 245
.phpm (classes) and, 245
report translator scripts and, 561
reporting format (Widget World project), 546
HTTP (Hypertext Transfer Protocol), 302 304
id property, GenericObject class, 143
IDEs (Integrated Development Environments)
EditPlus, 597
Komodo, 593 596
NuSpherePHPEd, 597
PHPCode, 597
PHPEclipse, 597
PHPEdit, 596 597
selection tips, 583 596
Zend Studio Client, 584 593
implementation
callbacks, 110 112
class diagrams (UML), 39 42
classes, unit testing and, 332
composite pattern, 75 79
database abstraction layers
configuration file, 158
connection, 159
event-driven applications
class.Dispatcher.php, 191 193
class.Event_Handler.php, 193 194
class.Handler_Edit.php, 195
class.Handler_View.php, 194 195
interface.Handled.php, 193
FSMs
FSM class, 348 350
theoretical, 348
GenericObject class and, 135 136
typical, 136 138
GenericObjectCollection class
traditional, 147 148
typical, 152 153
lazy instantiation, 107 116
security, 195 198
sessions, basic PHP sessions, 312 315
Widget object, 88 89
importing WSDL documents, 230
impress() function, UserSession class, 327
increments, constants, 248
Individual class (Contact Manager), 62 70
information, user communication and, 279
infrastructure (MVC), 243
inheritance, 15 19
code reuse and, 16
definition, 5
how it works, 23 24
InterbaseConnection class, 185
methods, overriding, 20 22
parent class, functionality, 22 23
INI files
configuration files, custom, 355 356
parsing, 356 357
Config class (PEAR), 358
initialization, objects, 11 12
Initialize method, GenericObject class, 144
insert() method, databases, 160 162
INSERT statement, transactions and, 174
installation
FSM class, 348 349
PHP, 609 610
Apache, 616 619
database, 612
libraries, 615 616
platform, 610 611
PostgreSQL download, 613 614
PostgreSQL installation, 613 614
Web server, 611 612
Windows and, 619 620
PHPUnit, 333
Smarty, 267 268
instance() method, Database class, 176
instantiation
FSM class, 349
lazy, 102
implementation, 107 116
objects, 7
Interbase database, factory interfaces, 184
InterbaseConnection class, inheritance, 185
interface.Handled.php class, 193
interfaces
abstract classes, 29
definition, 5
factory interface, 179
how they work, 25 27
Iterator, 125 129
IteratorAggregate, 129 130
overview, 24 25
Recipient class and, 282
reports (Widget World project), 546 547
Traversable, 126
unit testing and, 330
internal member variables, 10
internal operators, variables and, 9
Internet connectivity, system architecture and, 406
invoking methods, 8
IP addresses, variance, session security and, 311
IsLoggedIn() function, UserSession class, 327
Iterator interface, 125 129
clone operator and, 130 132
IteratorAggregate interface, 125, 129 130
key() function, 126
KeyInUseException class, 104
keywords
class, 7
extends, 16
public, 9
Komodo, 593 594
code editing, 594 595
debugging, 595 596
project management, 594
lazy instantiation, 102
callbacks, 108
implementation, 110 112
implementation, 107 116
lead architect (Widget World project), selecting, 387 388
libraries
PHP installation, 615 616
SOAP implementation, 224
lifelines, 45
linear arrays, Smart templates, 269
live production environment (Widget World project), 534
live staging environment (Widget World project), 533 534
Load method, GenericObject class, 144
load testing (Widget World project), 399
QA and, 520
load tolerance, QA, 516 517
loaded property, GenericObject class, 143
Logger class
connection string
parsing, 208 209
using, 209 211
extending, 207 217
introduction, 203 207
methods
getInstance(), 205
logMessage(), 205 206
LoggerBackend class, 211 212
subclassing, 212 213
logging
database tables, 214 217
file logging, 201 202
system layout example, 202
logic errors, patching, 604 605
logins
PhpUnit, 429 436
screen, creating, 436 440
session security, 311
writing tests, 428 429
logMessage() method, 205 206
maintenance, system architecture and, 406
design, 414
Mantis fault tracking (QA)
administrator log in, 523 524
configuration, 522 523
installation, 522
projects
bug annotation, 529
bug assignment, 528 529
bug categories, 526 527
bug reporting, 528
bug resolution, 529
new, 526
users
adding, 525 526
creating, 524 525
editing, 524 525
measurable quality, 515 518
member variables
access protection, 10 11
internal, 10
Request class, MVC mini toolkit, 254
static, 28
messages, WSDL documents, 230
methods, 6
accessor methods, 10 11
adding, 7 8
addItem(), 103
BeginBuildNumber(), 351 352
BuildNumber(), 352
close(), 25 26
DB::connect(), 166
delete(), 160 162
DoEqual(), 353
DoOperator(), 352 353
draw(),86
EndBuildNumber(), 352
fopen(), 202
fwrite(), 202
GenericObject class, 144
getInstance(), 205
getItem(), 103
getIterator(), 129
INI file parsing, 356 357
insert(), 160 162
invoking, 8
logMessage(), 205 206
open(), 25 26
overload methods
_get(), UserSession class, 328
_set(), UserSession class, 328
overriding, 20 22
PEAR DB
fetch*(), 167 168
getAll(), 166
getOne(), 166
removeItem(), 103
request object, 255 256
Save, GenericObject class, 145 146
select(), 159 160
_toString(), 118
update(), 160 162
Microsoft SQL Server. See SQL Server databases
MIME, e-mail and, 298
mock objects (Widget World project), 506 511
model (MVC), 242
modified property, GenericObject class, 143
modified_fields property, GenericObject class, 143
modularity of classes, 4
modules, 4
monthly transfer calculation, CIR, 411
multidimensional arrays, Smarty templates, 273 274
MVC (model, view, controller)
ConstraintFailure class, 257 258
controller, 243
file splitting, 244
infrastructure, 243
introduction, 241 242
mini toolkit, 245 246
constants, 246 249
Constraint class, 256 257
Request class, 249 256
request object methods, 255 256
search.phtml, 260 261
searchresults.php, 261 263
uses, 258 265
model, 242
native templating, 245
PHP and, 243 245
searchresults.phtml, 263
view, 242 243
Web applications and, 243
My Reports page (Widget World project), 560
MySQL databases, 157
native templating, 245, 266
navigability, associations, relationships (UML class diagrams), 37
network, system architecture and, 406
design, 413
next() function, 126
nextID() function, PEAR DB class, 168 169
nodes, 46
notifications, 278
NuSpherePHPEd, 597
object diagram, 78
objects, 6 7
activation, 45
children, 74
classes, creating, 7
Composite, 74
definition, 5
destroying, 12 15
initializing, 11 12
instantiation, 7
interfaces and, 24 25
lifeline, 45
mock objects (Widget World project), 506 511
object composition, 73
Observable interface, 80
Observer interface, 80
Observable interface connection, 85 86
observer pattern, 80 86
DataSource object, 83 85
widgets, 80 81
design, 81 83
on-site customs, Widget World project development, 367
OOP (Object-Oriented Programming)
advantages, 4
overview, 3 5
PHP5 and, 28 29
open() function, session management, 316
open() method, 25 26
operations, class diagrams (UML), 35
operators, internal, variables and, 9
Oracle databases, 157
Organization class (Contact Manager), 62 70
output capture, Smarty templates, 274 275
overriding methods, 20 22
page maps (Widget World project), 397
parameter types, hints, 29
parent classes
functionality, inheritance and, 22 23
GenericObject class, 138 141
parsing
connection string, Logger class, 208 209
INI files, 356 357
Config class (PEAR), 358
parse request test, travel expense report, 481 483
XML files, Config class (PEAR), 358
patching
code holdups, logic errors, 604 605
database holdups, 603 604
testing, 606
patterns. See design patterns
PDF files
report translator scripts, 562
reporting format (Widget World project), 546
PEAR
Config class, 357 358
INI file parsing, 358
writing configuration files, 358
XML file parsing, 358
data handling, 167 168
database abstraction layer, building, 170 177
database connections, 165 166
DB::connect() method, 166
functions
DB_Error, 166
nextID(), 168 169
query(), 168
quoteSmart(), 170
information retrieval, 166 168
introduction, 164 165
type strings, 165
performance tuning
bottlenecks and, 599 601
avoiding, 605 606
locating, 602 603
patching and
code holdups, 604 606
database holdups, 603 604
testing, 606
poor performance causes, 601 602
preemptive avoidance
high-performance architecture, 607
load testing, 607 608
PersistentInterbaseConnection, 185
PHP, MVC and, 243 245
.php (control page) files
HTML and, 245
require() statements, 245
SQL queries and, 245
PHP installation, 609 610
Apache, 616 619
database, 612
libraries, 615 616
platform, 610 611
PostgreSQL downlod, 613 614
PostgreSQL installation, 613 614
Web server, 611 612
Windows and, 619 620
PHP5 SOAP extension, 224 227
functions, miscenallaneous, 226 227
SoapClient object, 225 226
SoapServer object, 226
PHPCode, 597
PHPEclipse, 597
PHPEdit, 596 597
.phpm (classes) files, HTML and, 245
PHPUnit, 329
framework and, 337
functional testing, 338
installation, 333
introduction, 332 333
quality assurance, 338
regression testing and, 337
test cases, 333 336
test suite, 336
xDir example, 338 343
PhpUnit, login tests, 429 436
.phtml (templates) files, SQL queries and, 245
pitch (Widget World project)
involved parties, 383 384
versus quotes, 382
versus specifications, 383
structure, 385 386
planning, Widget World project development, 367
platform, installation and, 610 611
political layer, Widget World project, 366
polymorphism
basic description, 79
definition, 5
portType, WSDL documents, 230
PostgreSQL databases, 157
downloading, 613 614
installation, 613 614
prerequisites of project (Widget World), 374
private member variables, visibility, 27
process (Widget World project)
build phase, 398
design phase, 396 397
creative specification, 397
page maps, 397
software architecture, 397 398
handover, 399
specification phase, 394
functional specification, 394 395
technical specification, 396
Spiral Process, 392 393
testing phase
functional testing, 398 399
load testing, 399
Waterfall Process, 391 392
project, Widget World. See Widget World project
project management (Widget World project), methodologies, 371 389
project manager (Widget World project), selecting, 386
properties, 6
classes, adding, 8 10
GenericObject class, 143
GenericObject class and, 134
methods, accessor methods, 11
PropertyObject class, 58
variables and, 8
PropertyObject class
Contact Manager, 54 56
properties, 58
protected member variables, visibility, 27
public keyword, 9
public member variables, visibility, 27
QA (Quality Assurance)
definition of quality, 515
fault tracking
introduction, 521 522
Mantis, 522 529
functional compliance, 516
grace during failure, 516
high standards, 514 515
introduction, 513 514
load tolerance, 516 517
measurable quality, 515 518
quantifiable quality, 515 518
RWT (Real World Tolerance), 516
testing
functional testing, 519 520
load testing, 520
unit testing, 518 519
usability testing, 520 521
usability, 517
veneer, 517 518
quantifiable quality, 515 518
query() function, PEAR DB class, 168
quoteSmart() function, PEAR DB class, 170
rack space, systems architecture design, 411
RCS version control software, 580
re-estimation (Widget World project), 450 451
read() function, session management, 317
realizations, UML, 37 38
recalling state (Widget World project), 459 460
Recipient class, 281 282
interfaces, 282
redundancy, system architecture and, 406
refactoring, Widget World project development, 367
tips, 452 459
travel expense report week tests, 487 492
regression testing, PHPUnit, 337
relationships, class diagrams (UML), 36 42
associations, 37
composites, 38 39
generalizations, 37 38
realizations, 37 38
symbols, 52
release planning, sales force automation toolkit, 426 427
Reload method, GenericObject class, 144
removeItem() method, 103
Collection class, 105
reporting (Widget World project)
deliverables, 545 546
design
data extraction, 547 549
interface, 546 547
output, 547
generation, 549 557
My Reports Page, 560
offline approach, 550 551
process, 557 558
report handler scripts, 558 560
report processor script, 557
report translator scripts, 560 562
reports engine example, 562 563
Reports interface, 552 557
HTML format, 546
Microsoft Excel format, 546
PDF format, 546
working data, 543 544
client management, 544 545
client needs, 544
XML format, 546
Reports interface (Widget World project), 552 557
requests storage, 555 557
XML templates, 553 555
request and response envelopes, SOAP client, 232 234
Request class, MVC mini toolkit, 249 256
request object, methods, 255 256
requirements gathering, UML
case diagrams, 32 35
client interviews, 32
resilience, system architecture and, 406
reusing code, 4
inheritance and, 16
rewind() function, 126
roles, project recipient (Widget World), 372 373
RPN (Reverse Polish Notation) Calculator, 346 348, 350 351
BeginBuildNumber() method, 351 352
BuildNumber() method, 352
DoEqual() method, 353
DoOperator(), 352 353
EndBuildNumber() method, 352
rsync version control, 539 540
servers and, 541 542
syntax, 540
runtime configuration, Smarty templates, 273
runtime flexibility, factory method design pattern and, 179
RWT (Real World Tolerance), quality, 516
Save method, GenericObject class, 144, 145 146
scenarios, case diagrams, 33
scope, (Widget World), 376 377
search.php (MVC mini toolkit), 259 260
Smarty template rewrite, 271 273
search.phtml (MVC mini toolkit), 260 261
searchresults.php (MVC mini toolkit), 261 263
searchresults.phtml (MVC mini toolkit), 263
security
implementation, 195 198
sessions
expiry times, 310 311
good practice, 310 312
IP address variance, 311
logins, 311
timeouts, 310
traffic levels, 311
user agent consistency, 311
valid, 307 308
valid, discovery, 308
variable storage, 312
system architecture and, 406
design, 414 415
select() method, 159 160
sequence diagrams (UML), 42 45
servers
databases, multiple, system architecture and, 413
rsync version control and, 541 542
system architecture and, 406
design, 411 413
multiple database servers, 413
multiple Web servers, 412 413
Web, PHP installation, 611 612
service WSDL documents, 230
session management
authentication class, 316 317
close() function, 316 317
database schema, 317 318
destroy() function, 317
gc() function, 317
open() function, 316
read() function, 317
UserSession class, 317
GetSessionIdentifier() function, 328
GetUserID() function, 327 328
GetUserObject() function, 327 328
impress() function, 327
IsLoggedIn() function, 327
_session_read_method() handler, 327
testing, 322 326
variables, 326
usersession.phpm file, 318 322
write() function, 317
_session_read_method() handler,
UserSession class, 327
sessions, 301
authentication class, 316 317
definition, 304
expiry times, 310 311
identifiers, 304
implementation, basic sessions, 312 315
limitations, 315 316
perpetuation
cookies, 306 307
URL rewriting, 304 305
security
good session practice, 310 312
IP address variance, 311
logins, 311
obliterating session guessing, 308
traffic levels, 311
user agent consistency, 311
valid sessions, 307 308
valid sessions, discovery, 308
variable storage, 312
timeout, 304, 310
user agent consistency, 311
_set() overload method, UserSession class, 328
set functions, 10 11
SetField method, GenericObject class, 144
setLoadCallback() function, Collection class, 112 116
setName() accessor method, 11
Simple Design, Widget World project development, 367
Singleton design pattern, databases, 175 177
small releases, Widget World project development, 367
Smarty templates, 266 267
arrays
associative, 269 270
linear, 269
multidimensional, 273 274
conditionals, 270
EmailCommunication class, 296 298
functions, 274
installing Smarty, 267 268
output capture, 274 275
runtime configuration, 273
search.php rewrite, 271 273
smartytest.php, 268
smartytest.tpl, 268 269
traditional templating comparison, 275
variable modifiers, 274
SMS text messaging, 298 299
SOAP (Simple Object Access Protocol)
clients
creating, 227 235
exception handling, 234 235
request and response envelopes, 232 234
introduction, 223
libraries, 224
PHP5 SOAP extension, 224 227
server, creation, 235 237
SoapClient object, functions, 225 226
SoapServer object, 226
SoapClient object, functions, 225 226
SoapServer object, functions, 226
soft skills, career as developer, 566 567
software, version control
CVS, 578 580
RCS, 580
Visual SourceSafe, 577 578
software architects (Widget World project)
design phase and, 397 398
selecting, 388
software engineers (Widget World project), selecting, 388
SourceSafe. See Visual SourceSafe version control
specification phase (Widget World project), 394
after sign-off, 403
functional specification, 394 395
technical specification, 396
specification revisions (Widget World project), 402 403
Spiral Process (Widget World project), 392 393
spreadsheets, travel expense report as, 498 504
SQL Server databases, 157
SQL (Structured Query Language) queries
.php (control page) and, 245
.phtml (templates), 245
staging environment (Widget World project), 532 534
starting point, activity diagrams (UML), 42
startTransaction() method, databases, 174
state diagrams (UML), 45 46
stateless, 301
static member variables, 28
stories, sales force automation toolkit, 417 420
spike, 424 425
weight estimation, 420 424
studio artists (Widget World project), selecting, 388 389
studio development environment (Widget World project), 531 532
studio staging environment (Widget World project), 532 533
subclasses. See also classes
communication, 298
LoggerBackend class, 212 213
methods, overriding, 20
syntax
database abstraction layers and, 158
FSM class, 349
default transition, 349 350
instantiation, 349
transitions, setting, 350
rsync version control, 540
systems architecture
connectivity, 406
design, 409
requirements, 407 408
design
CIR, 409 411
connectivity and, 409
hosting and, 409
maintenance, 414
network, 413
redundancy and resilience, 414
servers, 411 413
hosting, 406
design, 409
requirements, 407 408
importance of, 405 406
key decisions, 406 407
maintenance, 406
requirements, 408
network, 406
design, 413
requirements, 407 408
overview, 405
redundancy and resilience, 406
design, 414
requirements, 408
requirements
connectivity, 407 408
hosting, 407 408
maintenance, 408
network, 407 408
redundancy and resilience, 408
security, 408 409
servers, 407 408
security, 406
design, 414 415
requirements, 408 409
servers, 406
design, 411 413
multiple database servers, 413
multiple Web servers, 412 413
requirements, 407 408
table_name property, GenericObject class, 143
tables, database tables, 214 217
tagging, version control and, 581
technical layer, Widget World project, 365
technical specification (Widget World project), 396
templating
native templating, 245, 266
disadvantages, 266
true templating, 265
Smarty templates, 266 274
test-driven development (Widget World project), 399 400
PhpUnit, 429 436
testing
Apache installation, 617 619
customer contacts (Widget World project), 441 446
logins, 428 429
patching, 606
QA
functional testing, 519 520
load testing, 520
unit testing, 518 519
usability testing, 520 521
Widget World project development, 367
testing phase (Widget World project)
functional testing, 398 399
load testing, 399
test.php code, 70 71
text messaging, SMS, 298 299
timelines, Widget World project, 377 378
timeouts, sessions, 310
_toString() method, 118
traffic levels, session security and, 311
transactions (databases), 174 175
DELETE statement, 174
factory interface and, 184 185
INSERT statement, 174
UPDATE statement, 174
transition tables, FSM, 348
transitions
activity diagrams (UML), 42
FSM class
default, 349 350
setting, 350
travel expense report (Widget World project), 468 470
finalized, 492 506
spike, 476 477
as spreadsheet, 498 504
test cases for week, 473 476
validation, 471 473
week tests, 480 481
container read and write tests, 484 487
parse request test, 481 483
refactoring, 487 492
Traversable interface, 126
true templating, 265
native templating, 266
Smarty templates, 266 267
associative arrays, 269 270
conditionals, 270
functions, 274
installation, 267 268
linear arrays, 269
multidimensional arrays, 273 274
output capture, 274 275
runtime configuration, 273
search.php rewrite, 271 273
smartytest.php, 268
smartytest.tpl, 268 269
traditional templating comparison, 275
variable modifiers, 274
types, WSDL documents, 230
UML (Unified Modeling Language)
activity diagrams, 42
class diagrams
attributes, 35
domain modeling, 35 36
implementation, 39 42
operations, 35
relationships, 36 42
diagrams, Contact Manager, 50 54
domain expert, 32
introduction, 31
requirements gathering, 31 32
case diagrams, 32 35
client interviews, 32
sequence diagrams, 42 45
state diagrams, 45 46
unidirectional navigability, associations (UML class diagrams), 37
unified constructors, 28
unit testing, QA, 518 519
Unit Testing frameworks, 329. See also PHPUnit
classes
implementation, 332
interfaces, 330
test suite, 331
framework and, 337
functional testing, 338
overview, 329 332
quality assurance, 338
regression testing, 337
xDir example, 338 343
update() method, databases, 160 162
UPDATE statement, transactions and, 174
URL rewriting, session perpetuation, 304 305
usability testing, QA, 520 521
user agent consistency, sessions, 311
users
communication, 277
e-mail, 286 298
e-mail-to-fax gateways, 299
reasons, 278 280
SMS text messaging, 298 299
Mantis
creating, 524 525
editing, 524 525
UserSession class, 317
constructor, 326 327
_get() overload method, 328
GetSessionIdentifier() function, 328
GetUserID() function, 327 328
GetUserObject() function, 327 328
impress() function, 327
IsLoggedIn() function, 327
session management
testing, 322 326
_session_read_method() handler, 327
_set() overload method, 328
variables, 326
usersession.phpm file, 318 322
valid sessions, 307 308
validation
travel expense report (Widget World project), 471 473
user communication and, 279 280
variables
internal member variables, 10
member
internal, 10
Request class, 254
modifiers, Smarty templates, 274
operators, internal, 9
properties and, 8
visibility, 27
veneer, QA, 517 518
version control
binary files and, 581
branching, 580 581
comments, 581
concurrent versioning, 570 572
conflicts, 572 574
exclusive versioning, 574 575
exclusive versioning comparison, 570 574
overview, 569 577
software
CVS (Concurrent Versioning System), 578 580
RCS, 580
Visual SourceSafe, 577 578
tagging, 581
topology, 575 577
version control (Widget World project)
CVS, 536 538
rsync, 539 542
Visual SourceSafe, 538 539
view (MVC), 242 243
visibility, variables, 27
Visual SourceSafe version control, 538 539, 577 578
Waterfall Process (Widget World project), 391 392
Web applications, MVC and, 243
Web development skills, 566
Web servers, PHP installation, 611 612
Widget object, implementation, 88 89
Widget World project
account manager selection, 387
automation toolkit
cleanup, 451 459
customer contacts, 440 450
customer contacts per-week items, 460 468
login (story 9), 427 429
mock objects, 506 511
re-estimation, 450 451
recalling state, 459 460
release planning, 426 427
stories, 417 425
travel expense report, 468 506
change management
bugs reported, 403 404
disputes, difference in interpretation and, 403
specification revisions, 402 403
client side developers selection, 388
clients, role, 389
customer contacts
per-week items on report, 460 468
requirements, 440 441
screen creation, 446 447
tests, 441 446
deployment
development environments, 531 535
workflow, 536 542
development approach, 367 369
financial layer, 366
formal brief, 374 375
budget, 378 379
business requirements, 375 376
commercial terms, 380
future plans, 380 381
look and feel, 381
scope, 376 377
support, 381
technology, 381
timelines, 377 378
lead architect selection, 387 388
logins, screen creation, 436 440
methodologies for project management, 371 389
mock objects, 506 511
overview, 363 364
pitch
involved parties, 383 384
versus quotes, 382
versus specifications, 383
structure, 385 386
political layer, 366
process planning
build phase, 398
design phase, 396 397
handover, 399
specification phase, 394 396
Spiral Process, 392 393
testing phase, 398 399
Waterfall Process, 391 392
project history, 373 374
project management methodologies, 371 389
project manager selection, 386
project prerequisites, 374
project purposes, 372
project recipient, 372 373
agenda, 372 373
roles, 372 373
QA (Quality Assurance)
definition of quality, 515
fault tracking, 521 529
functional compliance, 516
grace during failure, 516
introduction, 513 518
load tolerance, 516 517
RWT (Real World Tolerance), 516
testing, 518 521
re-estimation, 450 451
reporting
deliverables, 545 546
design, 546 549
generation, 549 563
working data, 543 549
roles, doubling up, 389
software architects selection, 388
software engineers selection, 388
studio artists selection, 388 389
technical layer, 365
technology, 366, 370
test-driven development, 399 400
travel expense report, 468 470
finalized, 492 506
spike, 476 477
test cases for week, 473 476
validation, 471 473
week tests, 480 492
Weekly Contact Report, 365
working practices, 389
XP (eXtreme Programming), 400 402
widgets, observer pattern, 80 81
design, 81 83
Windows, PHP installation and, 619 620
working data, reporting and, 543 544
client management, 544 545
client needs, 544
working practices (Widget World project), 389
write() function, session management, 317
writing to files, 202
WSDL (Web Service Description Language), 224
documents, 230 232
SOAP servers and, 235
WW-SFAT Manager (Widget World), 367
xDir, unit testing example, 338 343
XMethods, SOAP-based Web server, 228
XML (eXtensible Markup Language)
configuration files, custom, 355
file parsing, Config class (PEAR), 358
reporting format (Widget World project), 546
Reports interface (Widget World project), 553 555
XP (eXtreme Programming), 367
Widget World project, 400 402
Zend Studio Client, 584 585
code editing, 585 587
code inspection, 587 588
debugging and, 588 593
file management, 585
project management, 585