Design patterns have been around for a long time in software development. Design patterns are basically a standard approach to solving a problem that can be found constantly in software development. Patterns are typically used for creating reusable designs, and defining the interactions between different objects or subsystems. I like to think of design patterns as a structured approach to software development and a very good way of improving communication between software developers. Continue reading
Professional PHP Design Patterns written by Aaron Saray, coming in at around 250 pages is a very short and concise book. Unfortunately, the book doesn’t cover all of common design patterns but does do an adequate job of covering about 17 different patterns.
Each of the 17 patterns covered include fairly easy to understand examples, solutions, and a few pages of very easy to understand text regarding when to use the pattern and best practices for using the pattern. The pattern examples are clearly not just able to be dropped into your project, but each example could be easily adapted for most situations. Saray, has tried to be consistant and use a CD Store as an example and dsicusses how the code for its ecommerce solution would change as the company grows and offers different products.
I’m a little disappointed that there’s a few patterns that aren’t covered that I feel are so important: Chain Of Responsibility, and bridge pattern. Patterns are covered for 125 of the pages, and I really felt the book should be much larger to really cover more of the patterns.
The 20th chapter of the book is titled “Requirements Analysis” and covers an example situation that occurs before software development should happen. Saray throws out a few tips that I would consider best practices, and a generally good method of determing the requirements although I really felt that the example that takes over the next few chapters could have been much much better. Chapter 21 is an excellent addition to the book, because Saray takes the time and explains how he would do things by using UML diagrams and a lot of text before the programming happens. Saray really uses chapter 21 to mention all of the patterns he will use before he starts developing the application in chapter 22 and 23.
I wouldn’t pay full price for the book, and thankfully was able to find the book for a deep discount at a store in Buffalo. Over all, I like the book and felt I learned some pretty valuable things but I felt that in a few ways more time could have been spent on the patterns.