This article explains the Single Responsibility Principle (SRP), in other words S from SOLID.
This article is a continuation of my previous article on SOLID principles. Here we will talk about the Single Responsibility Principle (SRP), in other words "S" from SOLID.Look at the following image and understand what this person is doing.Confused?Let us write down the tasks he is doing:
In short, we have separated our concerns.SRP: Single responsibility Principle is exactly the same. Do one thing only and do it properly.To remember this principle I always use one sentence "Do what is told you to do".I hope you liked this article and will use this concept when coding/programming.In my next article we will discuss "O", the Open Closed Principle. Until then stay tuned and keep learning. Cheers!
Pro WPF: Windows Presentation Foundation in .NET 3.0