Nearly every software developer is familiar with the term "Design Patterns". This article is the beginning of a new series called "Lean Design Patterns with C#". This article is all about the basics of Design Patterns like what they are and why are they required. Problem Statement Consider a scenario consisting of 3 people, such as:
All of them have the same goal, which is to travel to Location W. And each of them used their own strategies to do it. But later they discovered how extremely expensive plane tickets are. A Train however is not as convenient, since we must change trains thrice, and the Bus will take 18 hours. In short, I was trying to explain for you that for every problem and solution there are new problems. So what do we need? We need a strategy which is tested, proven, documented and ready to implement. In this case we need someone who has been in Location W before, on whom all three have trust.
Structural Patterns Sometimes we encounter a point where we want to change the structure of the class without affecting the project. A structural pattern rescues us in these situations. They are:
Behavioral Patterns A behavioral pattern solves problems occurring when we try to tamper with the behavior of a class. They are:
We will cover each and every pattern one by one. We will try to understand fundamentals about each pattern and then make a code walkthrough. Hope you enjoyed reading this article. Hope to see some good comments.