Going to keep this one small and to the point today and we’re going to take a look at Design Patterns.
Essentially design patterns are a reusable solution to solving our software development problems. This is great because it means someone has taken the time to put together problem solving templates that we can apply during our development.
Now there are a lot of design patterns out there and I mean a lot but they all, generally, fall into 3 categories:
- Concerned with the creation of objects
- Concerned with the relations between classes and objects.
- Concerned with the interactions between objects
The above 3 categories pretty much sum up all the design patterns we need to worry about about.
So how did we get to the point where we have well-know and well-defined design patterns we can use? It started with the release of a book called Design Patterns: Elements of Reusable Object-Oriented Software in 1995 by a group called the Gang of Four (GoF). The GoF consisted of:
- Erich Gamma
- John Vlissides
- Richard Helm
- Ralph Johnson
Which even today is considered one of the most reliable resources on software design patterns. From this book we got 23 design patterns split into the above 3 categories.
- Creational: 5 Patterns
- Abstract Factory
- Structural: 7 Patterns
- Behavioral: 11 Patterns
- Chain of responsibility
Well that’s quite a list isn’t it, and it’s only grown since then.
So how do these patterns actually help us with developing software?
I’ll pick that up next with posts dedicated to each category, first up: Creational.
I welcome feedback, especially at this very early stage, so any improvements you think I can make please get in touch either in a comment below or send me a message and I’ll get back to you.