With the advent of the Flex development framework, developers can finally create the rich web-based, platform-independent applications they've always wanted. Such applications typically require data integration, which is necessary for any use case that requires keeping track of users, conducting authentication, or saving a user's data. You can use local data storage, but without the persistence and centralization brought by client-server communication, the application couldn't store large amounts of data, provide data to users regardless of where they log on, or expose the user to a community.
伴着Flex开发柜架的降临,终于开发人员可以创建他们总想要的基于网络的,独立于平台的富客户端程序。
It is unsurprising, then, that the Flex framework actually comes equipped with multiple methods of client-server communication. If you've been looking for a way for your Flex clients to communicate with your .NET back end or for a comparison of the various communication methods, then this is the article for you. This article covers three methods of request/response communication. HTTP services provide a way to retrieve XML and text from static and dynamic server pages. Web services let clients call web methods that return objects. Remoting allows you to call functions on the server, and sending and receiving typed objects both ways. Through the course of this article, you will learn how and when to use each, as well as see a practical comparison of the three.
Flash Player also natively supports other communication mechanisms including raw HTTP requests and socket connections; however, they are outside the scope of this article. This article strictly covers the most common request/response-style communication used in enterprise applications. Other methods may be helpful in specific situations, but also have a variety of drawbacks including different performance and scalability characteristics.