C'è un vantaggio nell'usare WCF o Web API per dispositivi mobili?

8

Sto guardando il mio primo sviluppo mobile utilizzando Mono Touch e Mono per Android. Mi piacerebbe che comunicassero con un sito ASP.NET MVC 4 che sto progettando. Ho lavorato con WCF e WebAPI in passato, ma mi chiedo se ci sono dei vantaggi quantificabili nell'usare l'uno sull'altro in questo contesto?

    
posta allen.mn 17.01.2013 - 22:44
fonte

1 risposta

3

Ecco un grande articolo su quel particolare argomento ; spero che questo ti aiuti.

Is there still use for WCF? when should I choose Web APIs over WCF?

Recall my points from before - HTTP is a lot more than a transport protocol; use SOAP across the board and consider HTTP as no more than another way to pass messages.

If your intention is to create services that support special scenarios – one way messaging, message queues, duplex communication etc, then you’re better of picking WCF

If you want to create services that can use fast transport channels when available, such as TCP, Named Pipes, or maybe even UDP (in WCF 4.5), and you also want to support HTTP when all other transports are unavailable, then you’re better off with WCF and using both SOAP-based bindings and the WebHttp binding.

If you want to create resource-oriented services over HTTP that can use the full features of HTTP – define cache control for browsers, versioning and concurrency using ETags, pass various content types such as images, documents, HTML pages etc., use URI templates to include Task URIs in your responses, then the new Web APIs are the best choice for you. If you want to create a multi-target service that can be used as both resource-oriented service over HTTP and as RPC-style SOAP service over TCP

    
risposta data 18.01.2013 - 22:56
fonte

Leggi altre domande sui tag