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)
摘要: 针对Web数据库系统中的数据分页问题,提出一种基于模型-视图-控制器(MVC)模式的三层分页组件。在数据层中引入Java持久化API和Spring技术,在业务逻辑层中引入泛型DAO模式和桥接模式,在显示层中引入JSP和Struts2标签,并给出部分程序源代码。应用结果表明,与其他分页方法相比,该模型的执行效率较高,稳定性和移植性较好。
关键词:
分页组件,
模型-视图-控制器模式,
Struts2框架,
Spring框架,
Java持久化API
CLC Number:
ZHANG Li. Application of Paging Component Based on Model-View-Controller Pattern[J]. Computer Engineering, 2011, 37(21): 255-257.
张俐. 基于MVC模式的分页组件应用[J]. 计算机工程, 2011, 37(21): 255-257.