Skip to content

What are PO, VO, DAO, BO, POJO, DTO in Java

Definition

Name Definition Scope
DAO Database access object. A standard of J2EE pattern to access the database. It leverages PO to do database operations. DAO
DTO Data transfer object, used to transfer data between controll and client through HTTP or other ptotocol. PO may be not suitable to transfer directly to client, it may contains sensitive information. So, we need DTO to only transfer necessary data to client. Controller, Service
BO Business object, it leverages DAO, PO, VO(value object) to do business operations. Service
View Object View object are used to present a view to end users, it can be a DTO. Controller, Client
Value Object It's an object that may contains all or subset of a PO fields, and also can contain other fields. It's created by new operator, and it's not visible to Dao or database. Service
PO Persistent object, it maps to database object. Usually, entity objects are PO. Created and managed with database opereations. DAO, Service
POJO Plain Java object. All objects above are POJOs

Diagrams to explain

  • Domain Diagram

  • Class Diagram