Hypermedia mit der ASP.NET Web API
Alexander Zeitler
DEMO
 CRUD Web API
REST - da war doch noch etwas…
Level 1: Resources URI tunneling
Level 0: POX
XML over
HTTP
Level 2: HTTP Methods CRUD
Level 3: Hypermedia HATEOAS
HATEOAS - Alles Hype?
 HyperText
 HyperMedia
 Hypermedia As The Engine Of Application State
HATEOAS - Server-Aspekte
 Links, Forms, Templates
 ETags / If-None-Match
 Encoding (gzip/deflate)
HATEOAS - Client-Aspekte
 Baue keine URLs!
 Accept-Header explizit setzen
 Content-Encoding (gzip / deflate)
 Paging „verstehen“
HATEOAS - Vorteile
 Unabhängige Weiterentwicklung von
Server und Client
 Clients können aktualisiert werden (Forms)
 URLs dürfen sich ändern
 Datenstrukturen können sich ändern
DEMO
 Hypermedia mit der ASP.NET Web API
Gibt es das nicht fertig?
 Collection+JSON
 Hypermedia-Typ für Collections
 http://amundsen.com/media-types/collection/
WebApiContrib.Formatting.CollectionJson
 Collection+JSON für ASP.NET Web API
https://github.com/WebApiContrib/WebApiContrib.Formatting.CollectionJson
DEMO
 WebApiContrib.Formatting.CollectionJson
Fragen
Alexander Zeitler
alexander.zeitler@pdmlab.com
@AlexZeitler
http://pdmlab.com
http://blog.alexonasp.net

Hypermedia mit der ASP.NET Web API