Object-Oriented Design Patterns #2 — Patterns Classification
Object-oriented design patterns series — Patterns Classification. Short notes in plain English, use cases and live examples.
There are a lot of OO design patterns. For this reason, you should know a bunch of patterns to be able to choose the right one for a specific situation. But in a lot of cases, there is no “right” solution: you may have several suitable options that differ by complexity, scalability, elasticity, and so forth. You should know your system to find the final solution, and no article on the internet will help you with this to the full extent.
We are going to follow a traditional OO design patterns classification — “by purpose”. This classification divides patterns into 3 groups by functional cases they may be used in.
You will find a lot of high-level information in this series that will allow you to generally understand what design pattern may be useful for your problem. Then I highly recommend you use provided references to find an in-depth explanation of the patterns you’re gonna use.
Creational
This group of patterns is about creating instances of classes in a flexible way. There are approaches that improve code reusability and extensibility.
- Factory Method
- Abstract Factory
- Builder
- Prototype
- Singleton
Structural
This group of patterns provides ways of building structures of related objects w/o mess and in an elastic manner.
- Adapter
- Bridge
- Composite
- Decorator
- Facade
- Flyweight
- Proxy
Behavioural
This group of patterns is about solutions for building tolerant communications between objects.
- Chain of Responsibility
- Command
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template Method
- Visitor