Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SRP & "axis of change"?

I'm reading Bob Martin's principles of OOD, specifically the SRP text, and I understand the spirit of what it's saying pretty well, but I don't quite understand a particular phrasing, from page 2 of the link (page 150 of the book):

I paraphrase:

It is important to separate these two responsibilities into separate classes because each responsibility is an axis of change.

What exactly is meant here by "axis of change"?

like image 798
lance Avatar asked Jun 01 '10 19:06

lance


1 Answers

Changes occur around the axis and that suggest that each responsibility acts as a central point for the class's existence. You want a class to have a single reason to exist such that changes are easier to manage.

like image 140
Dave White Avatar answered Jan 07 '23 16:01

Dave White