Flex and .NET - What's a good way to get data into Flex, WebORB? Web Services?

StackOverflow https://stackoverflow.com/questions/45078

  •  09-06-2019
  •  | 
  •  

Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top