Several java object (PO, VO, DAO, BO, POJO) to explain

Several java object (PO, VO, DAO, BO, POJO) explained that one, PO: persistant object persistent objects, can be seen as the facade of the database mapping java objects. The simplest PO is a corresponding database table in a record, multiple records can be set with the PO. PO should not contain any of the database operation.

2, VO: value object value object. Often used to transfer data between business layer, and the PO is just the same as with the stats. However, the abstract should be out of business objects, you can and tables correspond to or may not, depending on the business needs. Personally feel that the same DTO (data transfer object), in the web on the pass.

3, DAO: data access object data access object, this object is used to access the database. PO usually used in combination, DAO contains a variety of database access methods. Through its approach, with PO the database related operations.

4, BO: business object business objects, encapsulation of business logic java object, by calling the DAO method, combined with PO, VO conduct business operations.

5, POJO: plain ordinary java object simple random java object, I personally feel that it and the other is not a level thing, VO and PO should all belong to it.

The main difference between VO and PO are:
VO is an independent Java Object.
PO is a Hibernate into their physical container (Entity Map) object, which represents the database record corresponding to a particular Hibernate entities, PO changes in response to a transaction will be submitted to the actual database. VO is used as Data Transfer Object, the so-called DTO. In traditional MVC architecture, the Model layer in the PO, if allowed to be passed to other aspects. As the PO update will eventually be mapped to the actual database, if the PO at other levels (such as the View layer) changes have taken place, then the Model layer may cause unexpected damage. The VO is shown in the foreground, it will inevitably be used by the PO in attribute values that do not exist. For example PO may be an object, while the VO in it may be all the properties of this object. PO can only be used in the data layer, VO used in the business logic layer and presentation layer.

分类:Java 时间:2010-03-29 人气:423
分享到:
blog comments powered by Disqus

相关文章

  • Data Access Object Pattern 2014-05-15

    Data Access Object Pattern or DAO pattern is used to separate low level data accessing API or operations from high level business services. Following are the participants in Data Access Object Pattern. Data Access Object Interface - This interface de

  • Java Data Access Object - Generate Precise findBy methods - DAO type - Spring DAO (灰色 不能选) 2010-07-29

    原因:为了方便,把原来一些工程中的包和主要几个配置直接cop而不用导入spring和hibernate的capbiltiy,于是在用MyEclipse的DataBase Explorer的Hibernate Reverse Enginnering时就不能生产spring DAO. 解决办法,去以前的工程中把.myhibernatedata资源文件考到工程根目录下,其实这样还是不行地:),改.project配置文件吧.(提示:在工程根目录下,eclipse中在filter里把.resource隐藏

  • Data Access Object 2010-03-29

    1 /* 2 * To change this template, choose Tools | Templates 3 * and open the template in the editor. 4 */ 5 6 package objectintodb; 7 8 import java.io.ByteArrayInputStream; 9 import java.io.IOException; 10 import java.io.ObjectInputStream; 11 import j

  • Several java object (PO, VO, DAO, BO, POJO) explained 2010-06-29

    Several java object (PO, VO, DAO, BO, POJO) to explain a, PO: persistant object persistent objects, can be regarded as appearances with the database mapping of java objects. Simplest PO is a corresponding database table in a record, multiple records

  • PO / VO / DAO / BO / POJO what (JAVA several objects of interpretation) 2010-08-31

    Several java object (PO, VO, DAO, BO, POJO) to explain a, PO: persistant object persistent objects, can be regarded as appearances with the database mapping of java objects. The simplest PO is a corresponding database table in a record, multiple reco

  • PO.VO.BO with DAO, OO meta -- 2009-09-03

    As a Java developer, the usual OO Very much has faced , and explain below the meaning of the O and usage, even if you See Crown different opinions are welcomed with open to question : O / R Mapping is the Object Relational Mapping (Object-Relational

  • PO, BO, VO, DTO, POJO, DAO and the distinction between the concept of 2008-05-04

    O / R Mapping is the Object Relational Mapping (Object-relational mapping) is an abbreviation. Popular point of speaking, is to bind an object relational database, with objects to represent relational data. In the O / R Mapping of the world, there ar

  • PO BO VO DTO POJO DAO concept and its role 2010-06-24

    PO: persistant object persistent objects Most image understanding is a PO is a record in the database. Advantage is that as an object to a record deal, can be easily converted to other objects. BO: business object business objects Primary role is to

  • PO / BO / VO / POJO / DAO 2010-07-20

    PO: persistant object persistent objects, can be regarded as appearances with the database mapping of java objects. The simplest PO is a corresponding database table in a record, multiple records can be set with the PO. PO should not be included in a

iOS 开发

Android 开发

Python 开发

JAVA 开发

开发语言

PHP 开发

Ruby 开发

搜索

前端开发

数据库

开发工具

开放平台

Javascript 开发

.NET 开发

云计算

服务器

Copyright (C) codeweblog.com, All Rights Reserved.

CodeWeblog.com 版权所有 黔ICP备15002463号-1

processed in 0.949 (s). 12 q(s)