Most helpful critical review
11 of 15 people found the following review helpful
Informative but overly technical
on 20 March 2011
This book is advertised as a resource for intermediate PHP programmers who are not necessarily familiar with the Object Oriented (OO) features of the language. However, I would caution potential buyers to think carefully before purchasing this product. While this book does exactly what it says it does, it does so in a garbled and overly technical style of writing that does not allow easy comprehension of the complicated material being discussed
Its first section aims to introduce the OO features of the language to those who may not be familiar with them. Those whom this applies to will therefore be surprised at the brisk pace this section takes. Nevertheless, it does provides a solid enough grounding if you are willing to also consult other resources - or if you have previous OO experience.
It is the second section - the examination of numerous design patterns - with which I am most displeased. A large amount of vocabulary will be introduced in the opening chapters: polymorphism, aggregation, composition, orthogonality, coupling, cohesion, and encapsulation (to name but a few). These terms, which are not explained adequately in the first place, are subsequently used freely throughout the remaining chapters and will certainly leave all but the most experienced programmer confused; the UML (unified modelling language) diagrams are equally unclear and ill explained.
The patterns themselves continue the trend of being overly technical. One has to reread a chapter numerous times in order to even understand what Mr. Zandstra is trying to communicate. It does not help that there are several typing errors in the prose and even the occasional (simple) error in the code itself ('asset()' instead of 'isset()', to give an example).
Unfortunately, what would arguably be the most useful chapter of the book is also the worst. If one has struggled with the book so far , chapter 12 will certainly confuse you. This chapter attempts to have us create a working application to hold event listings (theatre tickets and so on), but it is no easy task. The explanations of the 'front controller' and the 'application controller' patterns in particular are extremely unclear. Moreover, portions of the code are left blank and it is assumed that we will be able to complete the remaining code (XML parsing/XML file creation etc) without assistance. This essentially renders the chapter useless for those who are struggling, since it is impossible to work backwards from a 'working example' if we cannot view one in the first place! It is also mentionable that while these two patterns seem to overlap each other, the author does not tell us if, when writing the code for the 'application controller', we should be overwriting the classes that we previously created for the application, or if we should be creating new classes that can be used as an alternative to the 'front controller' pattern.
The third section, I admittedly have less experience with so far since I purchased this book primarily in order to learn about design patterns. If I could adequately understand the second section, however, I would have been keen to read ahead into the third section.
Having said all of the above, I would like to point out that my understanding of the possibilities created by OO has improved through reading this book. I understand most of the material up to (and including) Chapter 11 and it has improved my conception of object oriented design; it has just been an large uphill struggle from page 1. Purchase with caution.