GOF (Gang Of Four) “Design Patterns: Elements of Reusable Object-Oriented Software ” is one of the highly influential book in the field of object orient elementary design patterns. Most of the patterns presented in this topic have been adapted from this book.
My C# implementation on the above book can be found at github.
(Click on the above sub-title link for detailed notes.)
These set of patterns deal with the creation of objects.These patterns essentially give you controls such as limiting the number of instances of the class, time of instance creation – on demand vs lazy, initialization on object creation, selection of concrete implementation to be instantiated at run time and so on.
- Limiting number of instance
- Singleton
- Multiton
- Singleton registry
- Object pool
- Initialization
- Lazy initialization
- Prototype
- Dependency injection
- Selection of concrete implementation
- Factory
- Factory method
- Abstract factory
- Lazy factory
- Object construction
(Click on the above sub-title link for detailed notes.)
Behavioral design patterns deal with the communication of objects. Patterns of this type vary with assignment of responsibilities to the communicating objects and the way they interact with each other. Following patterns are covered in the above link.
- Chain of responsibility
- Command pattern
- Interpreter pattern
- Mediator pattern
- Iterator pattern
- Observer pattern
- Visitor pattern
- Template pattern
- Strategy pattern
- State pattern
- Momento pattern
- Null object pattern
- Scheduled task pattern
(Click on the above sub-title link for detailed notes.)
Structural design patterns are software patterns that help in solving standard problems in creating static structure of classes through inheritance and composition.
- Adapter pattern
- Facade pattern
- Decorator pattern
- Bridge pattern
- Composite pattern
- Flyweight pattern
- Proxy pattern
- Marker interface pattern