- Paperback: 340 pages
- Publisher: musketeers.me, LLC (July 1, 2005)
- Language: English
- ISBN-10: 0973589825
- ISBN-13: 978-0973589825
- Product Dimensions: 7.5 x 0.7 x 9.2 inches
- Shipping Weight: 1.3 pounds (View shipping rates and policies)
- Average Customer Review: 3.3 out of 5 stars See all reviews (10 customer reviews)
- Amazon Best Sellers Rank: #2,406,230 in Books (See Top 100 in Books)
Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.
To get the free app, enter your mobile phone number.
php|architect's Guide to PHP Design Patterns Paperback – July 1, 2005
The Amazon Book Review
Discover what to read next through the Amazon Book Review. Learn more.
Customers who viewed this item also viewed
About the Author
Jason has been an IT professional for over ten years. He is currently the Manager of eBusiness for a Fortune 100 company. He has written several tutorials and articles for the Zend website and php|architect magazine, and has presented talks at numerous PHP conferences. He is also the author of "php|architect's Guide to PHP Patterns". He resides in Iowa with his wife and two children.
If you are a seller for this product, would you like to suggest updates through seller support?
Top Customer Reviews
My opinions are made upon a few assumptions. Some may agree others may not, which is the point of a personal review, if you share my point of view chances are that you'll experience the same thing.
1) I presume that anyone deciding to learn about design patterns is probably serious about Object Oriented Programming and anyone serious about OOP in PHP should probably switch from PHP4 to PHP5. This book has been out for about a year and a half. PHP5 was already on course to acquire wide acceptance, yet Jason chose to code mainly in PHP4, which is clearly crippled in its OO implementation compared to PHP5.
This is not so much of an issue in chapters where pattern implementation is very similar in both versions, but at times the lack of true OO features in PHP4 made it tedious to go through the examples and I felt like just skipping the PHP4 parts and go straight to the PHP5 ones. It wasn's easy because only some of these examples have a PHP5 equivalent.
We are therefore often confined to make sense of all the PHP4 idiosyncrasies deployed to mimic the simplest features natural to true OOP, like the use of global variables to emulate staticity, prepending the ampersand (&) to pass objects by reference and other little 'tricks' that succeed more at veering attention away from the pattern at hand to language features.
2) I presume that most people who got this book did because of the two keywords in the title 'Design Patterns'. Yet there is as much, if not more, about Test Driven Development (TDD) using Simpletest as there is about design patterns. Don't get me wrong, TDD is an excellent coding practice, but as much as it can be practiced along with design patterns both can be clearly isolated. If, like me, you learn by focusing on one specific topic at a time, you will find this book's approach very annoying at times.
First, it's an informal introduction to TDD. You will probably need more support from a more specific text on TDD before really becoming proficient at it, so I don't see the point in trying to actually teach it along with design patterns. An introductory chapter would have been enough (the Mockobject Pattern chapter was perfect for this) and maybe an appendix with links to tests for the examples for those interested.
Second, Jason's insistence to test every bit of piece of code makes the reading even more tedious. Examples are cluttered with tests and the logic doesn't flow as smoothly anymore. Plus, TDD is an iterative coding process, meaning that you write a little test and then you implement just enough logic for the test to pass, then you add some more test and then you... repeat until done. If in real life the overall result can be good, it is not very practical to try and reproduce it in a book. Your tests may never be exhaustive or meaningful enough to actually matter and you may be constrained to use examples a tad bit too simplistic to illustrate your point, which is exactly what happens in this book.
I felt that the introduction of TDD in the book was meant exactly as a separate attempt at explaining that technique, not as a support to understand design patterns and the two topics became somehow intertwined and less substantial. Trying to chase a rooster and a rabbit, we're left with a chick and a bunny.
Here are my recommendations for the next edition:
- Forget php4
- Keep TDD for another book or introduce it in the mockobject pattern chapter or an appendix
- Concentrate on design patterns
- Include more solid examples
- Work more on refactoring solutions to really show how they remap to patterns
A great strength of the book is the author's clear devotion to the other practices like test driven development and UML. These things do not get in the way of the book's intent; Sweat gives you code example after code example, and what could be better in a programming book?
Some reviewers are quick to jump on things like typos (there are a few) but grammar aside it's clear the author poured a lot of devotion into this book.
I also like that the book introduced me to patterns that are not covered in Head First or the Gang Of Four book, like the emminently useful Registry Pattern; there are also patterns to solve particular problems for the language, like the Value Pattern. If you've picked up a design patterns book in the past and were put off because all the examples are in Java, you owe it to yourself and your craft to pick this title up.
Next I want to see a book called "Refactoring PHP To Patterns"!!
Throughout the book you'll find lots of hackish PHP4 examples -which are useless now- and lots of badly written PHP5 examples (maybe because PHP5 were just beginning back then).
As I stated on the title, this book should've been good 7 years ago, but for now, it's outdated.
I really don't recommend this book if you understand at least 2 or 3 Design Patterns, or if you are serious about PHP OO programming.
The quality of the paper and ink is like a home made printed book. The price is too high for that quality.