The various beans in Java correspond to the meaning (Vo,po,bo,qo, dao,pojo,dto) __java

Source: Internet
Author: User
VO (Value object) value Objects

Typically used for data transfer between business tiers, created with the New keyword, collected by GC, is just like a PO that contains only data. But it should be abstracted out of the business object that can correspond to the table, or not, depending on the business needs. Individuals feel like the DTO (data transfer object) is passed on the web.

PO (Persistant object) Persistent object

The concept of the O/R mapping occurs when there is no O/R mapping, and no such concept exists. Usually the corresponding data model (database), itself also has some business logic processing. Can be seen as a Java object mapped to a table in a database. The simplest PO is a record in a table in the corresponding database, and multiple records can be set with a PO. The PO should not contain any operations on the database.

to (Transfer object) data transfer objects

An object that is transferred between different tie (relationships) in an application for data interaction

BO (Business object) business Object

See the domain object in the UML component Domain model from the perspective of the business model. A Java object that encapsulates business logic, which is combined with PO,VO to perform business operations by invoking the DAO method. The main role is to encapsulate business logic as an object. This object can include one or more other objects. such as a resume, education experience, work experience, social relations and so on. We can put the education experience corresponding to a PO, work experience corresponding to a PO, social relations corresponding to a PO. Create a resume of the Bo object to process the CV, each Bo contains these PO. This way, when dealing with business logic, we can deal with BO.

QO (Query object)

Generally used to assemble query parameters

POJO (Plain ordinary Java object) simple, irregular Java objects

If some bean classes feel simple, or just as middleware, then they can be categorized as Pojo

DAO (data Access object)
is a sun-standard Java EE design pattern in which an interface is a DAO, which negatively operates on a persistent layer. Provides interfaces for the business layer. This object is used to access the database. Commonly used in conjunction with PO, DAO contains a variety of database operation methods. Through its method, combine the PO to carry on the related operation to the database. Sandwiched between business logic and database resources. With VO, provide the database CRUD operation ...

DTO (Data Transfer object) data transfer objects

It is mainly used for remote calls where large numbers of objects need to be transmitted. For example, we have a table with 100 fields, then the corresponding PO has 100 attributes. But as long as we display 10 fields on the interface, the client uses the WEB service to get the data, there is no need to pass the whole PO object to the client, then we can use the DTO with only these 10 attributes to pass the result to the client, which will not expose the service-side table structure. When you reach the client, if you use this object to display the interface, then its identity becomes VO



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.