PHP 5 Objects, Patterns, and Practice
- Media: Book (Paperback, 438 pages)
- ISBN: 1590593804
- Publisher: Apress
- Release Date: Dec 21, 2004
Product Description
...if you have seen true object-oriented development, and have had trouble using these concepts in PHP; don't despair any longer. Matt (Zandstra) has done all the work for you--all you need is a weekend or two to do a little reading.
— Daniel Holmes, Slashdot Contributor
While being an easy read, Zandstra's introduction to the object-oriented features is, I believe, perfectly adequate to get started with object-oriented PHP programming.
— Lasse Koskela, JavaRanch Bartender
PHP 5's object-oriented enhancements are among the most significant improvements in the 10+ year history of the language. This book introduces you to those new features and the many opportunities they provide, as well as a number of tools that will help you maximize development efforts.
The book begins with a broad overview of PHP 5's object-oriented features, introducing key topics like class declaration, object instantiation, inheritance, and method and property encapsulation. You'll also learn about advanced topics including static methods and properties, abstract classes, interfaces, exception handling, object cloning, and more. You'll also benefit from an extensive discussion regarding object-oriented design best practices.
The next part of the book is devoted to a topic that is often a natural extension of any object-oriented introduction: design patterns. PHP 5 is particularly well-suited to the deployment of these solutions for commonly occurring programming problems. The author will introduce pattern concepts and show you how to implement several key patterns in your PHP applications.
The last segment introduces a number of great utilities that help you document, manage, test, and build your PHP applications, including Phing, PHPUnit2, phpDocumentor, PEAR, and CVS.
Sometimes it moves to fast.
I have found religion
OMG... I have found religion. My previous attempt at coding up a large website was one that a friend and I coded up 7 years ago with PHP2/3 which was crushed under its own weight and we quickly reached a point that we could not progress any further without breaking something. What Matt does in this book is to bring together many different ways of approaching enterprise and other common PHP problems as far as how do you represent/create/organize data objects in your PHP program and how do you organize program and customer flow.
At first, I approached the "Practice" portion of the book as an afterthought, but have since learned that rigorous testing and test cases saves your behind as I have broken my code in unexpected ways multiple times which I would never have caught had I not followed the advice presented in this book. There are lots of other good hints on how to conduct the business of coding which will save you lots of time in this "Practice" section.
My only gripe with the book was that the learning curve was steep in the "Patterns" section as the examples were interwoven and built highly upon eachother. This required me to go through the book a couple times before I actually understood everything... But this may just be an artifact of my slow brain which has not had any real deep foray into any programming for about 5 years.
This book opened my eyes to a whole new world of programming. Thank You Matt!
gr8 book for php5 concepts
Little about quickly using design patterns in practice
(Note that I already had OOP Java knowledge before reading the book.)
The second part of the book focuses on Design Patterns, which I sometimes found not clearly explained; problems unclear and definitions not explained. The OOP part was clearer.
The last part focuses on external tools to ease php programming, like testing, documenting, automatic deploying etc.
A major problem about the book is that it focuses a lot on OOP and design patterns without simply showing how this can be directly applied on a webpage or website. The end of part II feels more like how to make a complete PHP Enterprise framework from scratch yourself, with a lot of details making it a bit hard to crasp. It will take a lot of (initial) effort if you want to apply the enterprise patterns described in this book. In a real project, you probably won't even make a complete framework like this yourself, but take an existing framework like CakePHP of Zend Framework, something where the book doesn't talk about....
Buy both of them!
I would recommend buying both books as they do complement each other quite well. The examples in "PHP 5 Objects, Patterns, and Practice" tended be be a bit obscure but were clear and practical.
I recommend this book.








