Java object concepts (do vo dto po), vodto

Source: Internet
Author: User

Java object concepts (do vo dto po), vodto

Source: http://virusswb.blog.51cto.com/115214/458636

BO: Business Object, Business Object. It is mainly the entity that carries business data. When processing business logic, the data structure is also set up for the business logic.

PO: persistence Object, a persistent Object. Data must be stored in any form and must be persistent. Join relational database storage, a PO corresponds to a database record, or a record of the result set queried by the object from the database.

DAO: Data Access Object: the Data Access Object. Contains some basic database operations, CRUD, and dealing with databases. Persists the PO to the database, and maps the result set queried from the database to the PO.

DTO: Data Transfer Object, a Data transmission Object. It is generally used for data transmission in the front and back ends. the resume of the data structure is transmitted over the network, reducing the amount of data transmitted and avoiding excessive useless data transmission.

VO: Value Object, Value Object. It is mainly used to bind data and controls in the previous section and exists as a key-value pair. It can be converted from DTO. The advantage of doing so is to reduce the dependency on DTO and further reduce the dependency on the corresponding backend. You can also increase the testability of the previous section, that is, you can also perform automated unit tests on the logic of the previous section without DTO. You can use MockDTO to achieve the purpose of testing.

POJO (Plain Old Java Object) is a simple Java Object, which is actually a common JavaBeans. Some attributes and Their getter setter methods have no business logic. They can be used as VO (value-object) or dto (Data Transform Object. of course, if you have a simple operation attribute, you can do the same, but you cannot have business methods or methods such as connection.

 

 

The preceding figure shows that web, winform, silverlight, and console represent different front-end types. Domain indicates the Domain object, or BLL.

 

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.