Hi
I am currently in the process of designing a system pretty much from scratch (will be developed in C#), with the exception of the database, which I do not have the liberty of redesigning at this moment. Hence I feel that it is particularily important to keep database code seperate from business logic and presentation logic, as well as having a clearly defined interface to all database access methods. That way if I get to redesign the database in the future it will have a minimal impact on the system.
I am trying to determine my approach to this problem. I am considering using a single static DatabaseGateway class, which defines all legal data access methods, and effectively delegates them to more specialized Data Access Objects (DAOs), which will be invisible to the rest of the application. I know this could lead to a rather unwieldy DatabaseGateway, but I feel this is worth it to retain control over the database interface.
I am also considering using Microsoft Data Access Application Block within my DAOs to handle the actual database access.
I have never before tried this approach, and while it seems fine to me in theory, I am wondering if anybody out there has any comment or can see something wrong that escapes me.
Thanks for any feedback!!
I am currently in the process of designing a system pretty much from scratch (will be developed in C#), with the exception of the database, which I do not have the liberty of redesigning at this moment. Hence I feel that it is particularily important to keep database code seperate from business logic and presentation logic, as well as having a clearly defined interface to all database access methods. That way if I get to redesign the database in the future it will have a minimal impact on the system.
I am trying to determine my approach to this problem. I am considering using a single static DatabaseGateway class, which defines all legal data access methods, and effectively delegates them to more specialized Data Access Objects (DAOs), which will be invisible to the rest of the application. I know this could lead to a rather unwieldy DatabaseGateway, but I feel this is worth it to retain control over the database interface.
I am also considering using Microsoft Data Access Application Block within my DAOs to handle the actual database access.
I have never before tried this approach, and while it seems fine to me in theory, I am wondering if anybody out there has any comment or can see something wrong that escapes me.
Thanks for any feedback!!