Understanding Alibaba’s Java Domain Model: DO, DTO, BO, VO, and More
This article explains Alibaba's Java development specifications for layered domain models, detailing the roles, naming conventions, and usage of objects such as DO, DTO, BO, VO, PO, DAO, and POJO to improve code organization and reduce coupling across application layers.
Layered Domain Model Conventions
DO (Data Object): corresponds one‑to‑one with database tables and is transferred via the DAO layer.
DTO (Data Transfer Object): used by Service or Manager layers to transfer data outward.
BO (Business Object): encapsulates business logic and is output by the Service layer.
AO (Application Object): an abstract reusable model between the Web and Service layers, closely tied to the presentation layer with low reuse.
VO (View Object): used by the presentation layer, typically passed from Web to the template engine.
Query: a data‑query object received by lower layers; queries with more than two parameters must not use Map for transport.
Domain Model Naming Conventions
Data objects: xxxDO , where xxx is the table name.
Data transfer objects: xxxDTO , where xxx reflects the business domain.
View objects: xxxVO , where xxx usually denotes the page name.
POJO is a generic term for DO/DTO/BO/VO; naming as xxxPOJO is prohibited.
PO (Persistent Object)
A PO maps directly to a database table and can be generated using Hibernate.
VO (Value Object)
VOs are used for data transfer between business layers, containing only data. They may correspond to tables or be abstracted based on business needs. PO is limited to the data layer, while VO is used in business logic and presentation layers, reducing coupling.
DAO (Data Access Object)
DAO abstracts database interactions, separating data access logic from business logic. A typical DAO implementation includes a factory class, an interface, a concrete class, and a data transfer object.
BO (Business Object)
BO represents all entity classes that model “things” within the application domain, residing on the server and assisted by service classes to fulfill responsibilities.
DTO (Data Transfer Object)
DTOs are used for remote calls or scenarios requiring lightweight data transfer. For example, a table with 100 fields may have a PO with 100 properties, but a client UI may only need 10 fields, which can be transferred via a DTO to avoid exposing the full table structure.
POJO (Plain Old Java Object)
POJOs are ordinary JavaBeans without business methods or resource‑handling code. They can serve as value objects or DTOs, containing simple properties with getters and setters.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Su San Talks Tech
Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
