About Flash Remoting MX

Flash Remoting MX is an application server gateway that provides a network communications channel between Flash applications and remote services. Remote services consist of application server technologies, such as a JavaBean, Macromedia ColdFusion component or page, ASP.NET page, or web service. Service functions represent a reference to a specific remote service from ActionScript in a Flash movie.

When compared to other techniques for connecting Flash applications to external data providers, such as HTTP functions like getURL and loadVariables and XML functions like XMLSocket, Flash Remoting MX provides the following advantages:

You use the NetServices ActionScript functions to connect to application server technologies and web services. In addition, the NetDebug and DataGlue ActionScript functions help debug Flash applications and display record sets in Flash User Interface (UI) Components.

When compared to traditional HTML-based browser applications, Flash applications provide unique abilities to create dynamic and sophisticated user interactions, including the following:

On the server side, Flash Remoting MX runs as a servlet in Java application servers, an assembly in .NET servers, and a native service in ColdFusion MX. Depending on the application server platform, Flash Remoting MX on the server contains a series of filters that perform logging, error handling, and security authentication, as well as automatically mapping the service function request to the appropriate server technology.

Using Flash Remoting MX, you can build sophisticated Flash applications, such as a message board, shopping cart, or product catalog. The following figure depicts a simplified representation of the Flash Remoting architecture:

Flash Remoting architecture

Understanding the Flash Remoting service adapters

Flash Remoting MX automatically maps incoming requests to the appropriate service adapters, which provides a direct connection to a specific application server technology. When an HTTP request arrives at the server and contains AMF, Flash Remoting MX maps the request to the appropriate adapter by name. To avoid naming conflicts, you specify the directory structure, fully qualified class or package name, or WSDL URL of the web service in ActionScript.

Understanding AMF

To send and receive messages from remote services, Flash Remoting MX uses Action Message Format (AMF), a binary message format designed for the ActionScript object model. Using AMF, Flash Remoting MX encodes data types back and forth between the Flash application and the remote service over HTTP. Modeled on the Simple Object Access Protocol (SOAP), AMF uses a packet format to relay information. An AMF packet consists of the following parts:

Server function requests are automatically serialized into AMF format using the NetServices ActionScript functions. On the server, Flash Remoting MX deserializes the incoming AMF messages. When the server-side processing finishes, the results are serialized to AMF and sent back to the Flash application. The format of the server-generated AMF message is identical to the client-generated packet. The body of the individual AMF message contains the error or response object, which is expressed as an ActionScript object.

For more information about error and response objects, see Chapter 2, "Using Flash Remoting Components in ActionScript".

 

Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/flashremoting/mx/Using_Flash_Remoting_MX/intro2.htm