Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 23rd, 2009, 08:49 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default shopping cart

hi, i want to know the correct ways to build shopping cart. There got many method to store shopping cart item that customer press the "add to cart button". The method i know is
1. Store in session / session with array or datatable ...
This method disadvantage is when too many people visit your then the web become slow because too many session. Also session unstable like session timeout faster than setting in web.config

2. Store in cookies.
Cookies disadvantage is when the client disable cookies, then every thing cannot work. if i'm not wrong...

3. store in temporary table.
There got many articles do not recommend store in table.

This a few that i know ... so i need to know which method or other than this 3 method is the safe to implement? Thank...
  #2 (permalink)  
Old April 23rd, 2009, 02:07 PM
Lee Dumond's Avatar
Wrox Author
Points: 4,942, Level: 29
Points: 4,942, Level: 29 Points: 4,942, Level: 29 Points: 4,942, Level: 29
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2008
Location: Decatur, IL, USA.
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

You are correct about Session and Cookie not being very scalable.

The most scalable e-commerce apps persist the shopping cart to the database. You can serialize it and store it as a blob, perhaps using the Profile system. You can also store it to a custom table.

If you do this, you'd want to make good use of caching, You would search the cache for the cart whenever required, and only fetch from the database if the cache is empty. You would, of course, purge the cache when items are added or removed.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
The Following User Says Thank You to Lee Dumond For This Useful Post:
badboy1 (April 24th, 2009)
  #3 (permalink)  
Old April 24th, 2009, 09:32 AM
Authorized User
 
Join Date: Jun 2008
Location: p, g, Malaysia.
Posts: 17
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank Lee Dumond. Now I try check method that suggest like store in table,blob,profile system and cache. Thank for show some way and scalable shopping cart in database.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shopping cart keyvanjan Classic ASP Basics 1 January 9th, 2007 10:16 PM
Shopping Cart seannie ASP.NET 2.0 Basics 0 December 12th, 2006 10:28 AM
Shopping Cart inkrajesh ASP.NET 1.0 and 1.1 Basics 2 February 28th, 2006 03:08 AM
shopping cart isheikh BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 October 8th, 2004 04:20 PM



All times are GMT -4. The time now is 10:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.