Commonly used object types in java (po, vo, bo)

 PO(persistant object )
  1. The concept of persistent object in o/r mapping, if there is no o/r mapping, there is no such concept. 2. Usually corresponds to the data model (database), and it also has some business logic processing. It can be seen as a java object mapped to a table in the database. 3. The simplest PO corresponds to a record in a table in the database, and multiple records can use a collection of POs. PO should not contain any operations on the database.
    VO (value object)
  1. The value object is usually used for data transfer between the page and the control layer. Like PO, it only contains data. 2. But it should be an abstract business object, which can correspond to a table or not, depending on the needs of the business. 3. To be precise, it is a business object that lives in the business layer and is used by business logic. The purpose of its existence is to provide a place for data to live.
    BO (business object)
  1. The main function of the business object is to encapsulate the business logic into an object. This object can include one or more other objects. 2. For example, a resume, with educational experience, work experience, social relations, etc. We can map educational experience to a PO, work experience to a PO, and social relationships to a PO.
    Create a BO object corresponding to the resume to process the resume, and each BO contains these POs.
  3. When dealing with business logic in this way, we can deal with BO.

Guess you like

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