One,po:persistant object Persistent Objects , can be seen as a Java object mapped to a table in the database . The simplest Po is a record in a table in the corresponding database, and multiple records can be used with a collection of PO. The PO should not contain any operations on the database.
Two,Vo:value object value objects. Typically used for data transfer between business tiers, as is the case with PO, which contains only data. But it should be abstracted out of the business object that can correspond to the table, or not , depending on the needs of the business . Personally feel the same DTO (data Transfer object ) that is passed on the web.
Third,dao:data Access object, which is used to access the database. Usually used in conjunction with PO,DAO contains various methods of operation of the database. Through its method , combine the PO to carry on the related operation to the database.
Four,bo:business object Business Objects , encapsulates the business logic of the Java object , by invoking the Dao method , combined with PO,VO for business operations.
Five,pojo:plain old Java object Simple and irregular Java objects , I personally think it and other not a level of things , VO and po should belong to it .
PO:
Persistant Object Persistent Objects
The most vivid understanding is that a Po is a record in the database.
The advantage is that a record can be processed as an object and can be easily converted to other objects.
BO:
Business Object
The main role is to encapsulate the business logic as an object. This object can include one or more other objects.
such as a resume, educational experience, work experience, relationships and so on.
We can have an education experience corresponding to a PO , the work experience corresponds to a PO , the relationship corresponds to a po.
Create a CV-based Bo object to process resumes, each bo containing these PO.
When we handle business logic like this, we can deal with Bo.
VO:
Value Object value object
ViewObject Presentation Layer Object
The data object that the main interface displays. For a web page, or swt, swing an interface, with a The Vo object corresponds to the value of the entire interface.
dto:
Data Transfer Object data transfer objects
It is mainly used for remote calls, etc. where large quantities of objects need to be transferred.
For example, we have a table with po there is
but on our interface as long as the 10 fields are displayed,
Client with web Service to get the data, there is no need to pass the entire po object to the client,
Then we can use only this dto to deliver results to the client, so that the service-side table structure is not exposed vo
Pojo:
Plain old Java object simple Java objects
Personal feeling Pojo is the most common and changeable object, is an intermediate object, is also our most often dealing with objects.
A Pojo is a PO after persistence
It is the DTO that passes and passes directly through it.
Directly used to correspond to the presentation layer is VO
DAO:
Data Access Object Information
This everyone is most familiar with, and the above several o the biggest difference, basic without the possibility and necessity of mutual transformation .
Primarily used to encapsulate access to a database. It can be pojo to the Po, with Po assembled VO,DTO
Summary of Java objects: (Po,vo,dao,bo,pojo)