In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "what is the difference between PO,VO,DAO,BO,POJO in java". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the difference between PO,VO,DAO,BO,POJO in java".
PO:
Persistant object persisted object
The best understanding is that a PO is a record in a database.
The advantage is that a record can be treated as an object and can be easily converted to other objects.
BO:
Business object business object
The main function is to encapsulate the business logic into an object. This object can include one or more other objects.
For example, a resume with educational experience, work experience, relationships, etc., we can correspond to an PO for educational experience, a PO for work experience, and a PO for relationships. Create a BO object corresponding to the resume to process the resume, and each BO contains these PO. In this way, when dealing with business logic, we can deal with BO.
VO:
Value object value object
The ViewObject presentation layer objects mainly correspond to the data objects displayed by the interface. For a WEB page, or an interface of SWT or SWING, use a VO object to correspond to the value of the entire interface.
DTO:
Data Transfer Object data transfer object
It is mainly used for remote calls and other places where a large number of objects need to be transferred.
For example, if we have a table with 100 fields, the corresponding PO has 100 attributes. However, as long as 10 fields are displayed on our interface, and the client uses WEB service to obtain data, there is no need to pass the entire PO object to the client. At this time, we can use DTO with only these 10 attributes to pass the results to the client, so that the server table structure will not be exposed. After arriving at the client, if you use this object to display the interface, then its identity will be changed to VO.
POJO:
Plain old java object simple java object
I feel that POJO is the most common and changeable object, an intermediate object, and the one we most often deal with. A POJO persistence is PO, directly used to pass it, the transfer process is DTO, directly used to correspond to the presentation layer is VO.
DAO:
Data access object data access object
This is the most familiar, and the most different from the above O, there is basically no possibility and necessity to transform each other.
Mainly used to encapsulate access to the database. Through it, POJO can be persisted into PO, and VO and DTO can be assembled with PO.
Thank you for your reading, the above is the content of "what is the difference between PO,VO,DAO,BO,POJO in java". After the study of this article, I believe you have a deeper understanding of what the difference between PO,VO,DAO,BO,POJO in java is, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 267
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.