Your SlideShare is downloading. ×
0
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Web Api vs MVC
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Web Api vs MVC

249

Published on

This presentation provides overview of new asp.net web api, comparing with MVC, and go through features of web api such as Content Negotiation, Queryable, Html help page, and more.

This presentation provides overview of new asp.net web api, comparing with MVC, and go through features of web api such as Content Negotiation, Queryable, Html help page, and more.

Published in: Software, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
249
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
6
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. WebApi vs MVC
  • 2. About Chaowlert C. Production WebApi experience on - Samsung Gift - AIS Privilege - InSing (SingTel Social)
  • 3. Overview WebApi - Provide REST service - Backend for Mobile Device - Backend for JavaScript MVC - Provide Web Page
  • 4. MVC vs WebApi MVC WebApi Model View HTML Model Content Negotiatio n Result
  • 5. Content Negotiation - Return format from request - Get format from header, querystring, extension, and more - Built-in support for json, xml, bson - You can create your own format ie. csv, atom, protobuf.net
  • 6. Content Negotiation 2 - Accept various input formats from request - Built-in support for url encoded, json, xml, bson
  • 7. Queryable / OData - Query from result set - $top, $skip, $select, $orderby, $inlinecount, $filter, $expand - Query operation is done from database
  • 8. Auto resolve action - Match action without explicitly define - Your url will comply to REST convention GET /api/product/{id} for retrieve POST /api/product for insert PUT /api/product/{id} for update DELETE /api/product/{id} for delete
  • 9. Exception - Exception is data not html - Http Status Code will tell you error category 400: wrong parameter 401: not login 403: no authorize 404: not found ...
  • 10. Html Help Page - Create help pages instantly - Utilize xml comments from your codes
  • 11. Control over Http Pipeline - Alter Http Request and Response - Control over content - Push stream content - Byte range content - or your own
  • 12. More!!! - CORS support (cross domain request) - Support Batch operation - Not need to host on IIS, WebApi is portable
  • 13. Thank you This event sponsored by And we are hiring!

×