This is the first post in a series of mini tutorials dedicated to the subject of Flash Remoting and WebORB. The series starts from the very basics of both technologies and will delve into more advanced features over time.
A few basic FAQs to get started:Q: What is Flash Remoting?A:
Flash Remoting is a technology enabling connectivity between a Flash client application and a server-side component.Q: How does a Flash client connect to a server-side object?A:
The technology consists of two parts: 1) client-side ActionScript library and 2) server-side technology responsible for handling object invocation. Both parts must understand a binary protocol called AMF - Action Message Format. The client side library is called 'Flash Remoting Components'. There are two available implementations: one for ActionScript version 1.0 and the other is for AS2.0. The Flash Remoting Components are available at no charge from the Adobe's site (download remoting components here
). There are several server-side technology implementations available for many platforms and development environments. WebORB is one of them, it provides a fully compatible implementation of AMF and thus can handle object invocation requests received from Flash clients.Q: How does Flash client invoke a method on a server-side object/service?A:
Flash Remoting Components provide object binding API. Every object must be identified with either an ID or fully qualified class/type name or WSDL URL. Additionally a Flash Remoting-enabled server (WebORB or any other server) must expose a 'gateway URL'. Flash client connects to the server using gateway URL and then uses object ID, class/type name, or WSDL URL to connect to a particular object/service. Once connected, Flash Remoting Components generate a client-side proxy for a remote object. Flash Remoting Components relay all method invocation on the proxy object to the server-side.Q: What type of server-side components does WebORB support?A:
WebORB is currently available for the Microsoft .NET and Java environments. We're also working on two additional editions for PHP and Ruby on Rails. WebORB for .NET can handle invocations of any .NET object (regardless of what language it is written) and XML Web Services. The Java edition provides connectivity to Java objects, EJBs and XML Web Services.Q: How would WebORB work with my application?A:
WebORB for .NET is available as a .NET assembly (weborb.dll). To expose classes from your application to Flash clients, you can simply copy weborb.dll into the /bin folder and register it as an HTTP Handler. WebORB for Java is available as a JAR, WAR or EAR file. It can be deployed into any Java servlet container or J2EE server.Q: Is there anything special I need to do to expose my objects to Flash?A:
One of our architectural goals is non-intrusiveness. As a result, WebORB does not require any changes to the classes exposed to Flash. It will make the best effort to convert objects received from Flash to adapt them to local types. Similarly WebORB will make sure that a return type is properly serialized to Flash so it is understood in the client (ActionScript) environment.
The diagram below provides a high level overview of how all the parts mentioned above fit together.