vo bo po dao pojo dto

时间:2022-11-06 21:13:19

vo bo po dao pojo dto

DAO: 
Data access object data access objects
The most familiar, and above O the biggest difference, basically no possibility and necessary to transform into each other.
Mainly used to encapsulate access to database. It can put the POJO persistence PO, assembled by PO VO, DTO

PO: 
Persistant object persistent object
A record of the image understanding is a PO that is in the database. 
The benefits can be put a record as an object, it will be convenient to the other objects.

BO: 
Business object service object
The main role is to encapsulate business logic as an object. The object may include one or more other objects. 
For example, a resume, education experience, work experience, social relations and so on. 
We can put the education has a corresponding PO, experience a corresponding PO, social relations corresponding to a PO. 
BO object processing resumes to establish a corresponding resume, each BO contains the PO. 
Such processing business logic, we can according to the BO to handle.

VO : 
The value object object
The ViewObject presentation layer object
The data object corresponding interface display. For a WEB page, an interface or SWT, SWING, with a VO object corresponding to the interface value.

DTO : 
Data Transfer Object data transfer object
Mainly used for long-distance calls need large transfer object place. 
For example, we have a table has 100 fields, then PO has 100 attributes. 
But we interface as long as the 10 display field, 
The client using WEB service to obtain the data, there is no need to pass the PO object to the client, 
Then we can use only these 10 properties of the DTO to transfer the results to the client, this also not exposed to the client server structure. Later, if you use this object to the corresponding interface display, then its identity to VO

POJO : 
Plain ordinary Java object java simple object
POJO personal feeling is the most common object is the most variable, is an intermediate object, the object is we most often deal with. 
A POJO persistence is PO
It is directly used for transferring, transfer process is DTO
Directly to the corresponding representation layer is VO

summary I think an object what O depends on the specific environment, in different application layer, different, the identity of the object is not the same, and the conversion of object identity is also very natural. Like you to wife's husband, for parents is the child. The design of these concepts of the original intention is not to, but to understand the logic and processing a variety of better, so that we can deal with the problem by using the object-oriented way better.

you don't fall into excessive design, need not to design and design must distinguish each object in code. A word is a technology for application service.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch.  Free Download

Posted by Blake at September 16, 2014 - 11:45 PM

https://www.programering.com/a/MTOxYjNwATM.html