Idealism is what precedes experience; cynicism is what follows...

Friday, August 22, 2008

ClassMappings between WebORB and Adobe Flex

Basically there are three methods to obtain a classmapping between WebORB and Adobe Flex.

1. ClassAlias in WebORB configuration.
2. ClassAlias in your ActionScript code through the "registerClassAlias" class.
3. ClassAlias in your ActionScript classes through the RemoteClass metatag.

1. ClassAlias in WebORB configuration
Add the following to your WebORB configuration file (This can also be done through the WebORB management console):


Name of ClientClass
Name of ServerClass
Name of assembly


2. ClassAlias in your ActionScript code through the "registerClassAlias" class.

var clientClass:Class = getDefinitionByName( clientClassName ) as Class;
registerClassAlias( serverClassName, clientClass );

3. ClassAlias in your ActionScript classes through the RemoteClass metatag.


[RemoteClass(alias="com.companyname.namespace.ClassName")]


The result is almost identical (some differences in behavior exists, but outside the scope of this short note) and will eventually mean that serverclasses returned and send to the server will be serialized and deserialized between the two class-definitions automatically by the WebORB server and the Flas Player respecitively.

No comments:

My Network