Following my petty wingeing about the design patterns in php on the web I have to bite the bullet and do something about it. So here it comes a collection of design pattern examples, some from the GOF book, some collected from around the net, some (maybe) I have discovered. I have to admit, I had an eye opener, when I was rereading Peter Norvig's presentation on Design Patterns in Dynamic Laguages. I shamelessly lift a lot from there, should I quote everything?
The intent of these pages is to show the shapes of the patterns not a fully fledged implementation. In real life probably a combination of patterns will be employed. Everyone has their own favourites following their political, religious and style differences.
It is a work/study in progress, so expect changes and additions. Some of the patterns are transparent in php, but are given for comparison with other implementations.
This is not a pattern fundamentalist site, so no single interpretation is considered the one and only truth
update I've updated the list with a number of other design patterns. To the trolls, sorry purists, - yes, I'm aware that I smudge the boundaries between design patterns, idioms, techniques, ... That is intentional. The world is not black and white, not even grayscale.