WCF with Flash tutorial

I'm new to WCF, which I chose instead of Web services, because all the articles and blogs I read indicate that ASMX is old news.

I read a little about the differences between old web services and WCF, and I got a general idea. I also took the MSDN WCF tutorial , which seemed simple enough.

My problem is that I want to create WCF services that Flash can use. I read that this can be done everywhere, but without the obvious AZ tutorial on how to act on the server side and client side ... Just some suggestions.

Can someone point me in the right direction, with a brief explanation of the options available in front of me?

+4
source share
1 answer

We do this in our games, where we have many WCF services that provide different functions for Flash clients running on Facebook / MySpace, etc.

I suggest you first look at this Codeplex project:

http://wcfflashremoting.codeplex.com/

This allows you to implement an AMF endpoint to communicate with Flash clients.

All of your DataContract needs to be exactly mapped, including property names on both sides, so if you have a MyProject.Contracts.Requests.HandShakeRequest object in your WCF project, the Flash client must have a replica defined in the SAME namespace.

Another that helps us a lot is the request / response template, because it allows you to easily add / remove parameter / output values ​​and have sufficient backward compatibility - add a new parameter to the Request object on the server for a new one and the client does not have to immediately send a new parameter.

For debugging you absolutely need Charles ( http://www.charlesproxy.com ), the latest version should have the AMF viewer function correctly (I think you used to download the add-in) so that you can see AMF messages returning from the server in a nice, readable format.

Hope this helps! There are some other caveats related to working with the Flash client from WCF, but I can’t remember them from my head: -P, so play with this remote extension and I will put some other bits and beans down when I can remember them!

+6
source

Source: https://habr.com/ru/post/1316504/


All Articles