Y
Yul
Hi,
We are in the process of designing an ASP.NET app, where a user will
enter some 'Customer ID' to be queried in the database. If the ID is
valid, several stored procedures will be called to populate multiple
webpages containing customer information. There isn't a one-to-one
correlation between the stored procedure and a webpage. In other
words, a webpage may have to refer to 1 or more DataTables to populate
itself. Therefore, a DataTable that was used to populate webpage1 will
need to be kept to populate webpage2.
In order to make this process quick and efficient, we are trying to
devise an effective scheme. Here are a couple of options we've come up
with. I would highly appreciate it, if you folks can give your
comments and/or suggestions on this matter.
Option 1: Object Model.
Create a CustomerInfo Object with the necessary properties, and
populate it (using a DataReader)with the values returned by calling
each of the stored procedure, store the object in a session variable,
and use it to populate the webpages.
Option 2:
Store each of the DataTables returned from the stored procedures in
DataSet, save the DataSet in a session variable, and use it to
populate each of the webpages.
So, my question are...
Is it worth creating a Customer object (option1) to populate the
various pages, or is it just better to use a DataSet (option2),
despite the fact it will be larger in size? BTW, we are estimating the
size of the Customer object to be ~8-10K. How much extra overhead will
a DataSet add?
Also, we will be hosting the app on a webfarm, so the session
variables will be saved on SQL server. And the information is needed
only once to populate the pages. There will approximately be 8
webpages showing customer info, and 7 stored procedures to be called.
Again, I thank you for you help, and I look forward to your response.
We are in the process of designing an ASP.NET app, where a user will
enter some 'Customer ID' to be queried in the database. If the ID is
valid, several stored procedures will be called to populate multiple
webpages containing customer information. There isn't a one-to-one
correlation between the stored procedure and a webpage. In other
words, a webpage may have to refer to 1 or more DataTables to populate
itself. Therefore, a DataTable that was used to populate webpage1 will
need to be kept to populate webpage2.
In order to make this process quick and efficient, we are trying to
devise an effective scheme. Here are a couple of options we've come up
with. I would highly appreciate it, if you folks can give your
comments and/or suggestions on this matter.
Option 1: Object Model.
Create a CustomerInfo Object with the necessary properties, and
populate it (using a DataReader)with the values returned by calling
each of the stored procedure, store the object in a session variable,
and use it to populate the webpages.
Option 2:
Store each of the DataTables returned from the stored procedures in
DataSet, save the DataSet in a session variable, and use it to
populate each of the webpages.
So, my question are...
Is it worth creating a Customer object (option1) to populate the
various pages, or is it just better to use a DataSet (option2),
despite the fact it will be larger in size? BTW, we are estimating the
size of the Customer object to be ~8-10K. How much extra overhead will
a DataSet add?
Also, we will be hosting the app on a webfarm, so the session
variables will be saved on SQL server. And the information is needed
only once to populate the pages. There will approximately be 8
webpages showing customer info, and 7 stored procedures to be called.
Again, I thank you for you help, and I look forward to your response.