Clarification on Single Responsibility Principle: Actor vs. Responsibility

30 Views Asked by At

I need help understanding the Single Responsibility Principle (SRP) in software development. I know that SRP says a class should only change for one reason, but I'm confused about the difference between an "actor" and a "responsibility" in this rule.

1

There are 1 best solutions below

0
plainionist On

Software is changed to satisfy their stakeholders (actors). Different stakeholders (actors) have different roles, resulting in different perspectives on the software, leading to different requests for change, e.g.:

  • domain expert requests changes of the application logic
  • UX expert requests changes in the look & feel of the application.
  • architect requests changes to keep the technology stack up to date

So, "single responsibility" means: A module should be responsible to exactly one stakeholder/actor/role.

For a more detailed discussion on this topic see: https://youtu.be/SUDlJSjh258