Design Patterns: Single Responsibility Principle Explained Practically in C# (The S in SOLID)



Design Patterns: Single Responsibility Principle Explained Practically in C# (The S in SOLID)

Design Patterns: Single Responsibility Principle Explained Practically in C# (The S in SOLID)

When you are writing code, are you doing it right? That is a question that worries a lot of people, and it should probably at least be something every developer thinks through. Design patterns are best-practice concepts that we can implement into our code to make it better in some way. Think of them as guardrails that keep our code safe. In this video, we are going to look at the first entry in the famous SOLID principle. The S stands for Single Responsibility Principle. We are going to dive into what it means, how it should change our programming practices, and how far we should take it.

Newsletter signup (with exclusive discounts): https://signup.iamtimcorey.com/ (your email will be kept safe and you will not be spammed).
Source Code: https://leadmagnets.app/?Resource=SInSOLID

0:00 – Intro
1:33 – Demo code overview
1:56 – Single Responsibility Principle: SRP explained
5:09 – Implementing SRP: Refactoring demo code
24:38 – Recap
25:28 – Summary and conclusions
29:45 – Why many classes is not a problem for your application
31:29 – How to keep a balance: creating to classes, when to split up a class
33:23 – Concluding remarks

Comments are closed.