Flex 2 and .NET
Flex 2 is built to support any back-end web server as a source for data, and .NET is no exception. Chafic Kazoun was one of the presenters at Adobe Max 2006, though I did not attend his session. The topic was (of course) how to integrate Flex 2 RIA’s with .NET data services.If you want to find more information about using .NET as a back-end for Flex 2 (or Flash in general), Chafic has provided source code and the slides from his Max presentation on his site.
Here is a short summary of the standard Flex methods and how it works with .NET:
- HTTPService / XML - You build an ASPX page that retrieves data from a database (or other source) and generates an XML response. Very simple using the MSXML library. Flex deserializes the XML into ActionScript variables and then it can be used for data binding.
- WebService - You build an ASMX page for your web service, which will be consumable by more than just the Flex 2 app. Again, Flex deserializes the response (XML) into ActionScript values and it can then be used for data binding. This format tends to have larger data sizes than plain XML but can be useful if you already have an existing web service you want to reuse.
- AMF3 - Using one of two 3rd party libraries, .NET can generate Adobe’s proprietary format for sending Flash variables to and from the client. This approach supports automatically converting between various Flex and .NET data types, and uses much less bandwidth and client-side processing power to communicate. (ie: much faster)
WebORB - free and a commercial version (mature - same tool for PHP support)
Flourine - free (not as mature) - Binary Sockets - Used for real-time communication, you can set up a Socket class in Flex, and an corresponding Socket class in .NET. Requires way more definition and your own custom data format.
Again, this was just a short summary - flip through the PDF of the presentation slides, and also check out the AMF resources. Everything I’ve read indicates AMF transmission of data is the way to go no matter the back-end. I’ve now seen AMF working with ColdFusion (7.0.2+), Java (with FDS), PHP, and now .NET.
Tags:
Post a Comment