did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780764572821

Professional Php5

by ; ; ;
  • ISBN13:

    9780764572821

  • ISBN10:

    0764572822

  • Format: Paperback
  • Copyright: 2004-11-26
  • Publisher: Wrox
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99

Summary

What is this book about?With the release of PHP 5 and the Zend Engine 2, PHP finally graduates from it earliest days as a lightweight scripting syntax to an powerful object oriented programming language that can hold its own against the Java and .NET architectures that currently dominate corporate software development. This book has a pragmatic focus on how to use PHP in the larger scheme of enterprise-class software development.What does this book cover?Unlike Java or .NET, there is little discussion of the application of design patterns, component architectures, and best-practices to the development of applications using PHP. Software written in the absence of this sort of higher-order architecture will never be able to match the robust frameworks that Java and .NET ship with out of the box. This book addresses this issue by covering the following material: Part 1 discusses the OO concepts that were initially explored in Beginning PHP 5 and a demonstration of how to implement them in PHP 5. This section also covers UML modeling and provides a brief introduction to project management techniques that are covered in more depth in Part 4. Parts 2 and 3 present objects and object hierarchies that, when completed, comprise a robust toolkit that developers will be able to reuse on future projects. These chapters are designed to arm the professional PHP developer with the sort of constructs that are available out of the box with platforms such as Java and .NET - from simple utility classes like Collection and Iterator, to more complex constructs like Model/View/Controller architectures and state machines. Part 4 shows how to use the toolkit from Parts 2 and 3 to create real-world applications. We look at the development of a robust contact management system that will leverage the componentry and concepts already discussed and introduce project management and software architecture concepts that enable developers to accurately identify business requirements, design scalable, extensible platforms, and handle change management effectively. It covers the waterfall and spiral project management paradigms and include a discussion on eXtreme Programming and other approaches to software development. The Appendices include an extended discussion on the effective use of CVS, introduce the Zend Studio IDE and related tools, and discuss performance tuning and scalability.

Table of Contents

