Entity class, boundary class and control class

               Entity Classes, Boundary Classes, and Control Classes
Entity Classes:
  Entity classes are classes used to model the information and related behaviors that must be stored. Entity objects (instances of entity classes) are used to save and update information about phenomena, such as events, people, or some real-life objects. Entity classes are usually permanent, and they have properties and relationships that are needed for a long time, sometimes even for the entire lifetime of the system.
Boundary class:
  Boundary class is a class for interaction modeling between the business actors inside the system and outside the system. The boundary class depends on the external environment of the system, such as the operating habits of the business protagonist and the restrictions of external conditions. It is either a GUI provided by the system for the operation of the business protagonist, or an interactive interface between the system and other systems, so when the external GUI changes or the communication protocol changes, it is only necessary to modify the boundary class. There is no need to modify the control class and entity class. The business protagonist interacts with the control object and realizes the task of the use case through it.
Control class: The
    control class is used to model the control behavior specific to one or several use cases. It describes the realization of the business logic of the use case and the design of the control class. It has a lot to do with the use case realization. In some cases, a use case may correspond to multiple control class objects, or a control class object corresponds to multiple use cases. There is no fixed correspondence between them, but analysis and judgment are made according to the specific situation. The control class effectively separates the business logic from entity data and boundary control, and focuses on processing business logic. The control class separates unique operations from entity classes. It is beneficial to the unification of entity classes and to improve the reusability.
    When the business protagonist executes the use case through the boundary class, a control class object is generated. After the use case is executed, the control class object will be destroyed.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326208093&siteId=291194637