views:

220

answers:

2

I've started with Flex recently, I've noticed that some plugin for Visual Studio exist, instead of buying a licence for another program (Flex Builder).

I was wondering how I could manage to remotely connect to my database with a Flash/Flex application with the help of C#/Asp.Net.

If I've correctly understood what I've read in the last few days, there is basically no way to 'query' to a database with Flex 3. So I suppose there is another way by using a webservice in C# on the database server that would respond to the Http query from Flex.

Am I right or totally of the track? If you have any other thoughts about this, please share.

+1  A: 

I prefer (and recommend) using Webservices for the communication between Flex and C#. It's easy to use, and they both support serialization, so you can easily transfer Strong-Typed Objects. More on Flex and .NET can be found at http://www.adobe.com/devnet/flex/flex_net.html

Alternatively, you could consider using WebORB. This program functions as a gateway between and Flex, and enables you to use the Flash RemoteObject API for the communication to C#. More on this can be found at http://www.adobe.com/devnet/flex/articles/flextodotnet_remoteobject.html.

Pbirkoff
WebServices seems like an obvious choice, since its can also be used with other user interfaces.
Mark Redman
+1  A: 

Your understanding is correct. Flex is intended for developing client-side applications, and communication with a database is done through a server-side application.

Pretty much the same as building a JavaScript application. Though, Flex has several additional options for communicating with the backend. Webservices are great in a lot of cases, but the other options are worth looking into.

Here's a pretty happening article on the topic, if you haven't already seen it.

http://www.dehats.com/drupal/?q=node/33

Ross Henderson