ASP.NET Web API allows you create api or http based service or client endpoints. Although it comes with ASP.NET MVC4, it is much flexible framework to develop REST and AJAX API for HTML5, ASP.NET Web forms, client server desktop applications. Unlike WCF Web API does not required much configuration settings and you can host it in your own applications.
WCF or ASP.NET Web API ?
Below points can help you to choose WCF or ASP.NET Web API- If you want to create resource based services and need to take full advantage of HTTP like cache control for browsers, transfer different kind of content types like documents, images, HTML pages ASP.NET Web API should be selected.
- If you have heterogeneous clients for same service and needs to call service using different protocols like netTCPBinding, netNamedPipeBinding, wsHttpBinding WCF is the obvious choice.
- If you have special requirements like CallBackContract, One way communication or queuing then WCF should be selected.
No comments:
Post a Comment