K
Karch
I have a web application that I have partitioned into 4 assemblies: web
application (presentation), business entities (typed datasets), business
objects (business logic), and data access (using DAAB). The two areas that
where I have read conflicting information are the use of typed datasets and
data access using the Enterprise Library.
Typed datasets:
There seems to be agreement that the use of typed datasets is "good".
However, there is some disagreement about _where_ they should be filled and
used. Some say that they should not be filled by the data access layer, but
rather should exist only in the business layer, which would merge the
untyped dataset returned from the data layer and pass the typed dataset to
the the web application.
1. Is it more efficient to use untyped datasets in the data access layer and
merge the results into a typed dataset at the business layer level?
2. What are the recommendations or guidelines for using typed datasets in
this type of architecture?
Data access:
I see the value in using DAAB if I want to be completely provider agnostic,
but what if I know that I will always be using SQL Server?
1. Am I better off in this case, from a performance perspective, to just use
data adapters and sqlclient?
2. Am I just buying myself fewer lines of code at the expense of performance
by using DAAB?
3. In cases where I expect only one row from a stored procedure, should I be
using out parameters in my stored procedure and assigning the values to a
dataset or should I just fill the dataset with a recordset?
application (presentation), business entities (typed datasets), business
objects (business logic), and data access (using DAAB). The two areas that
where I have read conflicting information are the use of typed datasets and
data access using the Enterprise Library.
Typed datasets:
There seems to be agreement that the use of typed datasets is "good".
However, there is some disagreement about _where_ they should be filled and
used. Some say that they should not be filled by the data access layer, but
rather should exist only in the business layer, which would merge the
untyped dataset returned from the data layer and pass the typed dataset to
the the web application.
1. Is it more efficient to use untyped datasets in the data access layer and
merge the results into a typed dataset at the business layer level?
2. What are the recommendations or guidelines for using typed datasets in
this type of architecture?
Data access:
I see the value in using DAAB if I want to be completely provider agnostic,
but what if I know that I will always be using SQL Server?
1. Am I better off in this case, from a performance perspective, to just use
data adapters and sqlclient?
2. Am I just buying myself fewer lines of code at the expense of performance
by using DAAB?
3. In cases where I expect only one row from a stored procedure, should I be
using out parameters in my stored procedure and assigning the values to a
dataset or should I just fill the dataset with a recordset?