P
Paul Hobbs
Hi All,
I am developing a site that makes use of a standard shopping cart. Anyone
can add items to the cart, but only registered users can actually check out.
When a user tries to check out, if they are not logged in they will be
prompted to either login or register before they can proceed to the
checkout.
There is NO requirement to allow users to add items to a shopping cart, and
return at some time in the future and still have those items in the cart.
My question is this: what are the pros and cons of storing the contents of
the cart in the database versus storing the cart contents in a session
variable. The author of one of my reference books (on ADO.NET) provides an
example of each approach, but says his preference is for a database driven
cart. I'm not sure why this would be - any thoughts?
Thanks in advance,
Regards,
Paul Hobbs
I am developing a site that makes use of a standard shopping cart. Anyone
can add items to the cart, but only registered users can actually check out.
When a user tries to check out, if they are not logged in they will be
prompted to either login or register before they can proceed to the
checkout.
There is NO requirement to allow users to add items to a shopping cart, and
return at some time in the future and still have those items in the cart.
My question is this: what are the pros and cons of storing the contents of
the cart in the database versus storing the cart contents in a session
variable. The author of one of my reference books (on ADO.NET) provides an
example of each approach, but says his preference is for a database driven
cart. I'm not sure why this would be - any thoughts?
Thanks in advance,
Regards,
Paul Hobbs