期刊文献+

Java EE数据初始化应用中的设计模式解决方案 被引量:4

Design Pattern Solution for Data Initialization of Java EE Application
下载PDF
导出
摘要 针对Java EE应用数据初始化时的先后顺序及依赖关系,提出一种基于设计模式的数据初始化方法.该方法首先将要初始化的数据看做一个复杂对象,通过建造者模式的产品角色来表示.利用抽象建造者角色定义数据初始化的先后顺序,使用Hibernate框架将各部分数据保存到数据库中;然后通过策略模式定义应用开发阶段和正式运行阶段的初始化算法;最后利用单例模式封装JDBC和Hibernate操作的通用步骤.以高等院校目标考核管理系统的数据初始化操作为背景,通过JXL读取存储在Excel文件中的初始化数据作为具体建造者角色的实现逻辑,详细阐述了该方法的具体实现过程.通过测试与实践表明该数据初始化方法能够满足系统应用要求,具有较高的复用度,能够提高数据初始化操作的扩展性和维护性. According to the order and dependencies of data initialization for Java EE application,a data initialization method based on design pattern is proposed.First,the data to be initialized is regarded as a complex object,and it is represented by the product role of the builder mode,using the abstract builder role to define the order of data initialization,and using Hibernate framework to save every part of the data to the database.Then,it defines the initialization algorithm in the application development stage and the formal operation stage through the strategy pattern.Finally,it uses singleton pattern to encapsulate the general steps of JDBC and Hibernate operation.Taking the data initialization operation of target assessment management system in colleges and universities for example,through reading the initial data stored in the Excel file by JXL as the implementation logic of the concrete builder’s role,the concrete realization process of the method is described in detail.The test and practice show that the data initialization method can meet the application requirements of the system,it has high reusability and can improve the expansibility and maintainability of data initialization operation.
作者 欧阳宏基 葛萌 OUYANG Hong-Ji;GE Meng(College of Computer,Xianyang Normal University,Xianyang 712000,China)
出处 《计算机系统应用》 2019年第4期188-193,共6页 Computer Systems & Applications
基金 陕西省教育厅专项科研计划项目(17JK0828) 咸阳师范学院"青年骨干教师"培养项目(XSYGG201615) 咸阳师范学院专项科研计划项目(XSYK17029)~~
关键词 数据初始化 建造者设计模式 策略设计模式 单例设计模式 HIBERNATE框架 data initialization builder pattern strategy pattern singleton pattern Hibernate framework
  • 相关文献

参考文献12

二级参考文献79

共引文献49

同被引文献42

引证文献4

二级引证文献10

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部