7 Must Know Software Design Patterns
A Dive Into These Patterns With Examples in .NET
Why Should We Care About Design Patterns
Simply put, design patterns help us solve problems by creating a reusable solution that we can use as a template for our software. That being said, design patterns aren't algorithms and you can't paste them into the code base. They give you a template of sorts, but if misused some patterns may cause additional complexity and that's not what they were meant to do.
There's a lot of controversy regarding design patterns — whether or not some of them are outdated or the fact that they are often being over-used which causes that additional complexity we mentioned, but the fact of the matter is that quite a few of them are very important and in order to not misuse or over-use them you will need to fully understand them.
There are 3 types of design patterns:
- Creational
- Structural
- Behavioural
We'll discuss the type of each one as we go along so without further ado let's start.
1. Singleton
Creational Pattern