Design Patterns in PHP [Series]
A lot of developers – including myself – have at some point in their programming careers found themselves repeating a task that they have completed for a previous project or for a previous part of the same project.
This problem of repeating code is solved by design patterns. A design pattern is the way that the code must be structured so that the problem at hand can be solved. The characteristics of design patterns are:
- Name – it lets other programmers know what this pattern does.
- Problem – where the pattern can be applied
- Solution – how this pattern is implemented
In the course of the next few weeks, I will publish a series of blog posts, where I will try to present you with some common design patterns and how I have understood their use. Most books and online materials concentrate on just presenting the issue at hand and do not focus on how we ended up there. In these blog post series I will try to show you what I found along the way and how I solved each problem in turn.
As usual comments are more than welcome.
The design patterns I will discuss in posts of these series are as:
- Singleton Pattern
- Factory Pattern
- Registry Pattern
- Decorator Pattern
- Adapter Pattern
- Iterator Pattern
- Strategy Pattern
- Active Record Pattern
- Value Object Pattern
- Model View Controller Pattern
- MockObject Pattern
- Observer Pattern
- Proxy Pattern
- Table Data Gateway Pattern
- Data Mapper Pattern
You can check this blog every week, subscribe to the RSS feed or follow me on GitHub (or all of the above).