VO, PO, DO, DTO, BO, QO, DAO, POJO concept

PO (persistant object) persistent object

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

DO (Domain Object) domain object

It is a tangible or intangible business entity abstracted from the real world. Generally corresponds to the table structure in the data.

TO (Transfer Object), data transfer object

Objects transferred between different ties (relationships) of the application

DTO (Data Transfer Object) data transfer object

This concept comes from the J2EE design pattern. 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 transmission object used between the presentation layer and the service layer.

VO(view object) value object

The view object is used in the display layer, and its function is to encapsulate all the data of a specified page (or component).

BO(business object) business object

From the perspective of the business model, see the domain objects in the UML component domain model. Java objects that encapsulate business logic can perform business operations in conjunction with PO and VO by calling DAO methods. business object: The main function of a 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 and so on. We can correspond to a PO of education experience, a PO of work experience, and a PO of social relations. Create a BO object corresponding to the resume to process the resume, and each BO contains these POs. When dealing with business logic in this way, we can deal with BO.

POJO (plain ordinary java object) simple and irregular java object

Pure traditional java object. 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, without adding other properties and methods. My understanding is that the most basic Java Bean has only attribute fields and setter and getter methods! .

DAO (data access object) data access object

It is a standard j2ee design pattern of Sun. One of the interfaces in this pattern is DAO, which negatively operates the persistence layer. Provide interfaces for the business layer. This object is used to access the database. Usually used in conjunction with PO, DAO contains various database operation methods. Through its method, combined with PO to perform related operations on the database. Sandwiched between business logic and database resources. Cooperate with VO, provide CRUD operation of database

Guess you like

Origin blog.csdn.net/ke369093457/article/details/90211098