Single Responsibility Principle: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 13: Line 13:


Other formulation is: a class should have only a single reason to change.
Other formulation is: a class should have only a single reason to change.
The single responsibility principle is another way to define [[Cohesion|cohesion]].

Revision as of 19:09, 23 December 2020

External

Internal

Overview

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

Other formulation is: a class should have only a single reason to change.

The single responsibility principle is another way to define cohesion.