I need to expose some logic locally as a service…
The objects sent/received to/from the logic are quite large, the information is sensitive and the logic will never need to be exposed externally it is for use on the local server only.
Some MVC developers are argueing that it should be exposed using a WEB Api service – is it worthwhile implementing this?
Their argument is that with Web API it is much more integrated into MVC and makes displaying result much easier (I know nothing about this side of things), my fear is that we will have to implement complicated authorisation and sacrifice performance.
Is there no better lightweight service layer that fits this scenario? WCF named pipes seems logical to me, or just reference it as a class library – yes the config files are a pain but not the end of the world. Basically we just want to serve up some logic locally.
Web API is Microsoft’ best High-Level HTTP implementation so far. As such it embraces HTTP like none before and allows many flexibilities not possible under normal MVC.
Features such as Content-Negotiation are truly important for any service whether internal or external.
Yet, I would also see that WCF provides better cohesion since it is a pure RPC framework. But it is definitely not light-weight. I have a blog here which discusses this issue and does some comparison (Shameless Plug!).
If all you care is to call methods in a private environment, WCF is fine. But remember that named-pipe/TCP might not work in some firewall conditions.
Another thing you lose with Web API is the contract. There is no WSDL in the Web API land – which can be good or bad depending how you look at it. If your company is very stringent with service contracts, WCF is a better option.