Gang Of Four Design Pattern - Vykuntarao-n/designpatterns GitHub Wiki

What is a design pattern

A design pattern is a general reusable solution to a commonly occurring problem in software design. It is a template for how to solve a problem that can be used in many different situations. Patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.

Gang of Four Design Patterns

These are design patterns which were defined by four authors – Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides in their book Design Patterns: Elements of Reusable Object-Oriented Software. A lot has evolved in the field of software design since this book came out in 1994. This book and its patterns however make the foundation of the field of object oriented design patterns.

Creational Design Patterns:

Creational patterns deal with object creation i.e they look at ways to solve design issues arising out of creation of objects.

Creational Design Patterns
Pattern Name Tutorial Link Pattern Description
Abstract Factory Provides an interface for creating families of related or dependent objects without specifying their concrete classes.
Factory Method read tutorial Deals with the problem of creating related objects without specifying the exact class of object that will be created.
Singleton This pattern ensures a class has only one instance and provides a global(app-level) point of access to it.
Prototype read tutorial Specify the kinds of objects to create using a prototypical instance, and create new objects by copying this prototype.
Builder read tutorial Separates the construction of a complex object from its representation, thus enabling the same construction process to create various representations.

Creational Design Pattern

Structural Design Patterns:

Structural patterns ease the design by identifying a simple way to realize relationships between entities.

Structural Design Patterns

Behavioral Design Patterns:

Behavioral patterns identify common communication patterns between objects and realize these patterns.

Behavioral Design Patterns