DEV Community

Discussion on: WHY YOU SHOULD BE FOLLOWING THE SINGLE RESPONSIBILITY PRINCIPLE

Collapse
 
peerreynders profile image
peerreynders

It says

A class should have one, and only one reason to change.

The Single Responsibility Principle by Robert C. Martin (~2010):

Gather together those things that change for the same reason, and separate those things that change for different reasons.

YouTube

See also The Single Responsibility Principle (2014).