Macromedia Flash Server - Class Serialization

This is Interesting: Free IT Magazines  
Home > Archive > Macromedia Flash Server > April 2005 > Class Serialization





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Class Serialization
JesterXL

2005-04-18, 5:45 pm

Having an issue (personal) with OpemAMF, a free open-source alternative to
Flash Remoting.

What I want to know about Flashcom is this:

Does Flashcom run getter/setter properties, on the client, when the class is
deserialized from the server? Meaning, I have a client class called "User",
that has a getter/setter public property of "firstName", a private of
_firstName, and the server-side version matches the getter/setters with just
normal publics (since SS.as is AS1'ish). When I receive a "User" class on
the client-side via a NetConnection call or perhapse a
SharedObject.onSync... are the setters run?

OpenAMF isn't and I think it has to do with the way AMF is serializing the
class. What I think is happening is:

- Java passes the class to OpenAMF
- OpenAMF serializes the class, passes down the binary wire
- Flash desearlizes the class
- Flash makes a vanilla Object, throws the data on it, then tells the
__proto__ to point to User.prototype
- You now have your class

The problem with the above is this does in fact have your firstName come
through the wire with "Joe", but it's not actually running the setter...
because by the time the class was born, it was still an Object, and not
associated with the User class.

Why ask here? Because if Flashcom's serialization works the same way, then
I know this is what is happening, and is not a failing of OpenAMF, but an
ECR request for Flash Remoting.

Thanks for your time!

--JesterXL


=-----------------------------------------------------------
Supported by Fig Leaf Software - http://www.figleaf.com
=-----------------------------------------------------------

To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcomm

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com