Skip to main content

2 docs tagged with "single-responsibility"

View all tags

Chapter 7: SRP — The Single Responsibility Principle

The most misunderstood SOLID principle. SRP is NOT "every class does one thing" — it means a module should have only one reason to change, i.e., it serves only one actor. Learn the two symptoms of SRP violation and how to solve them.

Single Responsibility Principle

Every class should do **exactly one thing** and do it well. If a class is handling multiple unrelated responsibilities, then it has multiple reasons to change.