For understanding the entity class java (Abstract)

The basic concept of
PO: persistant object (persistent objects),
can be seen as java object map to tables in the database. The simplest one PO is a corresponding database records in a table, the plurality of recording may be set PO. PO should not contain any database operation.

VO: value object (target value).
Typically for data transfer between the service layers, and PO it is as it only contains data. But it should be an abstract of a business object, and the table may correspond to, or may not, based on business needs that personal feel, with the DTO transfer (data transfer objects) on the web.

BO: business object (business object),
encapsulate business logic java object by calling DAO methods, combined PO, VO business operations.

POJO: plain old java object (simple random java objects),
I personally feel that it is not a level and on other things, VO and PO should belong to it.

DAO: data access object (data access object),
this object is used to access the database. PO usually used in combination, DAO contains a method for operating the various databases. The database related operations through its binding PO method.

In-depth understanding of


PO (persistant object) persistent objects. PO is a is a record in the database.
Advantages: a record can be handled as one object, can be easily converted to other objects.

BO (business object) business objects. The business logic is encapsulated as an object.
Advantages: The object may include one or more other objects.
eg:
for example, a curriculum vitae, educational experience, work experience, relationships and so on, we can put the educational experience corresponds to a PO, work experience corresponds to a PO, a correspondence relationship between the PO.
Establishing a resume process corresponding to the object BO resume, each of these comprising BO PO.
In this way the business logic processing, we will be able to deal with for BO.

VO (value object) view object. ViewObject for the presentation layer.
Advantages: Object The main object interface corresponding to the display data. For a WEB page, or the SWT, a SWING interface of the object with a corresponding value VO (data package) the entire interface.

DTO (Data Transfer Object) data transfer object.
Advantages: Mainly used for local transport objects requires a lot of long-distance calls and so on.
eg:
For example, we have 100 fields in a table, then the corresponding PO have 100 properties.
However, we only show the interface 10 fields, with the WEB service client to retrieve the data, there is no need 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.
After reaching the client, if this object to the corresponding screen display, that at this time it's turned on the identity of VO

POJO (plain ordinary java object) simple java object. It is the object of an intermediate object, but also with most often.
Advantages: After a persistent POJO is PO, which passed directly, that is, the DTO transfer process, directly corresponds to the presentation layer is VO.

DAO (data access object) data access object. By durable it can POJO into PO, PO assembled by using VO, DTO.

Guess you like

Origin www.cnblogs.com/slfeng/p/11100104.html