[reviewed by XPSD member Woody Zuill]
One common technique I use when looking at a book I am thinking of
buying is to flip through to a dozen or so random pages and read a
paragraph or a bit of whatever is on that page. If most of these chance
peeks reveal something interesting or useful to me, then I figure I'll
probably get enough out of the book to make it worth buying. I did that
with this book, and found plenty of interesting stuff. However, in the
reading of the book I was a bit disappointed.
First, the bad:
The book attempts to cover too much for the number of pages. The Title
is clear enough, but the subtitle ("Patterns, Frameworks, Testing, and
More") coupled with the introduction, which states "In this book, you
will learn how to make the most of your PHP programming, from a detailed
understanding of OOP theory, to frameworks and advanced system
interoperability" promises a great deal more than what the book
delivers. For example, the "detailed understanding of OOP theory" is
provided by a 7-page chapter on "Abstract Classes, Interfaces, and
Programming by Contract" and another chapter covering static members.
This is sufficient to describe a little about the mechanics of OOP in
PHP, but it's a stretch to call it even an introduction to the theory of
OOP. Pretty much the same can be said for the coverage of Patterns,
Frameworks, and Testing. I am not exactly sure what "advanced system
interoperability" is, I assume the author is refering to web services
which is covered to some degree.
To me, the book seems disjointed, and more like a collection of magazine
articles than a cohesive book. There is unevenness in the level of
coverage from topic to topic. Some chapters are thorough enough to be
considered complete, or at least a good introduction, such as the
chapters on Exceptions and Reflection, and all of "Part 3, The Standard
PHP Library". Each of these chapters would make a nice article. Others
contain a bare introduction, like the "Testing, Deployment, and
Continuous Integration" chapter. In some cases, there isn't enough
information to even consider it an introduction (such as the chapter on
AJAX and JSON.) It probably would have been better to replace these
chapters with more coverage of one of the other topics. Particularly,
for example, there is a chapter on what is coming in PHP6. It seems
very out of place and this sort of info can be easily found by a web
search.
Now, the good:
Kevin McArthur writes cleanly and I found everything easy to read and
understand. He is obviously very knowledgeable about programming in PHP
and presents his ideas clearly. I learned a lot from the topics that
were sufficiently covered (such as the chapters on Exceptions,
Reflection, and the SPL.) I feel that there was enough substance to get
me started on these topics.
Additionally, I like Kevin's "Just the Facts" synopsis at the end of
each chapter. In a paragraph or two he summarizes what was just
presented in a very succinct manner without any of the fluff or filler
we so often see in the typical programming book (like the "what's coming
in the next chapter" blurbs: I find that I can easily turn the page to
see what is "coming"!) Similarly, I enjoyed most of his chapter
introductions - he did a good job of describing what he was going to try
to cover.
Should you buy the book?
"Pro PHP" wouldn't be my first choice for a "PRO" level PHP book, but I
got enough out of it that I don't regret having read it. How is that
for a good sound bite?