Gof Patterns Overview
GOF(Gang Of Four) patterns are commonly used reusable object oriented programming patterns while developing highly maintainable and reusable software.
GOF patterns can be categorized into creational patterns, structural patterns and behavioral patterns. Most of the patterns follow object-oriented principles and SOLID principles.
Creational patterns deal with object creation. Frequently used creational patterns are
Abstract Factory Pattern
Object Pool Pattern
Structural patterns deal with complex structures creation by making use of relations between objects and classes. Many structural patterns are based on Inheritance and Polymorphism. Most commonly used structural patterns are
There are other structural patterns but not commonly discussed with GOF pattern. Following are few
Marker interface is an empty interface to mark specific classes (such as
Serializable). Marker interface makes search by interface possible.
In software development classes are grouped together to implement an application feature or concept to form a module. Modular architecture contains multiple patterns like MVC, MVVM, etc.
Behavioral patterns deal with object interaction, communication and control flows. Most behavioral patterns are based on composition and delegation rather than inheritance. Frequently used behavioral design patterns are
Chain of Responsibility Pattern
Template Method Pattern
Null Object Pattern