|
Application server variabe scope best practice question
|
|
09-13-2010, 12:54 PM
Post: #1
|
|||
|
|||
|
Application server variabe scope best practice question
While I'm particularly interested in the ColdFusion answer for this, I'm curious if there's a general rule regarding how much info to store in the client variable scope? (In CF, this is separate from the session scope.)
The app I'm the caretaker of seems to do a lot of similar queries for account info, and it appears to be a lot simpler to just dump the whole account info out into the client variable scope for use within the session, and but can have shorter longevity than the session scope. I cannot figure out what the fallout is, or if it was just an oversight of the India-guys that had this app before me that they did not think to do this. TIA -S |
|||
|
09-13-2010, 02:16 PM
Post: #2
|
|||
|
|||
|
Re: Application server variabe scope best practice question
You mean, putting info into a cookie or a session variable? Consider either of these locations unsecure and just convenient for things that don't matter much (first name, last name, etc.) and avoid user id, passwords and credit card info.
If you are doing numerous queries for the same data across multiple tables, you could set up a database table to store the often-access or sensitive data (indexed for speed?) with a GUID identifier and the GUID is stored on the client-side (session variable or even cookie). That way, if this information is used in queries you don't have to pass it back-and-forth each time, it's already in the database. When the session is over, then delete the record. Just my $0.02, ymmv :yippee Linux provides freedom, the problem is most users don't now what it is, or what to do with it. Ubuntu User# : 17583, Linux User# : 477531 -~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~ Edit your posts with [SOLVED] so everybody knows there is a solution. |
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)





