What does vo, PO, BO, QO, DAO, pojo mean in java?

Source: Internet
Author: User
Tags java web

What does vo, PO, BO, DAO, pojo mean in java?

Recently in the project, met vo, my God ... Then learn to remember it together.

Let's start with a simple explanation:

the o/r Mapping is an abbreviation for the object relational Mapping. Simply put, the object is bound to the relational database, and the object is used to represent the relational Data.

Java WEB three-tier Architecture We need to be skilled at it.

VO: Value Object

Created with the new keyword, GC recycling is typically used for data transfer between business tiers, typically abstract business objects that can correspond to data tables or Not. In the Web layer, a Web page or SWT interface, with a Vo object corresponding to the value of an interface.

PO: Persistent Objects (persistant Object)

The attribute is corresponding to field one by one in the database table and can be viewed as a Java object that is mapped to a table in the Database. Generated by the database insert, deleted by the database Delete. Its life cycle is closely related to the database, but the PO should not contain any operations on the Database.

Its Java files are typically field properties and corresponding Get,set methods in a database table

BO: business Object

The main function is to encapsulate the business logic into an object. This object can include one or more other Objects. such as a resume, educational experience, internship experience, awards, etc., The establishment of a cv-related Bo object processing resumes, Each Bo contains these po, so when processing business logic, we can deal with Bo.

Dto: data Transfer Object (data Transfer Object) while dto mode

It is mainly used for remote calls, etc. where large quantities of objects need to be transferred. For example, if we have 100 fields in a table, the corresponding PO will have 100 attributes. however, as long as 10 fields are displayed on our interface, and the client uses Web service to fetch the data, there is no need to pass the entire PO object to the Client. This is where we can pass results to the client with a DTO with only these 10 attributes, so that the Service-side table structure is not exposed. After reaching the client, if the object is used to display the corresponding interface, then its identity will be converted to VO

Dao: data Access Object (database access Objects) while DAO mode

It is mainly used to encapsulate the access to the database, including the operation methods of various databases, and provides the crud operation of the Database. It can be used to pojo the po, the PO is assembled into a dto, VO

POJO: Simple Java Objects (Plain ordinary Java Object)

Pojo is the most common and changeable object, an intermediate object, and the most common object we deal with.

A Pojo is a PO after persistence

Pass it directly, and the process is a dto.

Directly used to correspond to the identity layer is VO

Draw a simple picture (borrow someone else's Picture)

Address: http://jeoff.blog.51cto.com/186264/88517/

What does vo, PO, BO, QO, DAO, pojo mean in java?

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.