And explains the difference between the PO, VO, DAO, BO, POJO

VO

value object: value object

Commonly used for data transfer between the business layer, created by the new new, recovered by the GC.

 

PO

persistant object: object persistence layer

The corresponding field of the database table.

VO and PO, both properties together with attribute get and set methods; look no different from the surface, but the meaning is completely different representatives.

DTO

data transfer object: data transfer object.

Table there are a dozen fields: id, name, gender (M / F), age, conmpanyId (such as 001) ...

Page needs to show four fields: name, gender (male / female), age, conmpanyName (such as today's headlines Co., Ltd.).

The resulting DTO, one can increase the speed of data transfer (transmission reduces the field), two rear table structure can hide.

 

WILL

business object: Business Objects

BO business logic encapsulated as an object.

I understand that is a combination of PO, such as a PO is insured, the insured is a PO, insurance information is a PO, etc., they combine is the first policy of BO.

 

POJO

plain ordinary java object: simple random java object

Pure traditional sense of java object, only the most basic Java Bean properties plus get and set method attributes.

It can be converted to PO, DTO, VO; POJO during transmission such that DTO.

 

DAO

data access object: Data Access Objects

Used to encapsulate primary access to data, note that access to data is not access to the database.

 

转自:https://www.wukong.com/answer/6535030067171442948/?iid=28069560333&app=news_article&share_ansid=6535030067171442948&wxshare_count=1&tt_from=weixin&utm_source=weixin&utm_medium=toutiao_android&utm_campaign=client_share

Guess you like

Origin www.cnblogs.com/hunmeng/p/11298680.html