Introduction xix
Part I: Object-Oriented Software Development Concepts
1(98)
Introduction to Object-Oriented Programming
3(28)
What Is Object-Oriented Programming?
3(2)
OOP advantages
4(1)
A real-world example
4(1)
Understanding OOP Concepts
5(23)
Classes
6(1)
Objects
6(9)
Inheritance
15(9)
Interfaces
24(3)
Encapsulation
27(1)
Changes to OO in PHP5
28(1)
Summary
29(2)
Unified Modeling Language (UML)
31(18)
Requirements Gathering
31(4)
Interviewing the Client
32(1)
Use Case Diagrams
32(3)
Class Diagrams
35(7)
Modeling the Domain
35(1)
Relationships
36(3)
Implementation
39(3)
Activity Diagrams
42(1)
Sequence Diagrams
42(3)
State Diagrams
45(1)
Component and Deployment Diagrams
46(1)
Summary
47(2)
Putting Objects to Work
49(24)
Creating the Contact Manager
49(23)
The Contact Manager UML Diagrams
50(4)
The PropertyObject Class
54(2)
The Contact Type Classes
56(4)
The DataManager Class
60(2)
The Entity, Individual, and Organization Classes
62(8)
Making Use of the System
70(2)
Summary
72(1)
Design Patterns
73(26)
The Composite Pattern
73(7)
Implementation
75(4)
Considerations
79(1)
The Observer Pattern
80(6)
Widgets
80(6)
Considerations
86(1)
The Decorator Pattern
86(6)
Implementation
88(1)
Using the Decorator
89(2)
Considerations
91(1)
The Facade Pattern
92(1)
The Builder Pattern
93(4)
Implementation
94(3)
Considerations
97(1)
Summary
97(2)
Part II: Creating a Reusable Object Toolkit I: Simple Utility Classes and Interfaces
99(140)
Collection Class
101(24)
Purpose of the Collection Class
101(1)
Designing the Collection Class
102(1)
Collection Class Basics
103(4)
The addltem Method
104(1)
The getItem and removeltem Methods
105(1)
Other Methods
105(1)
Using the Collection Class
106(1)
Implementing Lazy Instantiation
107(9)
Callbacks
108(4)
The setLoadCallback Method in the Collection Class
112(4)
Using the Collection Class
116(6)
Improving the Collection Class
122(1)
Summary
123(2)
Collectionlterator Class
125(8)
The Iterator Interface
125(4)
The Collectionlterator Class
127(2)
The IteratorAggregate Interface
129(1)
Protecting the Iterator's Contents by Using the clone Operator
130(2)
Summary
132(1)
GenericObject Class
133(24)
The GenericObject Class
133(13)
When to Use GenericObject
134(1)
What GenericObject Allows You to Do
134(1)
Assessing Suitability for Implementation
135(1)
Typical GenericObject Implementation
136(2)
Meet the Parent
138(3)
GenericObject Database Connectivity
141(2)
GenericObject Methods and Properties
143(3)
Benefits of GenericObject
146(1)
The GenericObjectCollection Class
146(10)
Traditional Implementation
147(1)
Where the Traditional Implementation Fails
148(1)
Principles behind GenericObjectCollection
149(1)
Meet the Code
149(3)
Typical GenericObjectCollection Implementation
152(1)
Try It
153(1)
How It Works
153(2)
GenericObjectCollection Summary
155(1)
Summary
156(1)
Database Abstraction Layers
157(22)
What Is a Database Abstraction Layer?
158(1)
A Simple Implementation
158(6)
The Configuration File
158(1)
Establishing a Connection
159(1)
Selecting Information
159(1)
Altering Information
160(2)
Using the Database class
162(2)
Introducing Pear DB
164(6)
Connecting to a Database Using DB
165(1)
Retrieving Information
166(2)
Other Useful Functions
168(2)
Getting More Information
170(1)
The Complete Database Abstraction Layer
170(8)
Transaction Support
174(1)
The Singleton Design Pattern
175(3)
Summary
178(1)
Factory Interface
179(8)
Factory Method Design Pattern
179(1)
Factory Interface Example
180(4)
The Old School Approach
180(1)
The Factory Interface Approach
181(1)
Using the Factory Interface in Database Abstraction
182(2)
Multiple Factories
184(1)
Leveraging Existing Classes
185(1)
Summary
186(1)
Event-Driven Programming
187(14)
What Are Events?
187(1)
Using OOP to Handle Events
188(10)
Designing an event-driven solution
189(2)
Implementing the solution
191(4)
Implementing security
195(3)
Pause for Thought
198(1)
Summary
198(3)
Logging and Debugging
201(22)
Creating a Logging Mechanism
201(16)
Simple File Logging
201(1)
Example File System Layout
202(1)
The Logger Class
203(4)
Extending the Logger Class
207(10)
Creating a Debugging Mechanism
217(4)
Summary
221(2)
Soap
223(16)
Soap and PHP5
223(4)
The PHP5 Soap Extension
224(3)
Making a Soap Client
227(8)
Under the Hood
230(4)
Exception Handling in the Soap Client
234(1)
Making a Soap Server
235(2)
Summary
237(2)
Part III: Creating a Reusable Object Toolkit II: Complex (Though Not Complicated) Utilities
239(122)
Model, View, Controller (MVC)
241(36)
Introducing MVC
241(4)
The Model
242(1)
The View
242(1)
The Controller
243(1)
The Infrastructure
243(1)
MVC in Web Applications
243(1)
MVC in PHP
243(2)
The MVC Mini Toolkit
245(20)
Introducing the Toolkit
246(12)
Using the Toolkit
258(7)
The Toolkit in the Wild
265(1)
True Templating
265(10)
Recapping Native PHP Templating
266(1)
The Pitfalls of Native Templating
266(1)
True Templating with Smarty Templates
266(1)
Installing Smarty
267(1)
Using Smarty
268(5)
Advanced Smarty
273(2)
When to Use Smarty vs. Traditional Templating
275(1)
Summary
275(2)
Communicating with Users
277(24)
Why Communicate?
277(3)
Reasons to Communicate with Users
278(2)
Think Outside the Web Browser
280(1)
Types of Communication
280(1)
All communications have
280(1)
Not all communications have
280(1)
What about Recipients?
281(1)
Communication As a Class Hierarchy
281(5)
The Recipient Class: A quick Test of OOP-Like Thinking
281(4)
The Communication Class
285(1)
E-mailing Your Users
286(12)
Building a Test Version
287(3)
Getting the Message Across
290(6)
Being Smart with Templates
296(2)
Using MIME
298(1)
Other Communication Subclasses
298(1)
SMS Text Messaging
298(1)
Fax
299(1)
Summary
299(2)
Sessions and Authentication
301(28)
Introduction to Sessions
301(11)
A Brief Recap on How HTTP Works
302(2)
Definition of a Session
304(1)
Perpetuation of a Session
304(3)
Session Security
307(5)
How PHP Implements Sessions
312(4)
Basic PHP Sessions
312(3)
Limitations of Basic PHP Sessions
315(1)
Creating an Authentication Class
316(12)
Connecting PHP Session Management to a Database
316(1)
Introducing the UserSession Class
317(1)
Database Schema
317(1)
The Code: usersession.phpm
318(4)
The Code: Testing the UserSession Class
322(4)
How It Works: The UserSession Class
326(2)
Putting It All Together
328(1)
Summary
328(1)
Unit Testing Framework
329(16)
Methodology and Terminology
329(3)
Designing the Interface of Your Class
330(1)
Creating a Test Suite for Your Class
331(1)
Writing the Implementation of Your Class
332(1)
The Second Run
332(1)
Introduction to PHPUnit
332(1)
Installing PHPUnit
333(1)
Using PHPUnit
333(4)
Test Cases
333(3)
The Test Suite
336(1)
Why Bother?
337(1)
Regression Testing
337(1)
Framework Usability
337(1)
Demonstrable Quality Assurance
338(1)
Reducing the Burden of Functional Testing
338(1)
A Real-World Example
338(5)
Summary
343(2)
Finite State Machine and Custom Configuration Files
345(16)
Introducing the Finite State Machine
346(8)
A Simple FSM: The RPN Calculator
346(2)
Theoretical Implementation of FSMs
348(1)
Implementing FSMs in PHP
348(2)
Disassembling the RPN Calculator Example
350(3)
Real-World Examples of FSMs
353(1)
Custom Configuration Files
354(5)
Using PHP
354(1)
Using XML
355(1)
Using INI Files
355(2)
The Config Pear Class
357(1)
Configuration File Best Practice
358(1)
Summary
359(2)
Part IV: Test Case: Sales Force Automation
361(208)
Project Overview
363(8)
Widget World
363(1)
The Widget World Landscape
364(3)
The Technical Layer
365(1)
The Financial Layer
366(1)
The Political Layer
366(1)
You
366(1)
Is It Really about Technology?
366(1)
The Development Approach
367(3)
What Does This Mean to Me?
368(2)
The Technology
370(1)
Summary
370(1)
Project Management Methodologies
371(20)
Do Your Homework
371(3)
Why Is the Project Happening?
372(1)
Who Is the Project For?
372(1)
What Is the History of the Project?
373(1)
What Are the Anticipated Prerequisites of the Project?
374(1)
Receiving the Formal Brief
374(8)
Business Requirements
375(1)
Scope
376(1)
Timelines
377(1)
Budget
378(2)
Commercial Terms
380(1)
Future Plans
380(1)
Look and Feel
381(1)
Technology
381(1)
Support
381(1)
What Now?
382(1)
Constructing the Pitch
382(4)
Pitches versus Quotes
382(1)
Pitches versus Specifications
383(1)
Who to Involve When Pitching
383(1)
When to Go the Extra Mile
384(1)
When to Say No
384(1)
Structuring the Pitch
385(1)
Choosing Your People
386(3)
Project Manager
386(1)
Account Manager
387(1)
Lead Architect
387(1)
Software Architects and Engineers
388(1)
Client Side Developers
388(1)
Senior Designers
388(1)
Studio Artists
388(1)
Doubling Up of Roles
389(1)
Working Practices
389(1)
Your Client's Role
389(1)
Summary
389(2)
Planning the System
391(14)
Choosing a Process
391(3)
The Waterfall Process
391(1)
The Spiral Process
392(1)
Making the Decision
393(1)
Common Process Practices
394(5)
Specification Phase
394(2)
Design Phase
396(2)
Build Phase
398(1)
Testing Phase
398(1)
Handover
399(1)
Programming Methodologies and Practices
399(3)
Test-Driven Development
399(1)
eXtreme Programming
400(2)
Change Management
402(2)
Specification Revisions
402(1)
Specification Changes That Arise after Sign-Off
403(1)
Disputes Arising from Differences in Interpretation
403(1)
Bugs Reported by the Client
403(1)
Summary
404(1)
Systems Architecture
405(12)
What Is Systems Architecture?
405(2)
Why Is It Important?
405(1)
What Needs Doing?
406(1)
Effectively Translating Requirements
407(2)
Hosting, Connectivity, Servers, and Network
407(1)
Redundancy and Resilience
408(1)
Maintenance
408(1)
Security
408(1)
Designing the Environment
409(6)
Hosting and Connectivity
409(1)
Calculating CIR
409(2)
Servers
411(2)
Network
413(1)
Redundant Storage
414(1)
Maintenance
414(1)
Security
414(1)
Summary
415(2)
Assembling the Sales Force Automation Toolkit
417(96)
Starting the Project: Monday
417(10)
Getting an Earful
418(2)
Story Weight Estimation
420(6)
Release Planning
426(1)
Starting the Work
427(24)
Outlining Details of Story 9
427(1)
Writing Tests
428(1)
PhpUnit
429(7)
Creating the login screen
436(4)
The Next Story
440(10)
Re-Estimation
450(1)
Cleaning Up
451(8)
Refactoring Code
452(7)
Finishing the Iteration
459(9)
Story 14: Changing the Week Recalls a Previous Week
459(1)
Story 15: Per-Week Items on the Customer Contact Report
460(8)
Travel Expense Report
468(24)
Travel Expense Item
471(2)
Travel Expense Week
473(3)
The Spike
476(1)
More Travel Expense Week Tests
477(3)
Satisifying the Travel Expense Week Tests
480(12)
The Finalized Travel Expense Report
492(14)
Mock Objects
506(5)
Summary
511(2)
Quality Assurance
513(18)
Introduction to QA
513(5)
Why You Should Aim High
514(1)
What Is Quality?
515(1)
Measurable and Quantifiable Quality
515(3)
Testing
518(3)
Unit Testing
518(1)
Functional Testing
519(1)
Load Testing
520(1)
Usability Testing
520(1)
Fault Tracking
521(8)
Effective Fault Management Using Mantis
522(7)
Getting the Most Out of Mantis
529(1)
Summary
529(2)
Deployment
531
Devising Development Environments
531(5)
The Studio Development Environment
531(1)
The Studio Staging Environment
532(1)
The Live Staging Environment
533(1)
The Live Production Environment
534(1)
Development Databases
534(2)
The Deployment Workflow
536(5)
Automated Version Control Repository Extraction
537(1)
Using rsync
538(2)
Keeping Servers in Sync with rsync
540(1)
Summary
541
Designing and Developing a Robust Reporting Platform
1(564)
Introduction to Working Data
1(6)
Understanding Your Client's Needs
2(1)
Managing Your Client
2(1)
Report Deliverables
3(1)
Designing a Report
4(3)
Report Generation Architecture
7(15)
The Offline Approach
9(1)
The Reports Interface
10(1)
The New Report Interface
11(4)
The Report Processor Script
15(1)
The Process
16(1)
The Report Handler Scripts
17(1)
The My Reports Page
18(1)
The Report Translator Scripts
19(2)
Example Usage of the Reports Engine
21(1)
Visualizations
21(1)
Summary
22(543)
Where Do You Go from Here?
565(4)
Motivation
565(1)
Your Career As a Developer
566(1)
More Than Web Development Skills
566(1)
Soft Skills
566(1)
Academic Skills
567(1)
Community Skills
567(1)
Summary
567(2)
Appendix A: Why Version Control Is a Good Thing 569(14)
Appendix B: PHP IDEs 583(16)
Appendix C: Performance Tuning PHP 599(10)
Appendix D: Best Practice PHP Installation 609(12)
Index 621

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program