Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 8th, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 121
Thanks: 0
Thanked 0 Times in 0 Posts
Default persisting data in a web app

Hi all,
  this may be dumb but....

  Is it good practice to always use the session variable
  to store datasets, records, objects, etc so that they
  can be passed between web pages ?

  Is this how the big boys do it ? Like in applications
  where you add stuff to a shopping cart and then go to the
  checkout page ? ie you create a memory object that holds
  list items and send it to the session object.

  Or is there another way ?

Cheers.
Chas.



 
Old October 8th, 2004, 05:29 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Use the Cache. This is a great option because it uses memory for it. Most apps use a database to store the information such as a shopping cart.

Brian
 
Old October 9th, 2004, 12:44 PM
Authorized User
 
Join Date: Jun 2004
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Am I right in thinking that caching is useful is many
browsers might request the same page over a short period of time - thus saving disc/database access ?

For an individual user who may be creating an individual dynamic
list - caching wont really help - it would still be best to use
the session variable and then at some stage do a post back event
that causes this data to be wriiten to a database ?

 
Old October 20th, 2004, 01:59 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Chas,

I can't say that I'd concider myself a "big boy" in the software world, but I've written some pretty large applications. In most cases, persisted data is written to a database. The session is used mostly for user state maintenance. I put small things in there: user id, on-the-fly settings, etc. Seldom to never do I put in objects. Anything of substance gets persisted to a "permanent" medium like a file (xml) or the DB.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Interface between web app and win app alienaheart ASP.NET 2.0 Professional 4 August 4th, 2009 09:29 AM
Convert a VB.Net app to a web app? furjaw VB.NET 3 September 24th, 2007 12:27 PM
Best way to bind config data to a web app psantos Pro JSP 2 October 21st, 2003 06:36 AM
Permissions for Web app. files on Web server Jan_Ma Classic ASP Basics 0 June 28th, 2003 02:06 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.