Monday, March 26, 2012

What is the best approch to store data

Hi All,

I am developing a shopping cart. so what is the best approch to store the Shopping cart data during shopping.... should i store data in Session or in cookie or in Data base....??

plz discuss in detail
Thanx in advance
SajjadI'd use the Session.

i wud also go with aidy and store them in session variables for the following reason

1. its server side

2.no need to connect to databse( which wud become costly affair)

3. session specific ( if user closes the window as people wud normally do when the see the payment page ) no extra cleaning work required for clearing the cart

altough as the no of users increase the size occupied on the server memory could be a cause of concern

enjoy

Vignesh


If your user authenticates before starting shopping, I would recommend cookies/database.
Why? because in case his window closes by accident or something happens, his shopping cart will wait for him to login.

0 comments:

Post a Comment