计算机与现代化 ›› 2010, Vol. 1 ›› Issue (8): 62-66.doi: 10.3969/j.issn.1006-2475.2010.08.018

• 应用与开发 • 上一篇    下一篇

基于MonoRail、Castle和NHibernate架构的Web开发框架研究

高 榕1,郭 兴2,李跃新2   

  1. 1.湖北大学知行学院计算机系,湖北 武汉 430011;2.湖北大学数计学院,湖北 武汉 430062
  • 收稿日期:2010-04-07 修回日期:1900-01-01 出版日期:2010-08-27 发布日期:2010-08-27

Study of Webbased Framework Based on MonoRail, Castle and NHibernate Architecture

GAO Rong1, GUO Xing2, LI Yue-xin2   

  1. 1.Department of Computer Science, Zhixing College, Hubei University, Wuhan 430011, China; 2.Faculty of Mathematics and Computer Science, Hubei University, Wuhan 430062, China
  • Received:2010-04-07 Revised:1900-01-01 Online:2010-08-27 Published:2010-08-27

摘要: 通过研究企业应用架构模式,提出基于MonoRail、Castle和NHibernate等开源框架的4层架构模型,总结出一种适合企业Web应用的通用方法:采用MonoRail来实现MVC模式;将Web应用中的业务逻辑交给Castle管理,相关组件和类通过Castle的配置文件联系起来;由NHibernate负责数据的持久化。实际的项目开发结果表明:整个系统与采用传统的方法所开发的系统相比较,有着更好的可维护性、可扩展性、可移植性和组件的可重用性。

关键词: 软件架构, 信息系统, 企业应用

Abstract: This paper focus on patterns of enterprise application architecture research, and then provides a 4Tier architecture model of enterprise application which is based on MonoRail, Castle and NHibernate framework. This paper mainly describes about each framework plaing what role and providing a general method that is fit for developing enterprise application. In this method, MonoRail is used to build the Web presentation layer; Castle is used to manager the business logic component and NHibernate is used to persist data. At last, a project is implemented by the designed architecture. The result shows the system doesn’t depend on platform, and has the characteristics of high maintainability, expansibility and reusability.

Key words: software architecture, information system, enterprise application