
This is the Title of the Book, eMatter Edition
Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved.
How Does Flash Remoting Work?
|
5
• Java Management Extensions (JMX MBeans)
• ColdFusion templates
• ColdFusion Components
• Server-Side ActionScript (SSAS)
• ASP.NET pages
• ASP.NET DLLs
• SOAP-based web services
• PHP pages
In other words, a remote service might be a ColdFusion page, a PHP page, or an
ASP.NET DLL, among other things. Flash Remoting allows Flash to make remote
procedure calls on existing server-side services; server-side developers do not have to
implement any Flash-specific APIs or adjust their design patterns. Calling a service
from a Flash movie is as easy as calling it by name. For example, if you have a server-
side method named getRecords( ) that you would typically call from another server-
side page to feed an HTML page, Flash Remoting lets you call the getRecords( )
method directly from the Flash movie. Gone are the page reloads associated with
HTML pages. The communication with the server is seamless and invisible to the
user. This means that the typical web experience is much more user friendly and per-
forms more like a traditional desktop application.
How Does Flash Remoting Work?
The Flash Remoting gateway is installed on the application server and acts as an
interface between the Flash Player and the server. The Flash Remoting software that
implements the gateway is also called an adapter. It has three main tasks:
• Handle requests from the Flash Player to remote services. These services can be
on the same server as the Flash Remoting gateway or can be external to the
server in the form of web services.
• Translate requests and data from the Flash Player into server-side requests and
datatypes.
• Translate responses and data from the server into native ActionScript datatypes.
Figure 1-1 depicts the Flash Player/Flash Remoting architecture.
Communication between the Flash Player and the Flash Remoting gateway is done
via HTTP, which has a few implications:
Communication between the Flash Player and the Flash Remoting gateway is
request-driven. The Flash Player must initiate all communication with the Flash
Remoting gateway. The server cannot push data to Flash unless it is requested
by the Flash Player. Use the ActionScript XMLSocket object, as discussed in
Kommentare zu diesen Handbüchern