views:

2241

answers:

3

So I am working on a project that uses a ASP.NET server and we have entities being passed over WCF from LINQ-to-Entity queries. I have already overcome the cyclic reference issue with WCF. Now that I am looking toward the next step, the Flex UI, I am wondering what things people have already faced either with dealing with WCF from Flex or using Entities with Flex (Entities from the entity framework)? And Flex suggestions, libraries, patterns and tips would help. Thanks.

Things that would help:

  • How to "persist" or dupe entities on the UI side.
  • Security, how to secure communication from the UI to the service.
  • How to generate/pass new entities from the UI to the service and have then interprete as .NET entities
A: 

You have several options for communicating between Flex application and your WCF service. Flex supports both SOAP web services and REST-like web services so you can choose which approach fits you best. When you receive data on the client, you will need to extract the entities from the response and build the UI accordingly. Similar with updating or creating new entities - you will need to construct a web service request from your user interface controls and send it over the wire.

Also look into AMF which is a binary format for communicating between Flex/Flash and a server. There are .NET implementations out there (AMF.NET for instance) so it may be possible to somehow make it work with WCF - you need to explore this area yourself, I have no direct experience here.

Borek
+3  A: 

I would check out Fluorine FX. It is a very mature and stable AMF implementation for .NET and it does provide WCF integration. A colleague of mine has posted some information here:

http://jimdonaghy.com/?p=11

cliff.meyers
A: 

http://jimdonaghy.com?p=11 seems to be broken but here is a link to FluorineFX if you lazy to google.

http://www.fluorinefx.com/

I recommend AMF over REST or SOAP because AMF is a bianry protocol which has great performance gains.

On the other hand if you do plan on opening your services to other types of ui clients then by all means use REST.