改进JDBC框架的研究与应用  被引量:2

Research and Application of Improved JDBC Framework

在线阅读下载全文

作  者:葛萌 欧阳宏基 陈伟 GE Meng;OUYANG Hong-Ji;CHEN Wei(School of Computer Science,Xianyang Normal University,Xianyang 712099,China)

机构地区:[1]咸阳师范学院计算机学院,咸阳712099

出  处:《计算机系统应用》2021年第6期107-111,共5页Computer Systems & Applications

基  金:咸阳师范学院“青年骨干教师”培养项目(XSYGG201615);咸阳师范学院专项科研计划(XSYK19021,XSYK19054)。

摘  要:分析了传统JDBC框架存在的代码复用性低、耦合度高、不易移植、易出现网络故障导致Connection对象失效等缺陷,结合若干设计模式和数据库重连机制,提出了一种改进的JDBC框架.该框架通过DAO模式向业务逻辑层提供调用持久化逻辑的接口、解耦合业务逻辑与持久化逻辑;利用模板、策略和工厂模式封装DAO的具体实现,实现具体持久化代码的统一性并减少代码的冗余度.将改进的JDBC框架应用于某高校绩效考核管理系统,实践结果表明,通过使用改进的JDBC框架,有效增强了系统的鲁棒性,解耦合了数据持久层与业务逻辑层,提高了数据持久层代码的复用率和开发效率.The traditional JDBC framework is featured by low code reusability,high coupling,and difficult transplantation,with connection object failures caused by frequent network faults.In this study,we propose a novel JDBC framework combined with several design patterns and the database reconnection mechanism.Through the DAO pattern,the proposed method provides the persistence logic interface,the decouple business logic and the persistence logic to the business logic layer.The concrete implementation of DAO is encapsulated through templates,strategies and factory patterns,improving uniformity of persistence codes while reducing code redundancy.This novel framework is applied to the performance evaluation system in a university.The results demonstrate that the improved JDBC framework decouples the data persistence layer from the business logic layer and improves the reuse rate and development efficiency of the codes in the data persistence layer,enhancing the robustness of the system.

关 键 词:JDBC 设计模式 数据库重连机制 数据持久层 

分 类 号:TP311.13[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象