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

sponsored links
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.
  • del.icio.us
  • StumbleUpon
  • Digg
  • TwitThis
  • Mixx
  • Technorati
  • Facebook
  • NewsVine
  • Reddit
  • Google
  • LinkedIn
  • YahooMyWeb

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

  • Choose Hibernate or iBATIS has its reasons

    Hibernate features: Hibernate powerful database has nothing to do with good, O / R mapping ability, and if you are very proficient in Hibernate, but also for Hibernate to conduct an appropriate package, then your project will be the entire persistence lay

  • Java technology 25 study points

    1. You need to master the object-oriented analysis and design (OOA / OOD), involving patterns (GOF, J2EEDP) as well as the integrated model. You should understand the UML, especially class, object, interaction and statediagrams. 2. You need to learn basic

  • Hibernate Mapping Types

    Hibernate mapping types divided into two categories: built-in mapping types and mapping types of customers. Built-in mapping types is responsible for some common Java types are mapped to the corresponding SQL type; In addition, Hibernate also allows users

  • Hibernate configuration parameters hibernate.hbm2ddl.auto

    Hibernate in the configuration file: <properties> <property name="hibernate.hbm2ddl.auto" value="create" /> </ properties> Parameter Description: validate load hibernate, the authentication to create a database t ...

  • In the servlet use Bean

    According to Sun's definition, JavaBean is a reusable software components. In fact JavaBean is a Java class, through the package into a property and methods of treatment of a function or a business object, referred to as bean. Because JavaBean is ...

  • Hibernate.cfg.xml configuration file (including the primary key generation strategy Introduction)

    Hibernate.cfg.xml configuration file: <? xml version = "1.0" encoding = "utf-8"?> <! DOCTYPE hibernate-configuration PUBLIC "- / / Hibernate / Hibernate Configuration DTD / / EN" "hibernate-configuration-2.0.dtd

  • Java Technology wishing cow needed 25 points of study

    1. You need to master the object-oriented analysis and design (OOA / OOD), involving patterns (GOF, J2EEDP) as well as the integrated model. You should understand the UML, especially class, object, interaction and statediagrams. 2. You need to learn basic

blog comments powered by Disqus
Recent
Recent Entries
Tag Cloud
Random Entries