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.