Part 1 of 2
Even if you have never set eyes on a pattern catalog in your life, you have probably come
across the phrase design patterns in recent years. You may even have assumed that
patterns were yet another fad. After the turn of the century it suddenly seemed that
patterns were everywhere, and PHP was not immune. Yet with increased support for objects
in PHP 5, design patterns are set to become an essential tool for the PHP coder.
In this article I introduce patterns in the context of PHP 5. From a basic definition,
I work through to a short example. I also describe the structure of a pattern and explain
some of the principles that the classic patterns promote and deploy.