• 中国计算机学会会刊
  • 中国科技核心期刊
  • 中文核心期刊

J4 ›› 2011, Vol. 33 ›› Issue (10): 105-110.

• 论文 • 上一篇    下一篇

Facade模式在数据持久层中的应用

张〓俐1,张维玺2   

  1. (1.江苏技术师范学院计算机工程学院,江苏 常州 213001;2.江苏技术师范学院电气信息工程学院,江苏 常州 213001)
  • 收稿日期:2010-09-28 修回日期:2011-01-09 出版日期:2011-10-25 发布日期:2011-10-25

Application of the Faade Pattern to the Data Persistence Layer

ZHANG Li1,ZHANG Weixi2   

  1. (1.School of Computer Engineering,Jiangsu Teachers College of Technology,Changzhou 213001;2.School of Electronics and Information Engineering,Jiangsu Teachers College of Technology,Changzhou 213001,China)
  • Received:2010-09-28 Revised:2011-01-09 Online:2011-10-25 Published:2011-10-25

摘要:

数据持久化工作是企业在进行应用系统开发时首先必须要面对的重要问题。本文在着重分析了门面模式、泛型DAO模式、Hibernate框架和Spring框架的基础上,依据企业实际开发要求,提出了基于Facde模式的数据持久层开发框架,该持久层框架具有组件之间的松散耦合,并且整个持久层框架具备良好的稳定性、可伸缩性和可扩展性。最后成功地将该持久层开发框架应用到某电信客户经理工作管理系统中。

关键词: Faade模式, 泛型DAO模式, Hibernate框架, Spring框架

Abstract:

Data persistence is an important problem of development in the process of designing enterprise application systems. Based on the analysis and comparison of the application of the Faade pattern, the generic DAO pattern, the Hibernate framework and the Spring framework, a universal solution is proposed for the data persistence layer based on the Faade pattern, which makes the loose coupling possible. And the data persistence layer is highly stable, flexible and expansible. Finally, the technology of the data persistence layer is applied to the information system of a telecom customer manager.

Key words: Faade pattern;generics DAO pattern;Hibernate framework;Spring framework