What VO, DTO, DO, PO yes?

concept

VO (View Object ): a view object for display layer, it is the role of a given page (or component) of all of the data package together.

The DTO (the Data Transfer Object ): data transfer object, this concept comes J2EE design patterns, the original purpose is to provide a distributed application EJB data entity coarse-grained, in order to reduce the number of the distributed calls, thereby improving call distributed performance and reduced network load, but here, I refers to data transfer objects between the presentation layer and the service layer.

DO (Domain Object ): domain objects, is abstracted from the real world, tangible or intangible business entity.

PO (Persistent Object ): persistent object, with which the persistence layer (usually a relational database) data structure is formed one to one mapping relationship, if the persistence is a relational database, the data for each field in the table ( or several) on the PO corresponding to one (or several) properties.

model:

A timing chart below to create a simple model to describe the position of the target in a three-tier application

  • The requesting user (fill out a form may be), to form VO data is matched in the presentation layer.
  • The presentation layer corresponding to layer into a service VO method as claimed in DTO, to the service layer.
  •  DETAILED first complete business service layer data structure according DTO (or reconstruct) a DO, DO, call a business method.
  • The service layer DO is converted to the corresponding persistence PO (ORM tool may be used, can not), the persistence persistence method call, it passes to the PO, persistence operation is completed.
  • For a reverse operation, such as read data, it is transmitted and converted in a similar manner, slightly.

 

Original link: https://www.cnblogs.com/qixuejia/p/4390086.html

 

Guess you like

Origin www.cnblogs.com/niudaben/p/11934527.html
Recommended