Description of several objects in Java development (PO,VO,DTO,BO,POJO,DAO,SAO, etc.) __java

Source: Internet
Author: User

A, PO:(Persistant object), a persistent object can be viewed as a Java object mapped to a table in a database. Using hibernate to generate the PO is a good choice.

VO:(Value object), value objects are usually used for data transfer between business tiers, and just like the PO contains only data. But it should be abstracted out of the business object that can correspond to the table, or not, depending on the business needs.

The PO can only be used in the data layer, and VO is used in the business logic layer and the presentation layer. Each layer operates on the layer's own data object, which can reduce the coupling between the layers so as to facilitate the maintenance and extension of the system.

Third, DAO:(data access Objects)
DAO is the data Access object, which is the database interface, and data access: As its name implies, it deals with databases. Sandwiched between business logic and database resources.

Java EE developers use the data Access object (DAO) design pattern to separate the underlying data access logic from high-level business logic. Implementing DAO schemas can be more focused on writing data access code.

The DAO pattern is one of the standard Java EE design patterns. Developers use this pattern to separate the underlying data access operations from the high-level business logic. A typical DAO implementation has the following several components:
1. A DAO factory class;
2. a DAO interface;
3. A concrete class that implements the DAO interface;
4. Data transfer objects (sometimes called value objects).
The specific DAO class contains the logic to access data from a particular data source.

Four, BO:(Business object), the business object layer
Represents all entity classes for "things" within the application realm. These entity classes reside on the server and use service classes to help them perform their duties.

Five, POJO:(Plain old Java Objects), simple Java objects
The actual is the ordinary JavaBeans, use pojo name is to avoid with EJB confuse, and abbreviation is more direct.
Some of these properties and their getter, setter methods, can sometimes be used as value object or DTO (Data Transform object). Of course, if you have a simple arithmetic attribute, it's OK, but not the business method, You can't carry a connection or something like that.
Six, DTO: (Data Transfer object), data transfer objects. is a software application system that transmits data between design patterns. It is usually used for data transmission directly from different layers (UI layer, service layer or domain model layer) to isolate different layers and reduce the coupling between layers.

Seven, SAO:(service Access object) services Access objects.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.