Skip to main content

Professional PHP5

Professional PHP5

Ed Lecky-Thompson, Heow Eide-Goodman, Steven D. Nowicki, Alec Cove

ISBN: 978-0-764-58337-7

Jan 2007

668 pages

Select type: E-Book

Product not available for purchase

Description

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.
PART I: OBJECT-ORIENTED SOFTWARE DEVELOPMENT.

1. Introduction to Object-Oriented Programming.

2. Unified Modeling Language (UML).

3. Putting Objects to Work.

4. Design Patterns.

PART II:  CREATING A REUSABLE OBJECT TOOLKIT I—SIMPLE CLASSES AND INTERFACES.

5. Collection Class.

6. CollectionIterator Class.

7. GenericObject Class.

8. Database Abstraction Layers.

9. Factory Interface.

10. Event Driven Programming.

11. Logging and Debugging.

12. SOAP.

PART III: CREATING A REUSABLE OBJECT TOOLKIT II— COMPLEX (THOUGH NOT COMPLICATED) UTILITIES.

13. Model, View, Controller (MVC).

14. Communicating with Users.

15. Sessions and Authentication.

16. Unit Testing Framework.

17. Finite State Machine and Custom Configuration Files.

PART IV: TEST CASE: SALES FORCE AUTOMATION.

18. Project Overview.

19. Project Management Methodologies.

20. Planning the System.

21. Systems Architecture.

22. Assembling the Sales Force Automation Toolkit.

23. Quality Assurance.

24. Deployment.

25. Designing and Developing a Robust Reporting Platform.

26. Where Do We Go From Here?

PART V: APPENDICES.

Appendix A: Why Version Control Is a Good Thing™.

Appendix B: PHP IDEs.

Appendix C: Performance Tuning PHP.

“…really useful…well laid out…” (oraclehome.co.uk, October 2005)
Code Downloads
Code downloads for this title are available here.
Download
ChapterPageDetailsDatePrint Run
24Typo on Page
Where it says:

"Create a file called interface.Opener.php"

It should say

"Create a file called interface.Openable.php"
5/18/05

25Errors in Text
abstract function open();
abstract function close();

should be:
public function open();
public function close();

AND

in the file class.Jar.php for Chapter 1
<?

?>

should be:
<?php

?>
02/22/07

106Error in Code
print $objSteve; //prints "Steve is number 14"
Should be:
print $objSteve->_toString(); //prints "Steve is number 14"
7/19/05

119Error in Code
public function _loadCourses(Collection $col)

should be:
public function _loadCourses(courseCollection $col)
10/05/06

171Error in Code
private $conn;

private function __construct($dsn = null) {
global $conn;

should be:

private $conn;

private function __construct($dsn = null) {
global $cfg;
12/26/2007

246-247Error in Code
On page 246-247, in file constants.phpm, the code should be like this.
 
<?php
// Constants
 
define("VERB_METHOD_COOKIE", 1);
define("VERB_METHOD_GET", 2);
define("VERB_METHOD_POST", 4);
 
define("CT_MINLENGTH", 1);
define("CT_MAXLENGTH", 2);
define("CT_PERMITTEDCHARACTERS", 3);
define("CT_NONPERMITTEDCHARACTERS", 4);
define("CT_LESSTHAN", 5);
define("CT_EQUALTO", 6);
define("CT_MORETHAN", 7);
define("CT_NOTEQUALTO", 8);
define("CT_MUSTMATCHREGEXP", 9);
define("CT_MUSTNOTMATCHREGEXP", 10);
?>
11/09/05

257Error in Code
Function GetConstraintType():
An 's' is missing from its return value, i.e.
return($this->_intContraintType);
should be:
return($this->_intConstraintType);
Thus in file constraint.phpm, the code should be like.
function GetConstraintType() {
    return($this->_intConstraintType);
  }
11/09/05

15319Error in Variable
the first occurrence of the variable $maxlifetime has a value of null;
should be a value of:
$this->session_lifespan
10/02/06