Assuming calling the same ColdFusion web service and all other factors are identical, is there a difference in performance/speed between using the following two tags?
<s:RemoteObject id="MyService" destination="ColdFusion" source="MyWSFolder.MyService"/>
and
<s:WebService id="MyService" wsdl="http://www.myDomain.com/MyWSFolder/MyService.cfc?wsdl"/>
Thanks in advance,
Monte
How do you quantify performance?
The WebService tag is used for calling a SOAP WebService. SOAP requests are very wordy, causing a larger amount of data to be passed back and forth than if you were using AMF. IF using WebService, you’ll also have to write parsing code in the Flex client to make the data useful.
The RemoteObject tag is used for making AMF calls over a Flash Remoting gateway. AMF is a binary fomat and has shown to give much smaller file sizes for data transport between the server and Flash. AMF also provides some built in conversion of server side data types (CFCs) to client side data types (AS3 objects).
You should check out James Ward’s census application for some performance comparisons.
If you’re using ColdFusion as your backend, it would be foolish to use WebService instead of RemoteObject for a flex front end. I you need to support SOAP clients with your services, the very same CF code can be used to expose a SOAP Web Service as a RemoteObject interface w/o any code changes on your end.