Java (Po,vo,to,bo,dao,pojo) class name Package name explanation

Source: Internet
Author: User

VO: Value object, view object PO: Persistent object qo: Query Object
DAO: Data Access Object--also DAO pattern DTO: Data Transfer Object--also DTO mode
PO: Full Name is Persistant object The most vivid understanding of persistent objects 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: The full name is business object: The main function of the operational objects is to encapsulate the 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 have an education experience corresponding to a PO, work experience corresponding to a PO, social relations corresponding 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-Valued objects viewobject the data objects that are displayed in the main interface of the presentation layer object. For a Web page, or an interface for SWT and swing, use a Vo object to correspond to the value of the entire interface.

Dto:data Transfer Object Data transfer objects are mainly used for remote calls and other places where large numbers of objects need to be transferred. For example, if we have 100 fields in a table, then the corresponding PO has 100 attributes. However, as long as we display 10 fields on the interface, the client uses the Web service to fetch the data, and there is no need to pass the entire PO object to the client, we can pass the result to the client with a DTO with only these 10 attributes. This also does not expose the service-side table structure. After reaching the client, if the object is used to display the corresponding interface, then its identity will be converted to VO.

Pojo:plain ordinary Java object Simple Java objects personal feeling POJO is the most common and changeable object, is an intermediate object, is also our most frequently dealing with objects. A Pojo persistence is the PO directly with it to pass, the process is the DTO directly used to correspond to the presentation layer is VO

Dao:data Access Object Data accessing objects This is most familiar to everyone, and the above several o the biggest difference, basically there is no possibility and necessity of mutual transformation. Used primarily to encapsulate access to a database. Usually used in conjunction with PO, DAO contains various methods of operation of the database. It can be pojo to the PO, with PO assembled VO, DTO

Java (Po,vo,to,bo,dao,pojo) class name Package name explanation

Related Article

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.