Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with RETURN FILETOSTR()
Message
 
To
25/03/2002 10:21:36
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
00636089
Message ID:
00636984
Views:
21
>Hi Rick,
>
>Thanks for the input. In a case where a fat client app (VFP) runs SQL statements over the Internet which might return large data sets would you say then that the SQL over HTTP mechanism you provide in Web Connect & wwIPStuff is a better way to go than web services?

In general I think it's a bad idea to pull large amounts of data over the wire ever. THe only exceptions to this should be things like reports that need all the data and even those could probably be run on the server and then just ship the result back.

Web Service/wwHTTPSQL etc. - it doesn't really make a big difference because the data is shipped over the wire as XML either way.

FWIW, I did performance testig on this stuff quite a bit and it turns out that data size and performance of XML was FASTER in most common scenarios than trying to use the EncodeDBF mechanism.

Binary DBF files usually bloat more than the same XML data would due to the whitespace.

If you own Web Connection you can run the distributed app sample application and try this out and check the timing values yourself as you can easily switch between transport modes (VFP XML, wwXML, Encode/DecodeDBF).

The sample is also online, but you can only access the sample data that's there which is small.

http://www.west-wind.com/wconnect/wwhttpdemo.app (requires VFP 7.0)

+++ Rick ---








>
>Thierry
>
>
>
>>You cannot do this by default because VFP lacks the datatypes to return a binary stream in SafeArray format and properly type it that way. VFP lacks an array COM return type.
>>
>>I haven't tried this but this should work: You can return the result using CREATEBINARY() (which creates a byte array). Set the return type to string, then change the WSDL and WSML file to return Bin.Hex data which will properly encode the binary string into Base64 (which BTW bloats too).
>>
>>I would be very careful about this approach however because not all clients will be able to use this data automatically.
>>
>>XML is a much better choice and if you're passing too much data back and forth that it's too slow you might want to reconsider how you are serving the data. If a Web Service sends back data that takes more than a second to convert into XML it's probably sending way too much data back for a distributed application.
>>
>>+++ Rick ---
>>
+++ Rick ---

West Wind Technologies
Maui, Hawaii

west-wind.com/
West Wind Message Board
Rick's Web Log
Markdown Monster
---
Making waves on the Web

Where do you want to surf today?
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform