DAO Layer explained

In this section we will explain you the DAO Layer of our application.

DAO Layer explained

DAO Layer explained

     

In this section we will explain you the DAO Layer of our application.

 

DAO Layer Explained

 

DAO stand for Data Access Object, it is design pattern. The DAO contains a connection to a database and basic operation on the database. The other layer of the application can interact with the database by making an object of  DAO class and calling their required method only. It is an important part of the application. It completely hides the data access logic / code from other part of the application. The user / developer can only access their code through their API.

 

Data Access Object is a technique which separate the data access logic and object persistence. It also provides the flexibility to change application prospective without effecting rest of the part of the application. It provides a very simple and consistence API. Because of its simplicity it has become a mandatory parts of a web application.

 

   
   Data Access Object

 

The DAO centralize all the operation on the database.

 

In the present project the DAO class gets connection from the connection factory class (It holds a connection). The bean class gives the data on which operation is performed. Finally DAO class performs the operation on the database and returns the response to the other layer of the application. The internal processing of Data Access Object is given below.

   

DAO Internal Processing

 

One of the great advantage of DAO is the, you do not require to write a code for database connection on every where, you just make an object of DAO class and call the required method to perform operation on database.

 

One of the great advantage of DAO is the, you do not require to write a code for database connection on every where, you just make an object of DAO class and call the required method to perform operation on database.