Introduction to AMF protocol for integration of spring and blazeds (1)

Source: Internet
Author: User

Keywords: Spring blazeds integrated AMF Protocol

From: http://www.riameeting.com

In daily RIA development, flex or RIA applications based on pure actionscript3 are very common. In the interaction between the client and the server, many methods are used: plain text content, XML, JSON, and so on. However, with Adobe's open-source AMF protocol, more and more people begin to use AMF-based implementations to interact with servers. Blazeds is an open-source AMF protocol server-side Java implementation released by Adobe. with blazeds, you can develop client applications based on flex and actionscript3 and use AMF (Advanced Message format) to interact with the server. This article is the first in this series of tutorials to introduce the AMF protocol.

The AMF protocol is a message exchange protocol developed by Adobe. Its advantages include:

  1. Smaller data transmission volume
    Because the AMF protocol uses binary encoding, many controllers are saved. For example, to transmit a piece of data in XML, We need to transmit many XML tags. controllers like <item> </item> do not have much practical significance, however, data transmission is greatly increased.
    The AMF protocol saves most of the visible controllers and uses a binary orchestration method with high efficiency. In addition, because the data is also compressed, the same data can greatly save bandwidth. If your server has more than 1 million access traffic each day, the traffic saved will be objective.
  2. Safer Data Transmission
    Data is encoded and transmitted based on binary encoding. Although it cannot meet the needs of data encryption, it can prevent others from directly viewing the data content.
  3. More friendly data interfaces for programmers
    AMF is essentially a support protocol for remote method calls. It can serialize objects on the server or client. when data is transmitted to the target end, deserialize the object to the memory of the target end.
    When you perform XML operations, you will spend a lot of energy processing XML encoding and reading. For example, on the server, you need to extract data from a database or somewhere in the memory, encode the data, and produce an XML document. Sent to the client. on the client side, you need to parse the XML and restore the data to the memory. This process is omitted when the AMF protocol is used. The AMF protocol supports the VO mode in J2EE development.
  4. Data transmission is more robust
    This may not be the function of the AMF protocol, but is due to Flash Player, because when we use the AMF protocol, we generally use the flash client. We tested the transfer of 1 million pieces of data during the development process. If the JavaScript engine of the browser is accepted, regardless of any encoding protocol, the I. e browser almost crashes, and Firefox runs extremely slowly. However, when the AMF protocol is used to transmit the data to the Flash Player, the impact on the client is much smaller. At least the program can respond normally.

Currently, the programming languages that support AMF include

. Net, Java, PHP, Ruby on rail, Python, curl, ColdFusion, etc.

AMF server support

. Net Java PHP Ruby on Rail Python Curl ColdFusion
Blazeds.net Blazeds Amfphp   Pyamf Curl Codefusion
Fluorine Granite Data Services Zend Rubyamf      
Weborb Weborb Weborb
Weborb     Weborb

For. net official implementation of Adobe. Currently, we call it blazeds.net. This product is a message we obtained from the internal sources. It is currently being developed, but I don't know when to release it. It should not be far away.

In the next tutorial, I will introduce some basic concepts in blazeds, which helps you understand and use blazeds correctly.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.