Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Overview of ASP.NET Web API Framework
Search
Alexander Beletsky
September 29, 2012
1
480
Overview of ASP.NET Web API Framework
Alexander Beletsky
September 29, 2012
Tweet
Share
More Decks by Alexander Beletsky
See All by Alexander Beletsky
Snapshot Testing: Going beyond UI
alexbeletsky
1
600
Tech Culture in Startups
alexbeletsky
0
180
TDD in JavaScript
alexbeletsky
4
830
This is Node.js
alexbeletsky
10
400
Likeastore
alexbeletsky
3
120
PaaS in your pocker with Dokku
alexbeletsky
7
2.4k
Building Single Page Applications
alexbeletsky
9
5.3k
.NET developer in JavaScript world
alexbeletsky
1
2.7k
How to write good tests?
alexbeletsky
2
280
Featured
See All Featured
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Writing Fast Ruby
sferik
628
61k
Code Reviewing Like a Champion
maltzj
521
39k
Building Better People: How to give real-time feedback that sticks.
wjessup
366
19k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Rebuilding a faster, lazier Slack
samanthasiow
79
8.8k
Transcript
@alexbeletsky http://beletsky.net Overview of ASP .NET Web API Framework
@alexbeletsky http://beletsky.net @alexbeletsky http://beletsky.net http://xpinjection.com
@alexbeletsky http://beletsky.net What's new in ASP.NET 4.5? One ASP.NET Framework
ASP.NET MVC 4 Release ASP.NET WebForms Improvements ASP.NET Web Pages 2 (Web Matrix) SignalR ASP.NET Web API (ex. WCF Web API) Open Source
@alexbeletsky http://beletsky.net What's new in ASP.NET 4.5? One ASP.NET Framework
ASP.NET MVC 4 Release ASP.NET WebForms Improvements ASP.NET Web Pages 2 (Web Matrix) SignalR ASP.NET Web API (ex. WCF Web API) Open Source
@alexbeletsky http://beletsky.net Early days of API oriented apps /GetOrders /GetOrders
/UpdateOrder /GetAllDueOrders /DeleteOrder.asmx?id=1 /UpdateOrder.asms?id=1&title=”New”...
@alexbeletsky http://beletsky.net RPC Remote Procedure Call The architecture style, where
client sends a request to remote server and execute specified procedure with optional parameters.
@alexbeletsky http://beletsky.net SOAP, WSDL, UDDI WS-* Finally considered to be...
@alexbeletsky http://beletsky.net … evil
@alexbeletsky http://beletsky.net RESTful based API GET /orders GET /orders/1 POST
/orders PUT /orders/1?title=”New” DELETE /orders/1
@alexbeletsky http://beletsky.net REST Representational State Transfer The architecture style, where
communication between client and server relys on HTTP standard and uses lightweight mechanisms for transporting data
@alexbeletsky http://beletsky.net REST, JSON, VERBS Finally considered to be...
@alexbeletsky http://beletsky.net
@alexbeletsky http://beletsky.net What is ASP.NET Web API? Framework for build
REST style API services, providing best practices and features of REST services inside the box.
@alexbeletsky http://beletsky.net But I got used to build REST API
with ASP.NET MVC?
@alexbeletsky http://beletsky.net ASP.NET MVC vs. ASP.NET WEB API ASP.NET MVC
is positioned as page-oriented development framework. ASP.NET Web API is positioned as api-oriented development framework.
@alexbeletsky http://beletsky.net ASP.NET WEB API One service – many clients
@alexbeletsky http://beletsky.net ASP.NET Web API main features - Code Scaffolding
- Content Negotiation - MediaTypeFormatters - Hypermedia - IQueryable & Odata support - Self-Documenting API - Hosting Options
@alexbeletsky http://beletsky.net Quick Example: ASP.NET Mobile App
@alexbeletsky http://beletsky.net Code Scaffolding - Scaffolds for Code-First Entity Framework
- Easy to use - Great for quick start and prototyping - CRUD from the box
@alexbeletsky http://beletsky.net Content Negotiation - Find best match between client-server
- Uses HTTP header information - “Invisible” for developer - JSON, XML from the box
@alexbeletsky http://beletsky.net Media Type Formatters - For support any custom
API format - Based on async operations - BufferedMediaTypeFormatter wraps the asynchronous read/write methods inside sychronous methods.
@alexbeletsky http://beletsky.net Hypermedia Support - Flexibility of formats - HttpResponseMessage
class - Embrace correct HTTP status codes
@alexbeletsky http://beletsky.net IQueryable & OData support - Paging and sorting
from the box - OData functions: $top, $order, $skip, $filter
@alexbeletsky http://beletsky.net Self Documenting API - IApiExplorer interface for getting
info - ApiDescription encapsulates information about particual API class - Used to generate documentation pages
@alexbeletsky http://beletsky.net Hosting Options - ASP.NET hosting by default -
Self Hosting (HTTP server in .exe) - OWIN, Kayak - Azure Roles
@alexbeletsky http://beletsky.net I need more!
@alexbeletsky http://beletsky.net Resources http://asp.net/web-api http://channel9.msdn.com/search?term=web+api http://blogs.msdn.com/b/henrikn/ http://webapibloggers.com/
@alexbeletsky http://beletsky.net Follow those guys @glennblock, @filip_woj, @tourismgeek, @frystyk, @radenkozec,
@benfosterdev
@alexbeletsky http://beletsky.net Thanks, @alexbeletsky