Single Responsibility Principle
Single Responsibility Principle Source https://blog.cleancoder.com/uncle-bob/2014/05/08/SingleReponsibilityPrinciple.html Question What exactly is a reason to change? How people interpret “reason to change” Bug fix? Refactoring? Core Idea Relate “reason to change” with “responsibility”. The above two are the programmer’s responsibility. => Who should the program’s design respond to?! Example 1. CEO Reporting to the CEO is a C-Level decision (CFO, COO, CTO). 2. CFO Responsible for controlling finance. 3. COO Responsible for operating the company. ...