Brian,
        Though a valid concern, just wanted to make it clear that the
deserialized cfc will not go out of sync when a new method is added
while it was serialized. This is because, the methods are never
serialized. It's only the instance level data associated with the cfc
instance, such as the variables in the this scope and in the var scope
of the cfc, that get serialized. The methods are always available in the
cfc template. Hence, the methods are not serialized. 

So, once the cfc instance is back into action when it is deserialized,
the new methods will be available to the cfc from the .cfc template.

The best part about CFC serialization is it can handle complex circular
references as well. That is, if a cfc has a reference back to the itself
in the this scope, then you can expect the same circular reference to be
maintained once the cfc is deserailized.

And yes, we are working on the serializing array and query objects
within the cfc scopes. That issue will be fixed soon. 

Thanks,
Rakshith
Adobe ColdFusion Team

-----Original Message-----
From: Brian Kotek [mailto:[EMAIL PROTECTED] 
Sent: Thursday, December 13, 2007 8:47 AM
To: CF-Talk
Subject: Re: CF8: Serialise a CFC?

Also, be very careful because if you have serialized versions of CFCs in
the
database and then you change the actual code for the CFC (add a method,
etc.), you are going to have major problems because your application
code
will be out of synch with the serialized CFCs. Which means if you add a
method and then deserialize the CFC, at best any code in your app that
uses
the new method will blow up when it hits your out-of-synch deserialized
CFC,
and at worst it might not even deserialize at all.

On Dec 12, 2007 4:03 PM, Mark Mandel <[EMAIL PROTECTED]> wrote:

> From what I also understand, serialisation is a deep serialisation, so
> be careful with your composition, as you have no control over how deep
> the serialisation goes (which is unfortunate, but workaroundable)
>
> That all being said, there is no reason you couldn't roll your own
> serialisation Mike, WDDX, or something of your own making.
>
> Mark
>
> On Dec 13, 2007 3:51 AM, Dave Watts <[EMAIL PROTECTED]> wrote:
> > > Even if CF8 can serialize CFCs (I've read that it can), I
> > > don't think you can store complex variables in the Client
> > > scope. I'd assume that a serialized CFC would be considered
> > > a complex variable.
> >
> > No, it's a string. The example in the URL I included writes the
string
> to a
> > file.
> >
> > There is a serious limitation to this, though - your CFC can only
> contain
> > strings, structures and other CFC instances apparently. If it
contains
> > arrays or queries, you can't deserialize it again! Apparently,
Adobe's
> > working on fixing that.
> >
> > Dave Watts, CTO, Fig Leaf Software
> > http://www.figleaf.com/
> >
> > Fig Leaf Software provides the highest caliber vendor-authorized
> > instruction at our training centers in Washington DC, Atlanta,
> > Chicago, Baltimore, Northern Virginia, or on-site at your location.
> > Visit http://training.figleaf.com/ for more information!
> >
> >
> >
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294660
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to