{"title":"基于设计模式和DbUtils的Java EE数据持久层模型","authors":"Hongji Ouyang, T. Palaoag","doi":"10.1109/ICMSS56787.2023.10117975","DOIUrl":null,"url":null,"abstract":"Aiming at the shortcomings of low development efficiency and high code redundancy of traditional JDBC and improved JDBC in the development of data persistence layer, a new Java EE data persistence layer development model is proposed. The model uses factory design pattern to separate the creation and use of DAO, uses single instance pattern to encapsulate the database connection pool, uses dynamic proxy and reflection to create the implementation class object of DAO interface, uses annotation to mark the mapping relationship between entity class and data table, and uses DbUtils tool class to complete the interaction with database. The design idea and components of the model are described in detail. Taking the data persistence layer of the target assessment system as an application case, the implementation process of the model is described in detail. The test results show that this model can improve the development efficiency and reduce the redundancy of code, and its performance is almost the same as that of traditional JDBC.","PeriodicalId":115225,"journal":{"name":"2023 7th International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)","volume":"24 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2023-01-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"A Java EE Data Persistence Layer Model Based on Design Pattern and DbUtils\",\"authors\":\"Hongji Ouyang, T. Palaoag\",\"doi\":\"10.1109/ICMSS56787.2023.10117975\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Aiming at the shortcomings of low development efficiency and high code redundancy of traditional JDBC and improved JDBC in the development of data persistence layer, a new Java EE data persistence layer development model is proposed. The model uses factory design pattern to separate the creation and use of DAO, uses single instance pattern to encapsulate the database connection pool, uses dynamic proxy and reflection to create the implementation class object of DAO interface, uses annotation to mark the mapping relationship between entity class and data table, and uses DbUtils tool class to complete the interaction with database. The design idea and components of the model are described in detail. Taking the data persistence layer of the target assessment system as an application case, the implementation process of the model is described in detail. The test results show that this model can improve the development efficiency and reduce the redundancy of code, and its performance is almost the same as that of traditional JDBC.\",\"PeriodicalId\":115225,\"journal\":{\"name\":\"2023 7th International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)\",\"volume\":\"24 1\",\"pages\":\"0\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2023-01-06\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"2023 7th International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/10.1109/ICMSS56787.2023.10117975\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"2023 7th International Conference on Management Engineering, Software Engineering and Service Sciences (ICMSS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICMSS56787.2023.10117975","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
A Java EE Data Persistence Layer Model Based on Design Pattern and DbUtils
Aiming at the shortcomings of low development efficiency and high code redundancy of traditional JDBC and improved JDBC in the development of data persistence layer, a new Java EE data persistence layer development model is proposed. The model uses factory design pattern to separate the creation and use of DAO, uses single instance pattern to encapsulate the database connection pool, uses dynamic proxy and reflection to create the implementation class object of DAO interface, uses annotation to mark the mapping relationship between entity class and data table, and uses DbUtils tool class to complete the interaction with database. The design idea and components of the model are described in detail. Taking the data persistence layer of the target assessment system as an application case, the implementation process of the model is described in detail. The test results show that this model can improve the development efficiency and reduce the redundancy of code, and its performance is almost the same as that of traditional JDBC.