Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 07, 2012 07:07 AM by teguhyuliantos
May 02, 2012 01:42 PM|LINK
I have been hearing word "Web api " in mvc architecture , what is this?
why should i use this? when to use Web api?
May 02, 2012 01:44 PM|LINK
ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.
Taken from http://www.asp.net/web-api.
Basically it's shipping with MVC4 apparently but it's not by any means meant to be used solely by MVC4. You can also call the endpoints from jQuery for example.
When to use it... if you want to expose data/information to either you own application or to the outside worldd so that other parties can interact with the data/information you expose to them.
May 02, 2012 01:59 PM|LINK
You mean to expose our classes to outer world? if so we can use web service why web api? i am new to this topic .....
May 02, 2012 02:02 PM|LINK
if so we can use web service why web api
Web API is a "restfull alternative" for WCF/web services. It took the good things of WCF and the MVC, mashed together and is, for as far as I noticed so far, easier to program with. Rather based on conventions than overly complicated configuration.
Simply take a look at it and give it a try. You'll like it for sure.
May 02, 2012 02:09 PM|LINK
Thank you very much..
May 07, 2012 07:07 AM|LINK
If you learn more about WEB API, a lot of tutorial and basic learning that explain about it, one of which is here