单一责任原则和关注的分离有什么区别?
@H_403_1@
@H_403_1@
Single Responsibility Principle (SRP)-
give each class just one reason to
change; and “Reason to change” ==
“responsibility”. In example: Invoice
class does not have a responsibility
to print itself.Separation of Concerns (since 1974).
Concern == feature of system. Taking
care of each of the concerns: for each
one concern,other concerns are
irrelevant. Hiding implementation of
behavior.
从here。
@H_403_1@ 原文链接:https://www.f2er.com/javaschema/282601.html