Home About Me

Understanding PO, VO, BO, DTO, POJO, and DAO in Java

In Java application development, names such as PO, VO, BO, DTO, POJO, and DAO often appear in layered architectures. They are not interchangeable terms; each one describes a different kind of object or responsibility in the system.

PO: Persistent Object

PO stands for Persistent Object.

A PO is a Java object that maps to a table in the database. Its fields usually correspond to columns in that table, so it represents data that can be persisted.

A PO should only describe the data itself. It should not contain database operation logic such as queries, inserts, updates, or deletes.

POJO: Plain Ordinary Java Object

POJO means Plain Ordinary Java Object.

It refers to the most basic form of a Java Bean: a simple Java object containing fields, along with corresponding setter and getter methods. In the traditional sense, it is just an ordinary Java object without special framework requirements or business responsibilities.

VO: Value Object

VO stands for Value Object.

A VO is usually used to transfer data between business layers. Like a PO, it only carries data, but it is normally modeled from a business perspective rather than strictly from the database structure.

A VO may correspond to a database table, but it does not have to. It can also be an abstracted business object assembled from multiple sources of data.

BO: Business Object

BO means Business Object.

A BO is a Java object that encapsulates business logic. It performs business operations by calling DAO methods and working together with objects such as PO and VO.

Compared with PO or VO, a BO is not just a data container. Its focus is business behavior and process handling.

DTO: Data Transfer Object

DTO stands for Data Transfer Object.

A DTO is mainly used in scenarios where objects need to be transferred in large quantities, especially in remote calls. Its purpose is to carry data across process, service, or network boundaries in a clear and efficient way.

DAO: Data Access Object

DAO means Data Access Object.

A DAO is used to encapsulate access to the database. Through a DAO, a POJO can be persisted as a PO, and data from PO objects can also be assembled into VO or DTO objects.

In short, DAO focuses on data access, PO focuses on persistence mapping, VO and DTO focus on data transfer in different contexts, BO handles business logic, and POJO describes the simplest ordinary Java object form.