Recently I’ve started posting a small series of OO related articles, they cover the APIE concepts and the SOLID principles, if you haven’t read these yet, I strongly suggest you do. Once you’ve got an understanding of how to write maintainable and extensible code, the next step is learn how to solve common programming problems using design patterns.
Design patterns have been around for decades, they were first defined properly by the Gang of Four (GoF). Since being defined they haven’t changed that much, in fact many patterns haven’t changed at all. Each pattern is placed into a group, based on what it attempts to achieve. These group are, creational, structural, behavioural and concurrent.
There are also architectural patterns, these are similar to design patterns, but they have a broader scope, taking the entire system into account, where a design pattern is more specific to an area of code.
Over the next 3-4 months I am going to be writing articles about when, where and why to use the most mainstream design patterns in PHP. I’ll do my best to provide real world use cases, but I aim to keep each article short and concise. My first article will show how to use the Singleton design pattern, which will be written later this week.
In the mean time if you want to get a heads up on all the design patterns commonly used in software development, you should check out the Wikipedia entry on Software Design Patterns7 Love This