You can't put a CFC in the client scope (nor any other complex data), because it can't be converted to a string an persisted.  And you can't do the WDDX trick either, because CFC's can't be WDDXed and come back as they were.  You'd need to use a Memento for the CFC which can be serialized, and then restore it on each request.  Certainly doable, but might be more overhead than it's worth.
 
barneyb
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Joe Eugene
Sent: Friday, October 03, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Just starting CFC's -- Session Question

Nathan,
 
This is good encapsulation, divide and conquer technique etc..
One quick question..
 
Can you implement the same encapsulation technique for Client Variables?
i.e
"PersistanceScope.cfc"
Instance vars
-id
-firstName
-lastName
 
and store the Instance of PersistanceScope.cfc in a Client Var.. like
client.user = createObject("Component","PersistanceScope").init();
 
Thanks,
Joe Eugene
 

Reply via email to