Java Terminology (PO/POJO/VO/BO/DAO/DTO)

Source: Internet
Author: User

PO (Persistant object) Persistent object

In the case of the O/R mapping, there is no such concept if there is no O/R mapping. Usually the corresponding data model (database), itself also has some business logic processing. It can be seen as a Java object mapped to a table in a database. The simplest PO is a record in a table in the corresponding database , multiple records can be used with a collection of PO. The PO should not contain any operations on the database.

VO (Value object) value objects

Typically used for data transfer between business tiers, as is the case with the PO. But it should be abstracted out of the business object that can correspond to the table or not, depending on the needs of the business. Personal feel with DTO (data transfer object), passed on the web.

BO (business object) service object

From the business model perspective, see the domain objects in the UML component Domain model. A Java object that encapsulates the business logic, by invoking the DAO method and combining Po,vo for business operations.

POJO (Plain ordinary Java object) simple, rule-free Java objects

Pure traditional Java object. That is, in some object/relation mapping tools, the ability to maintain database table records Persisent object is a pure Java object that conforms to the Java Bean specification. No additional properties and methods are added. My understanding is the most basic Java Bean, only attribute fields and setter and Getter methods!.

DAO (data Access object) Access objects

is one of Sun's standard Java EE design patterns, one of which is DAO, which is responsible for the operation of the persistence layer. Provides interfaces for the business layer. This object is used to access the database. Usually used in conjunction with PO, DAO contains various methods of operation of the database. Combine PO to perform related operations on the database. Sandwiched between business logic and database resources. With VO, provide database crud operations ...

DTO (Data Transfer object) data transfer objects

It is mainly used for remote calls, etc. where large quantities of objects need to be transferred.
For example, if we have 100 fields in a table, then the corresponding PO has 100 attributes.
But we just show 10 fields on the interface,
The client uses the Web service to get the data, and there is no need to pass the entire PO object to the client.
At this point we can pass the result to the client with a DTO with only these 10 attributes, and this will not expose the service-side table structure. After the client is reached, if the interface is displayed with this object, then its identity will be converted to VO.

O/R Mapper object/relationship Mapping

After all the mapping are defined, this O/R mapper can do a lot of work for us. With these mappings, this O/R mapper can generate all the SQL statements about object saving, deletion, and reading, and we no longer need to write so many lines of DAL code.
Entity model (solid mode)
DAL (data access Layer)
Idal (interface layer)
Dalfactory (class factory)
BLL (business logic Layer)
BOF business Object Framework service objects Frame
SOA Service Orient Architecture Services-oriented design
EMF Eclipse Model Framework Eclipse Modeling Framework

Java Terminology (PO/POJO/VO/BO/DAO/DTO)

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.