Tuesday, August 16, 2005

PHP Design Patterns

Would this be more efficient with a Singleton, Iterator, Factory, Strategy, or Model-View-Controller design pattern?

The basic question of whether a design pattern will fit a particular task better than the usual prcedural script method is one asked by many coders over the course of any application build. Unfortunately, it has been some 7 or 8 years since I took the C++ class in college that covered patterns. Thus, I have found that my knowledge is really out of date with current patterns.

I started my search on a good reference for current PHP design patterns and found a great book: php|architect's Guide to PHP Design Patterns ($32.99 USD)

This book is one of the best references for PHP design patterns that is in my library. There are many examples for not only PHP5 but also PHP4 adaptations. The problem with PHP4 is that a lot of traditionally OOP features are not implemented...but there are a few workarounds. If you are into high level or professional PHP coding I highly recommend you get a copy.