سؤال

Assuming I am limited to .NET Framework 3.5 C# on the server side and GWT on the client side, what is your suggestion for the best/most efficiant way of communication + data transport protocol and why? e.g. JSON-RPC, XML-RPC, SOAP-WCF etc etc.

هل كانت مفيدة؟

المحلول

JSON-REST because JSON is native to javascript and is as such naturally supported on GWT. REST because .NET does not know GWT-RPC or RequestBuilder and REST is the next easiest way of accessing remote services in GWT.

On GWT side you can use gwt-rest-client.

نصائح أخرى

I think you answered your own question in your comment:

for example if you choose JSON as compared to XML you may be considerably saving on the amount of data transfered per round trip. Similarly there may be reasons where if you use WCF-specific binary protocol with JSON or SOAP as compared to JSON-RPC or XML-RPC, that one would work out to be more efficiant than the other.

There's no way to determine what is most efficient for your use case without knowing intricate details about your application. My assumption would be to use JSON-RPC, but again, there's no way to be sure without benchmarking.

(That being said, I'd avoid XML-RPC, if only for the considerable data transfer savings.)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top