作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2011, Vol. 37 ›› Issue (21): 255-257. doi: 10.3969/j.issn.1000-3428.2011.21.087

• 开发研究与设计技术 • 上一篇    下一篇

基于MVC模式的分页组件应用

张 俐   

  1. (江苏技术师范学院计算机工程学院,江苏 常州 213001)
  • 收稿日期:2011-05-11 出版日期:2011-11-05 发布日期:2011-11-05
  • 作者简介:张 俐(1977-),男,讲师、硕士,主研方向:JavaEE技术,软件架构分析
  • 基金资助:
    江苏省高校自然科学基础研究基金资助项目(08KJD520 005)

Application of Paging Component Based on Model-View-Controller Pattern

ZHANG Li   

  1. (College of Computer Engineering, Jiangsu Teachers College of Technology, Changzhou 213001, China)
  • Received:2011-05-11 Online:2011-11-05 Published:2011-11-05

摘要: 针对Web数据库系统中的数据分页问题,提出一种基于模型-视图-控制器(MVC)模式的三层分页组件。在数据层中引入Java持久化API和Spring技术,在业务逻辑层中引入泛型DAO模式和桥接模式,在显示层中引入JSP和Struts2标签,并给出部分程序源代码。应用结果表明,与其他分页方法相比,该模型的执行效率较高,稳定性和移植性较好。

关键词: 分页组件, 模型-视图-控制器模式, Struts2框架, Spring框架, Java持久化API

Abstract: Focusing on the question of magnanimous database pagination in Web-based system, this paper proposes a three layers of page component based on Model-View-Controller(MVC) pattern. The implementation includes Java Persistence API(JPA) and Spring as model, GerneticDAO and Bridge pattern as control, JSP and Struts2 tags are applied as view. It presents a short program source codes and the model is proved to be practicable and effective. The practice shows that the page component is easy to reuse, learn and deployment.

Key words: paging component, Model-View-Controller(MVC) pattern, Struts2 framework, Spring framework, Java Persistence API(JPA)

中图分类号: