PHP 5 Objects, Patterns, and Practice and over 2 million other books are available for Amazon Kindle . Learn more

Sign in to turn on 1-Click ordering.
Trade in Yours
For a £0.81 Gift Card
Trade in
More Buying Choices
Have one to sell? Sell yours here
Sorry, this item is not available in
Image not available for
Image not available

Start reading PHP 5 Objects, Patterns, and Practice on your Kindle in under a minute.

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

PHP 5 Objects, Patterns, and Practice [Paperback]

Matt Zandstra
4.5 out of 5 stars  See all reviews (4 customer reviews)
RRP: £29.99
Price: £24.22 & FREE Delivery in the UK. Details
You Save: £5.77 (19%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
Temporarily out of stock.
Order now and we'll deliver when available. We'll e-mail you with an estimated delivery date as soon as we have more information. Your account will only be charged when we dispatch the item.
Dispatched from and sold by Amazon. Gift-wrap available.


Amazon Price New from Used from
Kindle Edition £23.01  
Paperback £24.22  
Trade In this Item for up to £0.81
Trade in PHP 5 Objects, Patterns, and Practice for an Amazon Gift Card of up to £0.81, which you can then spend on millions of items across the site. Trade-in values may vary (terms apply). Learn more
There is a newer edition of this item:
PHP Objects, Patterns, and Practice: Fourth Edition PHP Objects, Patterns, and Practice: Fourth Edition
In stock.

Book Description

21 Dec 2004 1590593804 978-1590593806
. . . 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. 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 Objects, Patterns, and Practice is a practical design and management book devoted to exploring object-oriented programming in PHP 5, the latest and most powerful version of PHP. Using a wide variety of pattern examples, this insightful text explores the principles underlying design patterns, focusing largely on those patterns collected by the 'Gang of Four.' Veteran author Matt Zandstra further addresses the needs of PHP users by providing practice and examples on topics including unit testing, documentation, version control, and automated building.

Product details

  • Paperback: 458 pages
  • Publisher: Apress (21 Dec 2004)
  • Language: English
  • ISBN-10: 1590593804
  • ISBN-13: 978-1590593806
  • Product Dimensions: 23.6 x 18 x 2.3 cm
  • Average Customer Review: 4.5 out of 5 stars  See all reviews (4 customer reviews)
  • Amazon Bestsellers Rank: 221,092 in Books (See Top 100 in Books)
  • See Complete Table of Contents

More About the Author

Discover books, learn about writers, and more.

Product Description

About the Author

Matt Zandstra has worked as a Web programmer, consultant and writer for a decade. He has been an object evangelist for most of that time. Matt is the author of SAMS Teach Yourself PHP in 24 Hours (three editions) and contributed to DHTML Unleashed. He has written articles for Linux Magazine and Matt works primarily with PHP, Perl and Java, building online applications. He is an engineer at Yahoo! in London. Matt lives in Brighton with his wife Louise, and two children, Holly and Jake. Because it has been so long since he has had any spare time he only distantly recollects that he runs regularly to offset the effects of his liking for pubs and cafes, and for sitting around reading and writing fiction.

Inside This Book (Learn More)
Browse Sample Pages
Front Cover | Copyright | Table of Contents | Excerpt | Index
Search inside this book:

What Other Items Do Customers Buy After Viewing This Item?

Customer Reviews

4 star
2 star
1 star
4.5 out of 5 stars
4.5 out of 5 stars
Most Helpful Customer Reviews
30 of 30 people found the following review helpful
5.0 out of 5 stars Timely and useful 6 Oct 2005
As a professional web programmer who has worked in the computer publishing industry, myself, I very often read a book with half a mind as to who it is either aimed at or will benefit.
As a result of reading this book, I came to the conclusion that those it would benefit were (downwards, in ascending order):
A) those with a good grounding in a web-base OOP programming language like Java or C#, who need to do some PHP, and need to know how much of what they are familiar with can now be applied in the PHP 5 world and how it is implemented.
B) those coming from a desktop-oriented OOP background who need an insight into the unique problems of designing multi-user, distributed web-based systems, using the OOP features found in PHP 5.
C) established PHP programmers from a procedural background, who still needs convincing that PHP's object model is becoming strong enough to justify a switch to OOP, and how to achieve that switch.
D) hapless Visual Basic programmers, with plenty of experience using the COM-based Object interfaces, themselves, and who therefore need no convincing of the advantages of OOP, but who are desperately seeking a way out of the ever shrinking market for their existing skillset in desktop development (this describes a lot of the developers where I am currently working, BTW.)
It won't help an absolute novice programmer, however, which is a shame, because many of the arguments it puts forward to forcibly are aimed squarely at avoiding many of the pitfalls that new programmers fall into when presented with:
A) an apparently simple problem
B) DBMS which (all to often) still doesn't default to enforcing constraints (for instance!)
C) An absolute wealth of functions.
Read more ›
Was this review helpful to you?
7 of 7 people found the following review helpful
5.0 out of 5 stars 5 stars - excellent "introduction" 31 Oct 2005
By J. M.
This book is very much an all-rounder. This first explains why PHP4 is fine, yet PHP5 for many will become a must-have. The addition of objects to PHP4 introduces a very powerful, and fittingly albeit surprisingly complex topic. This book will spoon feed you to become a programmer among the big boys. Without missing one step, this is more than just a resource to learning PHP5 objects. It's about getting closer to perfectly implementing demanding php/database applications in complex environments with many developers - and wasting minimal code by re-use. I'm freely marking my copy - I can tell I'll never sell it!
Comment | 
Was this review helpful to you?
5.0 out of 5 stars great book. 1 Aug 2014
Format:Paperback|Verified Purchase
Brilliant book. I've been a we developer for two years and I still learn an use this book to refer to.
Comment | 
Was this review helpful to you?
8 of 20 people found the following review helpful
3.0 out of 5 stars Could have been better 27 Feb 2006
Let me just say that this is not a bad book at all, it's just isn't good enough in my opinion. Maybe it is for starting programmers but it is not for me.
It succeeds well in explaining some of the more common patterns in PHP4/PHP5 but fails to goes into detail on a lot of them.
I'd really recommend some other books. If you want to learn about design patterns, there are a lot of better books out there. Unless you need the explanation in PHP code ...
I was not fully satisfied and learned little from it.
Not a bad book, but disappointing to me
Was this review helpful to you?
Most Helpful Customer Reviews on (beta) 4.4 out of 5 stars  34 reviews
61 of 66 people found the following review helpful
5.0 out of 5 stars Proper enterprise level respect for PHP5 14 Jan 2005
By Jack D. Herrington - Published on
Fact of the matter is that PHP5 is a serious enterprise level development system. This book takes it seriously and presents both practical and architectural material at a level that used to be reserved for J2EE and .NET works. This relatively short book is packed full of well written and insightful content. It stars with the basics of PHP5 OO programming with detail about the mistakes in PHP4 that have now been rectified. That is taken all the way through advanced topics like reflection.

