Learn DAO mode

xiaoxiao2021-03-06  16

Today, I've seen the use of DAO mode in Java, which used DAO mode in PHP as an implementation of the data access layer. But because Java programming is not very skilled, there is still a lot of detours when using Java to implement DAO mode. 1. Whether the gain should be obtained, close the link, close STATEMENT, turn off the resultSet, etc. Is it placed in a separate class? For example, Daoutil. 2. Whether JNDI and DataSource should replace DRIVERMANAGER to get database links. The above is only some of the problems that I have encountered, I have made me a headache. My Java development actual combat experience is really too small, and I am not familiar with the class library. These problems are currently in urgent need, mainly need to write more written programs.

In addition, it is necessary to change the habit of dragging the pull. A small program can actually be a month, this progress is really unbearable.

转载请注明原文地址:https://www.9cbs.com/read-58555.html

New Post(0)