Single responsibility principle
Принцип единственной ответственности. Является частью SOLID. У каждого класса или модуля должна быть только одна причина для изменений.
Сам Мартин формулирует SRP тремя разными способами:
Формулировка 2003 года:
The Single Responsibility Principle (SRP) states that a class or module should have one, and only one, reason to change
-- Robert C. Martin, Agile software development Principles Patterns and Practices
Формулировка 2014 года:
Gather together the things that change for the same reasons. Separate those things that change for different reasons.
-- Robert C. Martin, The Single Responsibility Principle
Формулировка 2018 года:
A module should be responsible to one, and only one, actor
-- Robert C. Martin, Clean Architecture
Является отражением принципов связанности и сочетаемости. Часто понимается неправильно