| 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
|