po dto vo bo

DozerBeanMapper is a mapping tool for JavaBean, which can assign the same attribute name between objects
 
 
Regarding the relationship between PO, DTO, and VO in the layered model: first, DAO accesses the database at the persistence layer to encapsulate the data object into PO, and then at the service layer, the PO is mapped to a DTO object and further processed. to the presentation layer, and then mapped to a VO object in the presentation layer.
 
 
1.PO: The most vivid understanding of
persistant object persistent object is that a PO is a record in the database .

 
2.BO:
business object
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.
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.
When dealing with business logic in this way, we can deal with BO.
 
3.ViewObject presentation layer object , which mainly corresponds to the data object displayed on the interface . For a WEB page, or an interface of SWT and SWING, use a VO object to correspond to the value of the entire interface.
 
4.DTO: Data Transfer Object The data transfer object
is mainly used for remote calls and other places that require a large number of transfer objects.
For example, if our table has 100 fields, then the corresponding PO has 100 attributes.
However, we only need to display 10 fields on the interface, and the
client uses WEB service to obtain data. There is no need to pass the entire PO object to the client.
At this time, we can use the DTO with only these 10 attributes to pass the result to the client. This will not expose the server-side table structure. After reaching the client, if this object is used to display the corresponding interface, then its identity will be changed to VO
    
5. DAO
It 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, provide CRUD operation of database
 
6. POJO simple random java object
It is the most basic Java Bean, with only property fields and setter and getter methods! . POJOs are not any role in the hierarchy. POJOs are simple Java objects that do not depend on other frameworks.

 

Guess you like

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