Written by Mark Pringle | Last Updated on Thursday, December 08, 2022
C# Programming General Information
What are Design Patterns
Design patterns are reusable solutions to common problems that programmers have frequently encountered. In essence, they are a design precedent or template applied to real-world programming problems.
Using design patterns will make your applications dependable, scalable, and easily maintainable. Additionally, to be a great programmer, you must learn to think in terms of design patterns. Doing so will facilitate communication with other programmers and allow you to learn different programming languages faster.
Types of Design Patterns
Creational
As the name implies, creational design patterns deal with the initialization and object creation mechanisms. The following are types of creational design patterns.
- Singleton
- Factory
- Abstract Factory
- Builder
- Prototype
Structural
A structural design pattern deals with how objects and classes are assembled into larger structures. The structural pattern focuses on implementing classes and their objects and the decoupling interface. The following are types of structural design patterns.
- Adapter
- Bridge
- Composite
- Decorator
- Façade
- Flyweight
- Proxy
Behavioral
Behavioral design patterns type deals with the communication between classes and objects. These patterns are concerned with algorithms and the assignment of responsibilities between objects. The following are types of behavioral design patterns.
- Chain of Responsibility
- Command
- Iterator
- Mediator
- Memento
- Observer
- State
- Strategy
- Template method
- Visitor