The component that contains the user's instance/stateful data should
have no knowledge of ColdFusion scopes, session or otherwise.  Just
give it all the properties and methods that it needs to do its job. 
The session facade sits in the front of that component and deals with
all the scoping issues, i.e. it is the only component that knows about
ColdFusion's session scope.  I believe the session facade can be
safely cached in the application scope but it should be a stateless
CFC without any instance data.  Check out Sean's Mach-II development
guide for a little more about session facades:

http://livedocs.macromedia.com/wtg/public/machiidevguide/models.html


On 10/20/05, Nick Han <[EMAIL PROTECTED]> wrote:
>
>
>
> With CF 6.1 or CF7 there is no *need* to cache a cfc in a session variable
> on the calling page is there?  You can create a component that can handle
> user's instance and stateful data by using a session façade within the cfc
> and the whole cfc itself is cached in an application variable?
>
>
>
> I know for sure that this technique didn't work in version 6.0, as the
> application would override one user's request with another, if the cfc
> instance was cached in an application variable.
> ----------------------------------------------------------
>  You are subscribed to cfcdev. To unsubscribe, send an email to
> [email protected] with the words 'unsubscribe cfcdev' as the subject of the
> email.
>
>  CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting
> (www.cfxhosting.com).
>
>  CFCDev is supported by New Atlanta, makers of BlueDragon
>  http://www.newatlanta.com/products/bluedragon/index.cfm
>
>  An archive of the CFCDev list is available at
> www.mail-archive.com/[email protected]


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to