• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
REST and ASP.NET Web API (Milan)
 

REST and ASP.NET Web API (Milan)

on

  • 4,132 views

 

Statistics

Views

Total Views
4,132
Views on SlideShare
2,765
Embed Views
1,367

Actions

Likes
2
Downloads
35
Comments
0

12 Embeds 1,367

http://michele.berto.li 690
http://www.jefclaes.be 576
http://www.igloolab.com 82
http://feeds.feedburner.com 5
http://mobile.igloolab.com 4
http://1165127106246535168_7af8341a2f5f4b26990212953a60909287ade2c8.blogspot.com 3
http://www.365dailyjournal.com 2
http://prlog.ru 1
http://translate.googleusercontent.com 1
http://apps.synaptive.net 1
http://www.linkedin.com 1
https://www.linkedin.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    REST and ASP.NET Web API (Milan) REST and ASP.NET Web API (Milan) Presentation Transcript

    • REST & ASP.NET Web API @JefClaes
    • Thanks to the sponsors
    • about/jefclaes@jefclaeshttp://jefclaes.be
    • REST
    • The acronymREpresentational State Transfer
    • REST is NOT...• ‘Webservices using JSON’• A protocol• A design pattern
    • REST is..“An architectural style for buildingdistributed hypermedia systems.”
    • In theory... REST isn’t limited to asingle message protocol.
    • But in practice...It’s all about HTTP.
    • So now you wonder..Haven’t we been successfully building web services using SOAP and HTTP for over 10 years ?
    • BASIC CONCEPTS
    • Resources• An entity, item, or just a thing you want to expose.• REST is Resource Oriented.
    • Resources
    • Resources
    • Resources
    • Resources
    • IdentifiersSomething that identifies a resource.ID: 1URI: http://batman.com/api/batresource/1
    • RepresentationsView on a resource’s state at an instant in time.XML: JSON: Other:<BatResource> { • Images <Id>1</Id> "Id":"1", • CSV <Description> "Description":"Bataran • Custom Batarang g", • ... </Description> "Quantity":1 <Quantity>1</Quantity> }</BatResource>
    • VerbsActions on a resource.Create Read Update DeletePOST GET PUT DELETE
    • HypermediaHATEOAS: Hypermedia as the engine of application stateLinking your API together{ "Id":"1", "Description":"Batarang", “Quantity":1, “Links": { "Rel":"Next", "Href":"http://localhost:8080/api/batresource/2" }}
    • HypeRRRRRRRmedia• Relations• Embedded resources• Reference data• Redistribution of effort• Reduction of payload size• Reflow• Restriction of functionality
    • Architecture of the WEBARCHITECTURAL VALUES
    • Scalability and performanceYes, text-based, synchronous, request-responsecan be performant.• Stateless• Caching
    • Loose coupling• No transactions• No state• No guarantees• HATEOAS• No specific technology stack
    • Consistency and UniformityEverybody knows how to use HTTP –Constraints –Well understood semantics
    • LEFT-OVERS
    • Richardson’s Maturity Model Level 0: POX Level 1: Resources Level 2: HTTP verbs Level 3: Hypermedia
    • ASP.NET WEBAPI
    • What? .NET HTTP framework (4.0)for building RESTful services.
    • When?• HTTP Services (WCF)• AJAX back-ends
    • The server
    • Options• WebHost – ASP.NET MVC: Click, click, click• SelfHost
    • Starting
    • Mapping Web API to REST concepts
    • A resource
    • A resource
    • Identifiers
    • Identifiers
    • Verbs
    • Verbs
    • Representations
    • Representationsapplication/jsontext/xml
    • Representations
    • Hypermedia
    • Hypermedia
    • The Client
    • PackageMicrosoft.AspNet.WebApi.Client
    • Verbs and asynchrony
    • Summary• REST – Concepts – Architectual values – Left overs• ASP.NET Web API – Server – Client
    • There is moreSlides and source on http://jefclaes.beExtensibility?• Next session (Raffaele Rialdi)• http://github.com/JefClaes/aspnet-webapi-samples-tunisia
    • Please rate this sessionScan the code, go online, rate this session