K
kbutterly
Good morning,
I have seen two different types of data access layers and I am
wondering which, if either, is considered best practice, or if one is
better suited to certain situations than the other.
The first type is the DAL described in this MSDN article as well as in
the tutorial on the www.asp.net website:
http://msdn2.microsoft.com/en-us/library/
aa581778.aspx#aspnet_tutorial01_dataaccesslayer_vb_topic3
This first type uses typed datasets to build a DAL and then creates a
Business Logic Layer made up of classes that access the table adapters
from the DAL. This type has the names of the stored procedures in the
DAL.
The second type uses a class to wrap all the database connection code
and that class is the data access layer. Then the BLL calls this
class to handle database operations. This type has the BLL pass the
names of the stored procedure to the DAL as a parameter.
I see these as two fundamentally different ways to handle three-tier
architechture. Is one considered more robust? I can see that the
second type would have a very reusable DAL if it was designed
properly.
Any comments, references, links, war stories, would be greatly
appreciated.
Thanks,
Kathryn
I have seen two different types of data access layers and I am
wondering which, if either, is considered best practice, or if one is
better suited to certain situations than the other.
The first type is the DAL described in this MSDN article as well as in
the tutorial on the www.asp.net website:
http://msdn2.microsoft.com/en-us/library/
aa581778.aspx#aspnet_tutorial01_dataaccesslayer_vb_topic3
This first type uses typed datasets to build a DAL and then creates a
Business Logic Layer made up of classes that access the table adapters
from the DAL. This type has the names of the stored procedures in the
DAL.
The second type uses a class to wrap all the database connection code
and that class is the data access layer. Then the BLL calls this
class to handle database operations. This type has the BLL pass the
names of the stored procedure to the DAL as a parameter.
I see these as two fundamentally different ways to handle three-tier
architechture. Is one considered more robust? I can see that the
second type would have a very reusable DAL if it was designed
properly.
Any comments, references, links, war stories, would be greatly
appreciated.
Thanks,
Kathryn