MACROMEDIA FLASH REMOTING MX-USING FLASH REMOTING FOR FLASH MX 2004 ACTIONSCRIPT 2.0 Specifications Page 9

  • Download
  • Add to my manuals
  • Print
  • Page
    / 40
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 8
This is the Title of the Book, eMatter Edition
Copyright © 2003 O’Reilly & Associates, Inc. All rights reserved.
How Does Flash Remoting Work?
|
7
Action Message Format
Flash 5 movies could send XML or name/value pairs across HTTP. Although these
packets could be parsed automatically by Flash or manually by the developer using
custom ActionScript, parsing could be slow because all XML data is sent as text
strings encased by cumbersome tags. Flash Remoting is able to handle complex
datatypes, such as objects, structures, arrays, and recordsets. A proprietary format
was needed to transfer information back and forth between the Flash movie and the
application server.
The protocol used for communication between the Flash Remoting gateway and the
Flash Player is Action Message Format (AMF). AMF is a binary protocol designed by
Macromedia to provide a lightweight, efficient means to serialize, deserialize, and
transport data between the Flash Player and the Flash Remoting gateway, as shown
in Figure 1-3.
It is not necessary to understand AMF in detail to develop robust Flash applications
that utilize Flash Remoting; however, it is useful to have a basic understanding of the
protocol. Macromedia has not documented the protocol publicly, but the HTTP
packets can be examined to gain insight into the format, which seems to be closely
based on the format used in remote shared objects (RSOs). The developers of the
AMFPHP project have partially documented the format at:
http://amfphp.org/?g=amf_format
The Flash Player communicates with the Flash Remoting gateway via the AMF pro-
tocol sent via standard HTTP requests. An AMF packet is sent as a binary
POST with
the body of the request containing the binary data serialization and remote proce-
dure call information.
Figure 1-3. Flash Player/AMF/Flash Remoting
Flash Player
Flash Remoting
Application
server
HTTP response
HTTP post
AMF
AMF
Page view 8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 ... 39 40

Comments to this Manuals

No comments