Karim
|
| Posted: 04/28/2003, 7:01 AM |
|
Which one would you recommend or would you use a combination?
I have a unique UserID used throughout the application and several screens with different ID per screen, basically master - detail if-you-will.
Would it be better to use Sessions for the UserID and Form for the several other screens, or another combination?
Thanks,
Karim
|
|
|
 |
Hamilton
|
| Posted: 04/30/2003, 11:36 AM |
|
Karim,
I'm not certain I completely follow the 'idea' of what you're intending, but this may help.
Passing variables in the querystring:
Use only for non-secure related variables as they can be viewed and changed.
Passing variables in the form
Same as above, but more difficult to spoof.
Sessions
Each variable takes about 4k minimum + the size of whatever you place in them.
If you store 100k of session data per user and your site is getting hit by hundreds of users, it'll take some ram to sustain their sessions.
Another approach is the GUID Database approach - which I use. This allows you to create one Session("GUID") for each user. The values that would have been placed in Session variables, like "Group_ID", etc instead get written to the database with the GUID as the key field, linking it back to the users session.
The GUID approach allows you to store as many name/value pairs as you could want and is quite fast.
This approach is much more scaleable as you can store literally hundreds of personalization variables, etc. With one GUID.
|
|
|
 |
Hamilton
|
| Posted: 04/30/2003, 12:05 PM |
|
As an additional comment, I think I recently saw a similar approach on the '4 guys from rolla' website. Their example had source code.
|
|
|
 |
|