Java medium PO, DO, TO, DTO, VO, BO, POJO, DAO concept

This article is reproduced - original @HollisChuang: http://www.hollischuang.com/archives/553

1.PO (persistant object) persistent object

  The concept that appears in o/r mapping, if there is no o/r mapping, this concept does not exist. Usually corresponds to the data model (database), and it also has some business logic processing. It can be seen as a java object that maps to a table in the database. The simplest PO corresponds to a record in a table in the database, and multiple records can use a collection of POs. The PO should not contain any operations on the database.

2. DO (Domain Object) domain object

  It is a tangible or intangible business entity abstracted from the real world.

3.TO(Transfer Object), data transfer object

  Objects transferred between different applications

4. DTO (Data Transfer Object) data transfer object

  This concept comes from the design pattern of J2EE. The original purpose is to provide coarse-grained data entities for EJB distributed applications to reduce the number of distributed calls, thereby improving the performance of distributed calls and reducing network load, but here, I generally refer to the data transfer object used between the presentation layer and the service layer.

5.VO(value object) value object

  It is usually used for data transfer between business layers. Like PO, it only contains data. But it should be an abstracted business object, which can correspond to a table or not, depending on the needs of the business. Created with the new keyword and reclaimed by the GC.

6.BO (business object) business object

  From a business model perspective, see Domain Objects in the UML Element Domain Model. The java object that encapsulates the business logic, by calling the DAO method, combined with PO, VO to carry out business operations. business object: The main function of business object is to encapsulate business logic as an object. This object can include one or more other objects. 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 resumes to process resumes, and each BO contains these POs. When dealing with business logic in this way, we can deal with BO.

7.POJO(plain ordinary java object)

  A java object in the traditional sense. That is to say, in some Object/Relation Mapping tools, the persistent object that can maintain database table records is completely a pure Java object that conforms to the Java Bean specification.

Guess you like

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