9 of 9 people found the following review helpful
on 3 December 2008
I work as a PHP developer in a local company. I wanted to take my PHP to the next level - to gain an intimate understanding of the object oriented features of the language. To find out how to develop larger systems while still keeping maintainability. I feel so lucky to have chosen this book. I am half way through it and already I know so much more about PHP, I am using interfaces, abstract classes, and the strategy pattern in my real work.
If you are like I was: pretty good at PHP with some object oriented knowledge (mostly in other languages) and you want to bring your PHP to speed this book is *perfect*.
Another thing I really like is that for the first time in a programming book the examples seem highly relevant, easily understandible, without being drawn out, long-winded, over complicated or full of caveats. I can actually read many pages at a time without my eyes glazing over!
I want to personally thank the author for such a quality title, and thoroughly recommend it to anyone wanting PHP books.
7 of 7 people found the following review helpful
on 3 June 2008
As hinted in the title, this near 500 page tome is split into three parts: objects, patterns and [best] practice.
The section on objects covers the basics and then the advanced features of object oriented facilities in PHP and tools such as namespaces, autoloading and the reflection classes along with design basics, class scope, encapsulation, polymorphism and some UML.
The patterns section is obviously inspired by "The Gang of Four" (Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides) and covers what design patterns are, enterprise patterns, database patterns and also the basic patterns such as the factory, fascade, decorator and composite patterns along with a few more. This section is far from comprehensive, but is a good start. (If Patterns do interest you, and they should, have a look at patternsforphp.com)
The last section, focuses on PEAR (including writing your own packages and setting up your own PEAR channel), phpDocumentor, unit testing with phpUnit, version control with CVS (which struck me as a bit odd - I had expected subversion to be covered either instead of or along with CVS) and setting up automated builds with phing.
While being an easy read, this is a well written, serious book and is aimed squarely at enterprise-level developers and software engineers who make their living through the development and architecture of solutions developed in PHP.
Any PHP developer wishing to improve his skills should get a copy.
2 of 2 people found the following review helpful
on 5 October 2010
I've bee struggling for quite some time with this book. I'm an experienced PHP programmer, but not so much in OOP, and I've been finding it extremely difficult to actually use the examples in this book in real life situations. I keep thinking that it all sounds really useful, but I've read chapters over and over again and still find it difficult to understand what's going on. Sometimes I've resorted to looking the patterns up on the Internet and then understood immediately in much simpler examples what the pattern is all about and how it works, why does this book make everything sound so complicated when really it's not. I've also spent considerable time on the Internet trying to fill in the missing pieces to get the examples to actually work where the explaination in the book falls short. Overall I think the book is worth buying, but you'll probably find yourself relying heavily on other sources to make full use of it.
1 of 1 people found the following review helpful
on 20 March 2011
The book starts a bit silly. If I'm reading a book about object oriented PHP development, is because I WANT to do OOP with PHP, you don't have to sell it to me or tell me that since previous versions there was some hideous object orientation-like structure. I fear this comes to "fix" the issue that a most of the opensource PHP projects I've seen are not object oriented (or were not when I looked at them), so the book tries to teach how to do things better in OOP.
Apart from that, it starts not teaching you the basics of PHP, but entering directly into objects in PHP5, which I appreciate. It goes step by step explaining everything, and giving good advices of bad practices to avoid.
There are a lot of notes of how to "fix" the code for PHP4, not bad, but a bit annoying. Given the poor object orientation of all previous versions, the book should stick to PHP5 only.
The book explains all basic concepts of OOP (including advices and good practices), UML diagrams, going on to specific design pattern implementations in Part 3 of the book. This has been for me personally the "gold" part of the book, specific PHP 5 implementations of DP allowed me to see true object oriented source codes.
The patterns come from three widely known books, and are very well explained. We can find from the typical Singleton or Factory, to some other advanced ones like the Strategy or the Observer.
The code samples are quite good, giving you direct examples of how to implement a Factory design pattern or playing with classes and inheritance to show exactly how they work. There is a lot of theory and good practices too. Much better than the usual hello world and simple ones, this codes can be really of help in real word scenarios.
Avoiding reinventing the wheel, whenever necessary the book mentions the SPL (Standard PHP Library) for already available pattern tools and objects (like the Observer or the Iterator).
Chapter 11 goes on some Gang of Four patternns (the classics), but chapter 12 talks about enterprise patterns, and chapter 13 database patterns.
One of the big examples is actually how to build a full MVC engine, with a frontend controller, an application controller for the logic, views, templates (including the Template pattern by Flowler)...
After the MVC and presentation patterns, another bunch of Business Logic Layer patterns (like the Domain Models), and then goes into Database patterns, like the Data Access Layer, Identity Map...
When approaching serialization, gives good advices on how to do it. And if any kind of code hack or "non-perfect technique" is performed, we are advised of it very clearly. I wish other books were so careful to try to teach only good things...
After a bit more than 300 pages, the book switches to non-coding advices, tips and basic knowledge, like source code control (but using CVS, which is quite outdated!!), PEAR, testing with PHPUnit, automated builds...
This part for me felt a bit like filling up pages of the book. If I want generic advices I will search for them, I was searching for design patterns applied to PHP and as much as general advices, not more than 160 pages of non-patterns stuff.
Being a .NET developer since years, at first looks strange to me to be teached once and again that I should use classes and structure accordingly the code. While not yet perfect, object orientation in PHP5 looks useful enough to be able to do really good architectures for web applications, it just lacks more restrictions to avoid an inmense amount of errors that still can happen if you're not a skilled PHP developer (things like dynamic properties creation, untyped parameters or dynamic class instantiation should be at least redone in a more restrictive syntax).
Also, I liked the author's point of view, not telling you to always implement design patterns the same way, but understand what they try to solve, and extract what you need for your projects. I really wish other books (whenever about PHP or any other language) had so good and real-life practical examples as this one.
This book is a must-read for PHP developers that want to take out the common thinking of "you can't do clean code with PHP" (which sadly occurs too often). Even when it should be only 300 pages, is worth it (but is also why I'm giving it 3 stars out of 5).
2 of 2 people found the following review helpful
on 11 February 2009
This book is not for the beginner but for those interested in learning or advancing their knowledge of Object Oriented Programming, Design Patterns and general good practice.
An excellent book, not short on examples, very verbose with techniques, i'm confident even the most advanced PHP developer could learn something ( if only just a few more design patterns ).
Highly recommended, well written, well researched and even contains hints as to the path PHP 6 will take, so it won't date too quickly.
on 7 September 2010
Matt Zandstra has chosen a very good approach for this book.
He first introduces readers to basic and advanced OOP features which are available PHP v5 and above. It's an interesting read even if you are already familiar with the topic.
He then slowly starts introducing individual patterns and approaches which form the core focus of the book. Patterns are introduced in a very logical order - both in terms of complexity and in relationships which are formed between individual patterns. Most patterns in the book are based on one sample application and they revolve around solving common challenges which one would face during its development. This approach supports a gradual and easy to comprehend flow of information which are presented to the reader.
The remaining "practice" part of the book is then focused on tools and solutions which are commonly used during a web application development life cycle. Just to name a few - source code management, unit testing and automated build tools - these are all a must for anyone working on larger projects. I agree with the author that this is a topic rarely covered in programming books, and I really enjoyed this section - it's a very good and practical wrap-up of the topic.
I can honestly recommend this book to any intermediate or advanced PHP developer. The topics alone are very interesting, and the author shares them in a good, consistent and practical manner. I consider it to be the best book on PHP which I have read so far.
6 of 7 people found the following review helpful
on 29 January 2008
This book is an excellent bible on how to write PHP software well. It explains all the things you thought you knew, but didn't. This is not a beginners book - the first (and simplest) chapter begins with a discussion on OOP throughout recent versions of PHP! For someone who thinks they are pretty good already, this is a great sidekick.
10 of 12 people found the following review helpful
on 6 August 2008
I went from Agnostic to Convert in one easily understood book. I have gone from being a competent procedural programmer who dabbled in objects, to being a staunch advocate of PHP objects and patterns.
If you don't quite get what the OOP fuss is about, read this book and you won't look back. You'll start every sentence with "code to an interface, not an implementation"
1 of 2 people found the following review helpful
on 30 October 2009
There are very few books on this topic and so it's not hard for it to be one of the better ones - which it probably is.
I liked the way it started but it soon departs from offering knowledge in "bite-sized" chunks and assumes you will want to learn by following examples that are unnecessarily lengthy or complex. Like a lot of experts Matt seems to find difficulty in putting himself in the shoes of his (less expert) readers. Inch by inch lifes a synch. A mile at a time life's a swine!
I have to say that it wasn't long before I reverted to looking for tutorials and examples on the web which, whilst few and far between, were nonetheless more helpful.
Maybe this review says more about me than about the book!
on 6 March 2015
A very good book!