Detailed explanation of VO, BO, PO, DO, DTO in Java
Overview Object type position diagram Let’s look at the picture first After reading the picture, most people will probably have an intuitive feeling. Face this picture&# xff0c;Let us start with the DTO that connects the previous and the next Object type description DTO(Data Transfer Object)Data transfer object This transfer usually refers to the before and after Transmission between terminals DTO is a relatively special object ,It exists in two forms: In the backend,It exists in the form of java object&# xff0c; That is, what is defined in the controller. Usually, you don’t need to worry about how to convert json into java objects at the back end. This is done by some mature frameworks for you. ;For example, spring framework At the front end, its existence form is usually an object in js. It can also be simply understood as json, which is the data body requested through ajax. This is why he is drawn across two layers You may encounter a problem here – now that microservices are prevalent – the transfer object called between services can Is it called DTO? My understanding is that it depends on the situation An implicit meaning of DTO itself is to be…
Concepts of PO, BO, VO, DTO, POJO, DAO in Java and their functions and project example diagram (translated)
PO (bean, entity, etc. naming): Persistant Object, the display status of records in the database table in the java object The most vivid understanding 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 (naming of service, manager, business, etc.): Business Object The main function is to encapsulate business logic as an object. This object can contain one or more other objects. Image is described as the form and action of an object. Of course, it also involves some forms and actions of other objects. For example, when dealing with a person’s business logic, there are behaviors such as sleeping, eating, working, going to work, etc. There are also behaviors that may lead to relationships with others. When dealing with business logic in this way, we can deal with BO. VO (from is also written this way): Value Object Mainly reflected in the object of the view, for a WEB The page encapsulates the properties of the entire page into an object. Then use a VO object to transmit and exchange between the control layer and the view layer.…
Java data object use: PO, DO, TO, DTO, VO, BO, DAO, POJO concept explanation and use
class=”markdown_views prism-atom-one-dark”> PO: Persistent Object Persistent Object The display state of the records in the database table in the java object. The most vivid understanding is that a PO is a record in the database. A record can be treated as an object, and it can also be easily converted to other objects. If there is a piece of data in the database, a simple class is now given an instance of this data, then the existing state of this simple class is PO. (generally/temporarily not used) DO:Domain Object Domain Object Used to receive the entity corresponding to the database, it is an abstract data state, between the database and business logic. Generally, it is used when the Service accesses the database to receive data. Generally placed under the entity/domain package. (Common) TO:Transfer Object Data Transfer Object An object that is transferred between different relationships in the application. (generally/temporarily not used) DTO: Data Tranfer Object Data Transfer Object This concept comes from the J2EE design pattern, which is a method of transferring data between design patterns software application system. The data transferred by the data is generally the data retrieved by the data access object from the database. Generally refers…