views:

626

answers:

6

So I have ASP.NET running on the server in IIS7. I think I'm going to use MVC for some static pages and basic dynamic forms - but the majority of the client side is written in Flash/ActionScript.

What's the simplest, most succint, most DRY way of building/generating proxies between client and server?

Which format should I use?

  • JSON
  • SOAP
  • Binary

And which comms protocol should I use?

  • WCF
  • HTTP via MVC Controller actions

I'm probably missing some format or protocol, but basically it should be relatively efficient, not require alot of plumbing code and preferably auto-generates client-side proxies.

+4  A: 

WSDL web services are very easy to consume in Flash and simple to create in .NET.

I'd also suggest you at least look into AMF, which is Adobe's proprietary binary format for exchanging data between client and server. There are a couple of implementations for .NET, including amf.net and weborb.

I've never used it, but I've heard really great things about weborb: http://www.themidnightcoders.com/products/weborb-for-net/overview.html

Matt Guest
+1  A: 

We use Weborb at my work. I highly recommend it. There are some gotchas with the way Weborb handles serialization on both ends. Just make sure in your .NET classes you don't have member names the same as class names.

EDIT: The free developer edition of Weborb should meet most people's needs. Weborb has the distinct advantage of speed, because it uses the binary AMF format to talk over the wire instead of JSON or SOAP.

davogones
Weborb seems expensive and ropes you into a framework u always have to pay for? Is it really worth it? JSON (as Scott suggested) seems a simple solution at least that does the job. How is Weborb better?
CVertex
We use the free edition of Weborb and it works fine for our purposes. The advantage of Weborb is that it uses binary AMF encoding, which is a SUPER fast way to talk over the wire.
davogones
+2  A: 

i've consumed JSON in swfs .. pretty simple using a3corelib stuff

Scott Evernden
is there eval() in actionscript3? Or something similar?
CVertex
+1  A: 

I second WebORB. It uses the AMF protocol which is that fastest way to get data in and out. You can easily expose your .NET services and have typed objects going in and out. You can use RMI and Messaging. It's a free product and does a great job...

Christophe Herreman
+2  A: 

I have had a good experience with FluorineFX.net - It appears to be very similar to WebORB but its free and open source. I don't think Flash/ActionScript supports WCF..

You should note that (in the research I've done) there is no way to send a packed from the server to the client - the client must make all requests.

vanja.
A: 

WCF supports Flash..! Done with "AJAX-enabled WCF Service" and WebInvoke(Method = "POST")

Thanks. Any links or resources to help me out with this?
CVertex