Study notes (3): Chapter 1 Software Architecture Design Principles-3.Simple Responsibility Principle Single Responsibility Principle

Learn now: https://edu.csdn.net/course/play/28942/403590?utm_source=blogtoedu

  1. Single responsibility: a class, interface, and method are only responsible for one responsibility; define an interface for cooking, an interface for eating, and then a class implements the above two interfaces at the same time
  2. As we often use to pass a handleType to distinguish between operations such as [Report] [Return] [Recover], it is actually not in line with a single responsibility

Guess you like

Origin blog.csdn.net/qq_28500837/article/details/111660558