July 20, 2008
Design Patterns
PHP5's Object Oriented features has enabled programmers to use advanced programming techniques like Design patterns.
What are Design Patterns?
From wikipedia, a design pattern is a general reusable solution to a commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. It is a description or template for how to solve a problem that can be used in many different situations.
If you have been programming long enough, I am sure you have used one or more of them..
Here are a few Design Patters that are commonly used:
When should it be used?
It should only be used if and only if the situation requires it and your . You should not use design pattern in small projects which only requires a simple designs.
Through the years, programmers have been catalogueing them in books. The most notable are Martin Fowler's Patterns of Enterprise Application Architecture and Gang of Four's (Gof) Design Patterns: Elements of Reusable Object-Oriented Software. These books are great references when studying Design Patterns.