The author then switches gears and gets into the design of object oriented applications. Now that we have the right tools, how we should use them to make better systems, right? UML is covered, and so are design patterns.

The later chapters of the book cover solid software engineering practices, like version control and unit testing, amongst other.

Not only will this book give you new ideas at a coding level, it will also open your mind as an engineer and get you headed in a direction toward architecture and large scale application design.

An excellent book. A must have for any serious PHP developer.
23 of 23 people found the following review helpful
5.0 out of 5 stars Serious Stuff on PHP OOP 17 Jun 2006
By David Stapleton - Published on
I liked this book. It is probably the first I have run across that treats PHP as a serious development environment, addressing it to enterprise level tasks. That said, let me add a cautionary warning, this book is not for the novice to OOP.

Mr. Zandstra approaches his task by dividing the content into three sections: 1) Objects - covering various basic and advanced concepts in OOP as they apply to PHP, from polymorphism and encapsulation to abstracts, error handling and interfaces, 2) Patterns - using a few sources (including the 'Gang of Four') he covers composition, object generation, tasks and layers among other topics, 3) Practices - offering a little advice on how and why to use patterns and standards, as well as some coverage of PEAR, documenting and version control.

From a practical standpoint, I found the book interesting, but somewhat overwhelming. Let me try to clarify that a little. This book is targeted at enterprise level development, meaning serious business level coding/development. Most of my work in PHP so far, while it makes use of OOP, is relatively small scale (15-20 classes ranging from 200-1500 lines each in my most complex site). While I can see the logic in the patterns and practices that Zandstra writes about, the overall content is overkill for my scale of project. Now that isn't to say that I found the book useless, there are many of the concepts that the author discusses that will find their way into my design and code; I just won't be doing a wholesale pattern refactoring of my code (a viewpoint I get the feeling the author would agree with).

