views:

75

answers:

3

How can I use a .NET service object in an Adobe Flex application? Is it even possible? Do I have to use some third-party tool?

A: 

You wouldn't use a .NET service object per se, rather, you would expose the service through an endpoint that the Flex application can access, something like a RESTful service, or a WS endpoint somewhere.

Then, using whatever tools Flex provides, you would create a proxy to the service you expose, and make the calls that way.

This all works because both sides adhere to the standards or best practices put forth in the protocols you are using (RESTful services, WS, which in turn are based on things like HTTP, JSON, etc, etc).

casperOne
casperOne - thanks for the knowledge. Do you know of any code examples on the web?
linux fanatic
@linux fanatic: It all depends on what you are using on the wire. Are you using JSON for serialization along with a RESTful structure, or are you using WS with SOAP? Or something else? It all depends on the channel and encoding on that channel.
casperOne
+2  A: 

The best way to integrate Flex and .NET is through Flash Remoting. This sends binary encoded data between Flash and .NET and is both very efficient to encode/decode and is more compact on the wire (compared to JSON and XML). There are several options for Flash Remoting with .NET. We use Fluorine (free, open-source) but WebORB (commercial) is also available.

Development is very simple. Flash Remoting exposes your selected classes to Flex for calls via RemoteObject. You don't need to write translation code or anything like that and you can use fully typed objects on both the client and server.

Fluorine http://www.fluorinefx.com/

WebORB http://www.themidnightcoders.com/products/weborb-for-net/overview.html

Sam
A: 

Another choice is AMF.NET , Tell me if you need any demo source code, I think i've posted one in my blog, if you look for flash remoting with asp.net there

lakhlaniprashant.blogspot.com