PO BO VO DTO POJO DAO concept and its effect

VO (View Object): a view object for display layer, it is the role of a given page (or component) to encapsulate all of the data .

DTO (Data Transfer Object): data transfer object, this concept comes J2EE design patterns, the original purpose is to provide a distributed application EJB data entity coarse-grained, in order to reduce the number of the distributed calls, thereby improving call distributed performance and reduced network load, but here, it refers to the data transmission between the target and the presentation layer service layer .
DO (Domain Object): domain objects, that is, from the abstract in the real world of tangible or intangible business entity.
PO (Persistent Object): persistent object, with which the persistence layer (usually a relational database) data structure is formed one to one mapping relationship, if the persistence is a relational database, the data for each field in the table ( or several) to a corresponding one of the PO (or several) properties

PO (bean, entity name, etc.) :
persistant Object persistent object, the display state of records in the database table java object
most appreciated is the image of a PO is a record in the database.
Benefit is that a record can be handled as one object, it can be easily converted to other objects.

BO (service, manager, business name, etc.):

business object Business Object

 

The main role is to encapsulate business logic for an object. This object can comprise one or more other objects.
Shape as described for the image of an object and the operation, of course, involve some form to its base for the objects and actions. For example, treatment

A person's business logic, there is sleep, eat, work, work, etc. It is also possible to form relationships with others hair is shaped.
In this way the business logic processing, we will be able to deal with for BO.

VO (from also this wording):
value Object value object
mainly in view of the object, for a WEB page attribute of the entire page into a package object. Then using a VO is transmitted in the control layer and the switching layer view.

The DTO (PO elapsed after the treatment may be increased or decreased properties of PO):
the Data Transfer Object Data transfer object
is mainly used where a large number of remote call transfer object and the like.
For example, we have 100 fields in a table, then the corresponding PO have 100 properties.
However, we only show the field at the interface 10,
the client with the WEB service to obtain the data, it is not necessary to pass the entire client objects PO,
then we can pass the results to the client 10 with the only attribute DTO, this also does not expose the server table structure. Upon arrival the client, if this object to the corresponding screen display, that at this time it's turned on the identity of VO

 

Reference: https://blog.csdn.net/zjrbiancheng/article/details/6253232

Guess you like

Origin www.cnblogs.com/zouhong/p/12013904.html
Recommended