struts中的几种类型的对象的区分

Posted by 猪头小队长 | 程序设计 | Wednesday 30 June 2004 12:40
在struts中(或者其他的基于MVC的WEB应用中)的几种常用对象如下:
  1. 业务对象(BO)
    1.1 实体业务对象(Entity)
    1.2 过程业务对象(Process)
    1.3 事件业务对象(Event)
  2. 数据传递对象/值对象(DTO/VO)
  3. FormBean
  4. 数据访问对象(DAO)
  5. POJO(或者可以翻译为纯Java对象?:))
  6. 持久化对象(PO)
这些对象构成了整个WEB应用程序的立体结构,结构图大概如下:

?̥?ṹͼ

    1. BO就是业务逻辑中所涉及的所有的对象,使用这些对象来进行逻辑操作。
      EJB中的EB就是一种实体业务对象
      EJB中的SB就是一种过程业务对象
      BO的可视范围在控制层和持久层之间。
    2. DTO主要是用来在不同层之间传递数据,是细粒度数据的粗粒度视图。 关于他和其他对象的差别见上图。
    3. FormBean是Html Form映射成的一个对象,主要是用来把Html Form中零散的数据封装起来,以对象的形式来提供OO方式的操作。
    4. DAO使底层数据访问逻辑与业务逻辑分离开,也就是说因为DAO的存在,才隔离开了数据的访问逻辑和业务逻辑,DAO从具体数据源中抽取数据,组成POJO,供BO使用,同时对BO传递过来的POJO,持久化到数据源中。
    5. POJO是和PO相区分的一种对象,POJO指的是纯Java的对象,他活动于业务层,由JVM来掌管其生死。
    6. PO是对应于数据源而存在的对象,它往上对应于POJO,往下对应于物理数据源。一般的,ORM提供这种PO,例如hibernate,通过它,使程序员感觉不到PO的存在,数据源自然的映射成了Java中的对象(POJO)。

[@more@]

2 Comments »

  1. Comment by ak47 — 2006/07/02 @ 15:16

    图画得挺好!推荐你使用一种免配置持久层

    Speed 快速 J2EE 开发框架
    Speedframework(http://sourceforge.net/projects/speedframework)是一个完全基于JDBC开发的轻量级持久层框架. 它可以直接调用SQL,也可以直接对POJO进行CRUD操作,代码与ORM相当.调试方便,不用配置,内置JCS缓存,能有效降低数据库压力,它具有以下特点:

    1.免配置持久层,免配置可以减少开发中配置带来的烦恼,调试带来的烦恼。
    2.完全是jdbc封装操作,性能完全没问题。
    3.jcs cache实现,对于数据库操作对象缓存减轻数据库压力。
    4.自带分页组件,完全可以直接传入一条sql即可完成困难的分页逻辑,可以由客户自定义。
    5.结合表、视图实体逻辑设计模式可以实现xp开发。
    6.speed能自动识别表字段pk的自增主键,并可以返回自增字段值。
    7.实现了jdbc的批处理封装,存储过程调用等jdbc api常用的封装。
    8.降低了入门门槛,有利于初期开发和中后期维护,适用于开发程序员经常更换的团队。

  2. Comment by waiter — 2010/07/09 @ 09:48

    general your wow power leveling main

    stats should be Intellect, Stamina, and Bonus Damage, Spell Crit, and Spell Hit.
    Intellect increases you wow power leveling total Mana, the more you

    have the more spells you can cast before running out, however the Warlock can use Life Tap to convert

    some health into Mana. Your Intel can also
    increase your aion power level chances of a

    critical hit.
    Stamina increases your total health which is important for all classes in WoW, but especially for a

    Warlock because of their ability to wow power leveling Life

    Tap.
    Bonus Damage will increase the amount of damage your spells can inflict. An Affliction Warlock may be

    most concerned with aion powerleveling this

    since their damage depends mostly on DoTs which do not “crit”.
    Spell aion powerleveling Crit

    increases your chances of having a single spell inflict much more damage than average. This is

    especially important for Destruction Warlocks.
    Spell cheap aion power leveling Hit

    is vital for Warlocks regardless of talents. This stat improves your ability to effectively hit an

    opponent that wow power leveling is higher

    level or “Elite”. Without this stat you can end up wasting a lot of mana casting spells repeatedly

    when they are resisted by your target.
    In Player vs buy wow gold Player battles,

    Resilience and Spell Penetration are also important.

RSS feed for comments on this post. TrackBack URI

Leave a comment

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word