![Page 1: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/1.jpg)
One Service, Any Device, Any Platform - Web APIShravan Kumar KasagoniMicrosoft MVP ASP.NET | Thomson Reutershttp://theshravan.net@techieshravan
![Page 2: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/2.jpg)
Building Http Services Using Web API
Agenda
![Page 3: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/3.jpg)
One ASP.NET
![Page 4: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/4.jpg)
ASP.N
ET
Site
sServ
ices
Web API
SignalR
MVC
Web Pages
Web Forms
Single Pages
![Page 5: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/5.jpg)
What is Web API?
![Page 6: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/6.jpg)
Web API a new framework for creating HTTP services that can reach a broad range of clients including browsers and mobile devices.
![Page 7: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/7.jpg)
Modern HTTP programming model- Directly access and manipulate HTTP requests and responses in your Web APIs using a clean, strongly typed HTTP object model.
![Page 8: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/8.jpg)
Shipped with ASP.NET MVC 4 Beta
Not linked MVC – you can use alone (Web Forms, WPF, etc..)
Ideal platform for Building RESTful Applications
![Page 9: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/9.jpg)
Why Web APIs?
![Page 10: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/10.jpg)
Protocols for Building Services
![Page 11: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/11.jpg)
First apear as WCF Web API
HTTP related
WCF -wider that HTTP (TCP, Named Pipe, WinService, etc)
WCF to ASP.NET Web API
![Page 12: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/12.jpg)
Build Richer AppsReach More Clients
![Page 13: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/13.jpg)
Web API Growth
Source: www.programmableweb.com – current APIs: 4535
+ 100% + 50%+ 3400%+ 235%+ 71% + 86% + 46%+ 63%
![Page 14: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/14.jpg)
GET /en/html/dummy.php?name=MyName&married=not+single &male=yes HTTP/1.1Host: www.explainth.atUser-Agent: Mozilla/5.0 (Windows;en-GB; rv:1.8.0.11) Gecko/20070312 Firefox/1.5.0.11Accept: text/xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5Accept-Language: en-gb,en;q=0.5Accept-Encoding: gzip,deflateAccept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7Keep-Alive: 300Connection: keep-aliveReferer: http://www.explainth.at/en/misc/httpreq.shtml
Embrace HTTP
![Page 15: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/15.jpg)
Flexible Hosting
Content negotiation
Query composition
Model binding and validation
Routing
FiltersImproved testability
IoC Support
![Page 16: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/16.jpg)
Demo:Building a Web API
![Page 17: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/17.jpg)
Demo: Calling A Web API from JavaScript
![Page 18: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/18.jpg)
Demo: OData – Querying Support
![Page 19: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/19.jpg)
Demo: Self-Hosting Web API
![Page 20: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/20.jpg)
Referenceshttp://asp.net/web-api http://theshravan.net
![Page 21: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/21.jpg)
Reach MeMy Blog : http://theshravan.netTwitter : techieshravan
![Page 22: One Service, Any device, Any Platform - Web API](https://reader035.vdocument.in/reader035/viewer/2022062405/5561e6acd8b42aa5068b4f36/html5/thumbnails/22.jpg)
Thank You