codecamp iasi 10 march 2012 - gabriel enea - asp.net web api
DESCRIPTION
TRANSCRIPT
![Page 1: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/1.jpg)
ASP.NET Web API in 30 minGabriel ENEAMaxcode@dotnet18 / gabrielenea.blogspot.com
10 march 2012
![Page 2: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/2.jpg)
![Page 3: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/3.jpg)
Agenda Background Web API overview, concepts, elements, architecture
if (codecamp.AvailableTime) { // run some demos me.Run.Demo1(); me.Run.Demo2(); } else { throw new UsualTimeoutException(); }
![Page 4: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/4.jpg)
Server vs. Client side UI processing
WebForms, 2002MVC, 2009
?, 2012
0
10
20
30
40
50
60
70
80
90
100
ClientServer
WebAPI
![Page 5: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/5.jpg)
What is ASP.NET Web API?
A framework that makes it easy to build HTTP services that reach a broad range of clients, including
browsers and mobile devices.
![Page 6: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/6.jpg)
Web API target: any device
![Page 7: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/7.jpg)
One ASP.NET Scott Hanselman (hanselman.com)
![Page 8: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/8.jpg)
Web API is built around…
URI - Uniform Resource Identifier HTTP communication protocol HTTP methods (GET, PUT, POST, and DELETE)
![Page 9: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/9.jpg)
Do you love me ASP.NET MVC ?
![Page 10: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/10.jpg)
No, I love ASP.NET Web API Uses common concepts from ASP.NET MVC
ControllersRoutingModelModel BindingModel ValidationFiltersDependency InjectionSecurity
+HTTP content negotiation
![Page 11: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/11.jpg)
More about ASP.NET Web API Uses common concepts from ASP.NET MVC
ControllersRoutingModelModel BindingModel ValidationFiltersDependency InjectionSecurity
+HTTP content negotiation
![Page 12: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/12.jpg)
Web API - Routing
Based on a routing table, each HTTP message is mapped to an action.
Uses HTTP method name to select an action!
![Page 13: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/13.jpg)
1st demo
Comments management
![Page 14: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/14.jpg)
HTTP Message Handlers
Pipeline for processing HTTP messages on both the client and server.
src: http://blog.highwaterfilters.com/epa-wants-more-analysis-on-keystone-oil-sands-pipeline/
![Page 15: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/15.jpg)
HTTP Message Handlers
Built on some common objects:
HttpRequestMessage
HttpResponseMessage
HttpMessageHandler
![Page 16: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/16.jpg)
HTTP Message Handlers on Client - 1
![Page 17: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/17.jpg)
HTTP Message Handlers on Client - 2
![Page 18: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/18.jpg)
HTTP Message Handlers on Client - 3
![Page 19: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/19.jpg)
HTTP Message Handlers on Server
![Page 20: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/20.jpg)
More features - ASP.NET Web API Async support OData support Self-Host Media Formatters (built-in support for XML, JSON, and form-url encoded data)
![Page 21: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/21.jpg)
2nd demo
Client + Server in memory
![Page 22: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/22.jpg)
ASP.NET Web API in 30 min
No questions!?
![Page 24: CodeCamp Iasi 10 March 2012 - Gabriel Enea - ASP.NET Web API](https://reader034.vdocument.in/reader034/viewer/2022051816/546a836aaf79596c268b5391/html5/thumbnails/24.jpg)
ASP.NET Web API in 30 minGabriel ENEAMaxcode@dotnet18 / gabrielenea.blogspot.com
10 march 2012
src: http://idowindows.wordpress.com/2011/10/15/welcome-and-thank-you/
Pls. fill your eval. form