Last post Feb 17, 2010 11:18 PM by atconway
Feb 16, 2010 01:38 PM|DogSpots|LINK
I'm working on the backend of a website that will have a flash game on one of the pages. The game needs to communicate with the database several layers down.
I am working on the ASP and business objects layers. There is another programmer working on the Flash. When I started working with the Flash developer, I asked him if he preferred to communicate over web services or Flash remoting. My thought was that
if he preferred web services, I would use an asmx web service and if he preferred Flash remoting I would use WCF with a AMF protocol.
His response was as follows:
"Our standard practice is to do an actionscript datarequest “GET” to an .asp or .aspx page and post a serious of variables, leading off with a SHA 256 hash tag for security. The page then returns a string to us through the datarequest
object that we separate into whatever variables we need through a successful load function. "
This seemed a little unorthodox. Is this as weird as it sounds to me or is this a common practice. Regardless of how common it is, are there any problems I should be aware of if we go this way? Should I just keep pushing for web services or WCF?
Thanks for any help.
Feb 16, 2010 03:52 PM|joewashington|LINK
I agree with you, this sounds very bizarre. I would use web services as well, as it seems he isjust receiving information, there is no need to call get a page, when you can make a get request to the web service and return only the required data.
This would be alot less intensive as you are retrieving only the required informaition.
Push for webservices!!!
Feb 17, 2010 04:12 PM|gunteman|LINK
Well, except for the confusing statements about "GET" and "post", it's really not that unorthodox. Simple "page requests" was for a long time the main way for Flash to communicate with backend servers. Actually I think it's still the most commonly used way.
AMF and SOAP have gained popularity lately, but also REST, which kind of shares the conceptual simplicity with the page requests.
Feb 17, 2010 11:18 PM|atconway|LINK
I think one of the big differences to point out here is the robustness of functionality offered with services of any type compared to a HTTP "GET" method. If all you are getting is just a series of simple variables than the "GET" will work just fine. However
there is no comparison in my mind to the entire security model, communication options, running managed .NET code, etc. associated with a WCF or .asmx web service. Leading off with a hash tag is a convenient way of creating a security model for the HTTP GET,
but it is nothing in comparison to the security options available to a WCF service.
I think that the requirements of the project may help dictate better which model to use. If it was me and I was in control of both side of the application, there is no question I would use a service. However, if you are dealing with a 3rd party and that
is the method requested and there is not much room for modification, then it is a moot point.