I am reading the following “WebAPI is a great for building HTTP services” so I would like to learn more about this now I am changing to MVC4.
My web application uses jQuery to make calls to methods on my controller that return json results. Does this mean it would be better for me in future to use the WebAPI controllers?
Is there any difference in caching between a call made to a traditional controller and a call made to a WebAPI controller?
My web application uses jQuery to make calls to methods on my controller that return json results. Does this mean it would be better for me in future to use the WebAPI controllers?Not necessarily, you can return JSon out with MVC as well. Web.API provides you many out of the box feautures that you would have to implement it yourself with MVC.
Is there any difference in caching between a call made to a traditional controller and a call made to a WebAPI controller?Caching is a very broad concept. You can use OutputCaching with MVC and you can adopt output caching to web.api as well. Take a look at here.
However, there are various caching techniques besides OutputCaching, such as having your own cache and you manage your cache container etc.
For me, web.api can be used for Single page applications, data layer or service layer.