Explain the Single Responsibility Principle (SRP)?

Technology CommunityCategory: Software ArchitectureExplain the Single Responsibility Principle (SRP)?
VietMX Staff asked 3 years ago

Single responsibility is the concept of a Class doing one specific thing (responsibility) and not trying to do more than it should, which is also referred to as High Cohesion.

Classes don’t often start out with Low Cohesion, but typically after several releases and different developers adding onto them, suddenly you’ll notice that it became a monster or God class as some call it. So the class should be refactored.