tags:

views:

1000

answers:

4

Ok, I asked a question earlier about Flex and ADO.NET Data Services but didn't get much response so I thought I'd rephrase. Does anyone have any experience building Adobe Flex applications with a .NET back-end? If so, what architecture did you use and what third-party tools if any did you employ. I've read a little about doing Flex remoting with WebORB but it seems more complicated than it should be, are web services an adequate alternative?

A: 

This is not a good question for StackOverflow, since there's no right answer. I'm sure many people have used all sorts of combinations of tools to do what you're looking to do, and no single one is the correct one, so you could discuss different approaches to death.

Check out the FAQ, specially the first two ones.

Jordi Bunster
it can be answered. the FAQ says questions must be answerable not 'correctly answerable'. i dont think it is particularly subjective, argumentative, nor requires extended discussion
Simon_Weaver
+1  A: 

I've mainly used plain ASP.NET pages that return XML for situations that are mainly one-way (data from ASP.NET --> Flex/Flash) communication. The Flex side just uses a URLLoader to hit the ASP.NET page and loads the result as XML.

If the communication needs to be a little more two-sided (sending more than a couple parameters to ASP.NET lets say), I have used standard ASP.NET webservices.

I've never used WebOrb or Flex remoting because I've never really needed that type of interaction between the server and the SWF.

Hope that helps.

81bronco
+2  A: 

I believe web services is actually more complicated and more restrictive. You cannot create stateful web services, data exchange is fairly slow due to verboseness of XML. Developing with WebORB is not that hard. It basically boils down to developing an assembly and deploying it into the /bin folder of a weborb-enabled ASP.NET application. Once you do that you can invoke your .NET classes using Flex's RemoteObject API. For instance:

var ro:RemoteObject = new RemoteObject( "GenericDestination" ); ro.source = "com.bar.FooService" ro.foo.addEventListener( ResultEvent.RESULT, gotFooResult ); ro.foo();

public function gotFooResult( evt:ResultEvent ):void { // evt.result contains the return value; }

It is important to compile your Flex builder project with the -service compiler argument. You can add in the Flex Builder's "Flex compiler" project properties:

-services c:/Inetpub/wwwroot/weborb30/web-inf/flex/services-config.xml

If you point to that path, then make sure to deploy your DLL into c:/Inetpub/wwwroot/weborb30/bin

Good info on WebOrb. I'l have to try it out next time.
81bronco
webservices have an advantage in that they are a standard and likely you already have tools to test, capture or send requests
Simon_Weaver
A: 

For French, you can find an interresting article on people in action blog about flex and dotnet communication. It compare WebOrb and Fluorine.

http://blog.piaction.com/2010/01/flex-net-part-13-fluorinefx/

fred