Convert flex Data Interaction Mode

Source: Internet
Author: User

Flex data interaction method-httpservice, WebService, remoteobject, socket.

Preface:

Using soap web service to interact with Flex has many advantages, but it is very slow. It is better to use customized XML, but it is not standardized.

So what is the best interaction method between ASP. NET and flex?

1. httpservice is actually called XML via httpservice, that is, data transmission using get and post methods, which is roughly the same as submitting a common web form. the advantage is that it is simple and versatile. whether you use ASP, JSP, or XXP, any program that can generate standard XML can interact with your flex program. processing a large amount of data is slow. The following is a simple example:

Login http://www.helloria.com/showtopic.aspx? Topicid = 37 & forumpage = 1 & page = 1 #53

2. generally, WebService is called soap, and data is returned using datatable. There is no built-in paging function. dataset is not directly returned. large Data interactions are slow. however, it is a common interface that is supported by most server communications, but it is complicated to implement on the server side.

3. remoting is based on AMF for data interaction, with the best speed and performance. dataset, datatable, and or mapping tools are supported. fast, reliable and secure, requires a flex remoting gateway for data de/seralization.

Advantages:

1). Rich data transmission types.

2). Two Data encapsulation types, amf0 and amf3, can be supported only when amf3 is Flash Player 9 or later. With amf3, binary file stream data can be directly transmitted.

3). Relatively high transmission efficiency.

4). good support for various background services.

FDS (LCDs) is Adobe's flash remoting server with powerful functions (of course, it also supports the amf0, amf3 format, and both Java and net platforms). Its quality is also good, unfortunately, this is silver.

Blazeds-is another open-source flashremoting project of Adobe. It is based on the Java platform and supports the amf0 and amf3 formats.

Amfphp-a PHP-based RPC tool that supports two formats, amf0 and amf3, in flashremoting, for open-source projects.

Openamf-a Java-based open-source flashremoting project. Currently, only the amf0 format is supported.

GDS (granite Data Services)-is also a Java-based flashremoting project that supports amf3.

Weborb-A flashremoting project that supports. net, Java, PHP, Ruby, and other development platforms. It also supports amf0 and amf3.

Fluorinefx-A flashremoting open-source project that supports. NET development platforms, including amf0, amf3, rtmp, and rtmpt.

Disadvantages:

1). The flash remoting module must be installed on the background server.

2). It is troublesome to configure a VM.

4. socket: socket-based communication. This is also the most different communication method in flash and traditional web development. socket can establish persistent connections, so it can be used for online games, applications such as multiplayer chats and videos.

What is AMF? Amf0 and amf3 know three data interaction methods for flex Ria Interaction: httpservice, WebService, and remoting.

We all agree that remoting is the most efficient method!

Why is remoting more efficient? This involves the Data encapsulation format.

AMF is the data Encapsulation Format exclusively developed by Adobe. AMF (Action Message format) binary format. remoting transmits this compressed data format, and the transmitted data also includes bytearray and other forms (including amf3 Specification ).

Flash can be directly accessed, and because it is based on binary data transmission, compared with XML soap, JSON, WebService and other string-based data formats, it has the characteristics of small data volume and high efficiency.

AMF currently has two formats: amf0 and amf3. With the advent of actionscript3, AMF can directly upgrade from amf0 to amf3.flash8 and only support amf0 and flash9. Amf3 is more efficient than amf0.

Convert flex Data Interaction Mode

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.