Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Access Application Block

Status
Not open for further replies.

jby1

Programmer
Apr 29, 2003
403
GB
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!
 
Except DAO everyting is fine. DAO is ok, i have a big project that use DAO to access SQL server in VB 6.0. But from all articles that I've read about .NET, they allways suggest to use ADO.NET. I don't now which data source you use but if you use SQL Server than you can't compare DAO with ADO.NET. By the way .NET does not support DAO. If you mean to use some external COM that implement DAO and to use PInvoke from .NET or any simular combination I think will be fatal error.
 
I haven't been too clear I think! What I mean when I say Data Access Object is simply an object which will access the database. This will make ADO.NET calls or whatever. I will write these objects myself.

Sorry for the misunderstanding!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top