Search Flex Components Free

Custom Search

December 5, 2007

Communicating between Flex and .NET

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.
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.
Requirements
Adobe Flex Builder
Try Buy
Microsoft Internet Information Services or ASP.NET Development Server
Learn more about Microsoft Internet Information Services
Microsoft .NET Framework 2.0
Learn more
Microsoft Visual Studio 2005 (with Service Pack 1 installed)
Learn more
Fluorine.NET Flash Remoting Gateway
Learn more
Sample files
communicating_flex_dotNet_scourcecode.zip (ZIP, 830K)
Prerequisite knowledge
.NET platform, C#, and basic Flex

Related Flex Tutorials