Design pattern using c#
Tags: designpatterns, csharp, tutorial, dotnet
Published: 2023-08-24 14:05:36

Design patterns are reusable solutions to common problems that occur during software design and development. They are like templates or blueprints that provide a structured way to solve recurring design challenges in a software application. These patterns are not specific to a particular programming language or technology; instead, they offer general guidelines and best practices for designing robust, maintainable, and efficient software.

There are mainly 3 categories of design patterns introduced by the "Gang of Four" (GoF) in their book "Design Patterns: Elements of Reusable Object-Oriented Software." explained below:

**Creational Patterns:** These patterns deal with object creation mechanisms, abstracting the instantiation process.
- [Abstract Factory](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-02-abstract_factory-md)
- [Builder](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-03-builder-md)
- [Factory Method](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-01-factory-md)
- [Prototype](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-04-prototype-md)
- [Singleton](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-05-singleton-md)

**Structural Patterns:** These patterns focus on how objects are composed or structured to form larger, more complex structures. 
- [Adapter](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-06-adapter-md)
- [Bridge](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-07-bridge-md)
- [Composite](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-08-composite-md)
- [Decorator](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-09-decorator-md)
- [Facade](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-10-facade-md)
- [Flyweight](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-11-flyweight-md)
- [Proxy](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-12-proxy-md)

**Behavioral Patterns:** These patterns are concerned with how objects interact and communicate with one another.
- [Chain of Resp.](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-13-chain_of_responsibility-md)
- [Command](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-14-command-md)
- [Interpreter](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-15-interpreter-md)
- [Iterator](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-16-iterator-md)
- [Mediator](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-17-mediator-md)
- [Memento](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-18-memento-md)
- [Observer](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-19-observer-md)
- [State](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-20-state-md)
- [Strategy](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-21-strategy-md)
- [Template](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-22-template-md)
- [Visitor](https://gist.github.com/ernitingarg/179a443096752c84353853b9d303373e#file-23-visitor-md)