If you are a professional developer, I would recommend this book as a good read and part of your PHP reference library. If you are not an enterprise level developer and are just looking for sample code to help solve or implement solutions I would recommend PHP 5 Recipes (Apress).
29 of 32 people found the following review helpful
4.0 out of 5 stars A great introduction to object-oriented PHP 9 Mar 2005
By Lasse Koskela - Published on
I haven't read a book on PHP in ages. In fact, I haven't programmed in PHP since 2001. With this in mind, I can say that Matt Zandstra's "PHP 5 Objects, Patterns, and Practice" was a very approachable introduction to what the latest version of the PHP platform has to offer to an OO developer from the Java scene.

The book is split to three main sections: objects, patterns, practice. The first section runs through the new object-oriented features of PHP 5, the second sections introduces design patterns and includes a catalog of some of the more common patterns from the original Gang of Four patterns as well as from "Core J2EE Patterns". The third section is a set of tutorials on tools and assets that a modern day PHP developer really should know about and make use of: the PEAR installation tool, PhpDocumentor, and the Phing build tool. The author also squeezed in a bit about the PHPUnit2 library for unit testing PHP code which I especially appreciated.

The design patterns catalog is far from comprehensive, covering only a small subset of published design patterns in the Java/.NET camps, but serves its purpose alright. Every included pattern is illustrated with an example that the author has crafted for the PHP context - in other words, these are not just direct ports from their Java equivalents, for example.

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. Combined with the discussion about design patterns, the book feels like a valuable asset for getting up to speed after a break. A more up-to-date PHP developer might find the information a bit lacking but for someone new to PHP 5's object-oriented features, this is a good package to get started with.
11 of 11 people found the following review helpful
5.0 out of 5 stars The Next Step for the Serious PHP Programmer 5 May 2005
By J. R. Stephens - Published on
I got this book thinking, "Hey, this might help me get a leg up on that new PHP 5 OOP stuff." That it did.

However, this book accomplishes much more than that. Zandstra sets himself a several goals and meets them all quite well. These include: providing an understanding of classes, objects, and interfaces in PHP 5; presenting a numbers of useful design patterns as expressed in PHP 5 terms; giving the reader information about and insight into advanced development tools and methodologies for large-scale PHP 5 projects.

A particularly valuable service provided by the author lies in the fact that there is a real dearth of material on design patterns for PHP developers, most of the literature on this subject being written with the assumption that the reader is highly proficient in Java or C++ (or possibly Smalltalk). This is all well and good if your background includes lots of work or study in one or more of these; however, for many Web developers, PHP is the primary and sometimes only programming language (and for many more, their only previous experience is with other scripting languages such as Perl, Python, JavaScript, VBScript, etc.). Zandstra goes to the effort of translating many of the classic "Gang of Four" design patterns into PHP 5 code and thereby makes accessible a realm that was heretofore unknown to many PHP developers.

If this were all that the book covered, it would be useful in and of itself for this alone. But the author also gives us a good, thorough grounding in both the mechanics of PHP 5's new object model and (especially important!) the rationale behind it. He also provides a nice tutorial on UML modeling along the way, and finishes up with a look at some current development tools like Phing and CVS. There are plenty of helpful and useful examples along the way.

I give this book 5 stars for having really helped me wrap my head round some advanced OO programming and design concepts. I've already got loads of use from it; my copy is about two months old, and it's already getting dog-eared. It's also a very enjoyable read, and a real cut above most of the "How To Program In ..." sorts of books. This is the perfect book for someone with some experience with writing PHP code who's looking to move up to the next level - creating real, scalable, enterprise-level PHP applications.
9 of 10 people found the following review helpful
4.0 out of 5 stars 2 key ideas in programming 20 Jan 2005
By W Boudville - Published on
As languages which were not originally object oriented grow in popularity, there is sometimes a trend to upgrade them, by adding in this functionality. C++ can be regarded as an upgrade of C, in this respect. Or how Visual Basic now as VB.NET has quite impressive OO features. So Zandstra's book attests to this trend and to the popularity of PHP. It describes how the OO enhancements in PHP 4 were extended into version 5. You are shown how to use objects to the full extent allowed in PHP 5.

The book is also aimed at a reader who might never have formally learnt to use objects or design patterns. In the last 15 years, these have been two very important ideas in programming, independent of the languages used. Which gives us another merit of the book. You are not just learning PHP 5, though that may be good in itself. By understanding and using the book's ideas, you should be able to apply these in other languages. A valuable increase of your skill set and hence marketability.

You should also read carefully the section on bad practices. Sometimes, just being able to avoid these in your code may be enough to produce a successful program.
Were these reviews helpful?   Let us know
Search Customer Reviews
Only search this product's reviews

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for similar items by category