P
PCC
I am writing a data access layer for a web service. Data from the web
service is to be returned as XML. My design dilemma is this...
Should I be returning XML from my stored procedures using the "for xml"
clause or loading the data into a DataSet in the data access layer and then
outputting XML from the dataset as the response? All my sprocs are simple
CRUD spocs just to keep maintenance easy.
My own bias is to output XML from the DataSet after I have loaded it in from
the sproc. That said, my real question is if I am not really doing anything
with the data until it ends up in a DataSet within the Business Object
Layer, why should I bother to load it into a DataSet in the Data Access
Layer and then serialize it as XML when I can get XML string from the
database?
You can tell I am a little lost and confused here. You advice is greatly
appreciated. I know how to do both, but am not sure which is best in the
long run. Thank you.
service is to be returned as XML. My design dilemma is this...
Should I be returning XML from my stored procedures using the "for xml"
clause or loading the data into a DataSet in the data access layer and then
outputting XML from the dataset as the response? All my sprocs are simple
CRUD spocs just to keep maintenance easy.
My own bias is to output XML from the DataSet after I have loaded it in from
the sproc. That said, my real question is if I am not really doing anything
with the data until it ends up in a DataSet within the Business Object
Layer, why should I bother to load it into a DataSet in the Data Access
Layer and then serialize it as XML when I can get XML string from the
database?
You can tell I am a little lost and confused here. You advice is greatly
appreciated. I know how to do both, but am not sure which is best in the
long run. Thank you.