您的位置:首页 > 其它

NHibernate Burrow发布第一个Alpha版本

2008-04-21 23:31 603 查看
上月NHibernate 发布了新的2.0 Alpha版本。在随便浏览下NHibernate的其他项目的时候发现。NHibernate Contrib 也改了名称,现在叫做Burrow,在这里可以下载它的第一个Alpha版本,奇怪的是以前的SysCache,NHibernate.Mapping.Attribute不知道去了那里???

Burrow的核心概念是"Conversation ",中文叫做会话,不知道是否合适,是个从JBOSS Seam借过来的,当然是不打算还的啦。主要是帮助NHibernate管理Session和Transcation。里面有两大概念。

Short Burrow Conversation,我觉得直接翻译为“普通事务”,和以前使用Open Session In View 的模式一样,就是一个Request一个 事务,Request完了 事务就结束

Long Burrow Conversation,我觉得可以叫做“长事务”。以WorkSpace概念,可以跨多个PostBack。直到用户显示Close这个WorkSapce为止。哈哈,以后做Asp.net 向导就方便得多啦。

当然Burrow不单只可以用于Web页面,同样也适用用于Winform程序。而且还包括一些主要功能,详细可以参考它在Sourceforge的wiki 。下面简单列出他的主要特点

Burrow Conversation :更简单地使用事务。

GenericDAO with which ISession can be seldom touched most of the time (ISession存在时间更加短少,我猜)

Stateful field attributes with which marked fields of Asp.net UserControl and Page will be stateful over multiple http requests. It helps UserControls or Pages remember entity without causing lazy load exception. 有状态字段Attribute,有效地使导Asp。net的 用户控件和页面变的有状态,不会因为多Http请求而导致懒加载异常。

Multiple databases support. multiple databases becomes easy, you don't need a SessionFactoryPath, you simply give Burrow an entity type, and Burrow will find the right ISession for you. If you are using GenericDAO, the multiple DB support can be very transparent - your code does not need to know there are multiple databases. 适用多数据库更加容易,如果配合GenericDao就更加好啦
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: