If there is a requirement to develop a web service and it is not related to transaction, SOAP based, TCP, NamedPipe, MSMQ protocol and two-way communication (duplex) then Web API is best.
It doesn't have complex and tedious configuration in WCF REST service. It is only based on HTTP and easy to define, expose and consume in a REST-ful way. It is light weight architecture and good for latest devices which have limited bandwidth like smart phones, tablets etc. It is open source.
It has automatic support for OData. Hence by placing the new [Queryable] attribute on a controller method that returns IQueryable, clients can use the method for OData query composition. It can be hosted within the application or on IIS.
It also supports the MVC features such as routing, controllers, action results, filter, model binders, IOC container or dependency injection that makes it more simple and robust.
0 Comments