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

PO(persistant object) Persistent
object is a concept that appears when o/r is mapped. 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.

DO (Domain Object) domain objects
are tangible or intangible business entities abstracted from the real world.

TO(Transfer Object), the data transfer object The object transferred between different ties (relationships) of
the application

DTO (Data Transfer Object)
The concept of data transfer object 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 and improve the performance of distributed calls. and reduce network load, but here I generally refer to the objects used for data transfer between the presentation layer and the service layer.

VO(value object) Value object
is usually used for data transfer between business layers, and 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.

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.

POJO(plain ordinary java object) A simple and irregular java object A
plain 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, and no other attributes and methods are added. My understanding is the most basic Java Bean, only attribute fields and setter and getter methods! .

DAO (data access object) data access object
is a standard j2ee design pattern of sun, an interface in this pattern is DAO, which is responsible for the operation of the persistence layer. Provide an interface 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, the database is operated in combination with PO. Sandwiched between business logic and database resources. Cooperate with VO to provide CRUD operations of the database.

Guess you like

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