----- Original Message ----- From: "Freddy" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, November 15, 2001 5:16 PM Subject: Re: Session and Client Variables
> Kwang Suh wrote: > > > > My heart goes out to you! You sound like you've had a bad experience with > > a > > > session variable cult, or something. But if used in its proper context, > > > session variables can change your (work) life. > > > > Yeah, but what's "proper context"? Do people even bother to do enough > > analysis to say whether they should go client or session, or do people use > > session vars because that's what they've been using since they started using > > CF? > > > I would think that any application should be built with a well thought out > > plan. Utilize whatever is best in a given situation. A proerly used session > > variable works better than an inproperly used client and vice versa. Agreed. I'm saying that most people don't even create the well thought out plan. > > > > > In your darkest hour, when > > > confronted with the need to pass queries of information, the number of > > rows > > > unbeknownst to you, from one page to another, over and over again in a > > > endless, vicious cycle, you might find that session variables are your > > only > > > hope. > > > > Hardly. That's what WDDX is for. > > WDDX is great for hanling large recordsets but it is not as fast to access as a > session scoped query on a seperate page. Again the method used is depoendent on > what you need to do. > > > > > > > Yes, some people may have committed evil act in the name of session > > > variables, but don't let hypocrites turn you away from the tool that > > > delivered you from the hands of hidden form fields and time consuming > > > database calls. > > > > Why would I need hidden form fields and database calls when I'm using client > > variables? > > Take a look at your database activity. Using client variables will generate a > database call. Yes, I realize this. But I will bet you 1 million widgets that a properly configured RDBMS is _much_ better at handling locking than a properly configured CF server using session variables. Not to mention that my client app will actually scale, and your session app will not. I think the original respondent was referring to constant database calls for variables that should be persistent. > Also try holding a complex structure in a client variable. I've already mentioned this drawback. > > I would say use what works for you. Do not rely on any one method overly much. > If you do you will find that you are not going to get the full benefits that > working a rich scripting language like cf can provide. I think the overarching requirement for most, if not all, enterprise-class applications are reliability and availability. I can't see how using session vars meshes with this requirement. Hey, if all someone's making are small apps, go right ahead and use session variables. Just don't expect the application to be scalable and maintainable without some major rewrite. > > Just my 2cents worth > Frederic > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

