Upgrade to Pro — share decks privately, control downloads, hide ads and more …

BASTA! 2017 - Mit .NET Core und HATEOAS zum perfekten REST-API?

Manuel Meyer
September 27, 2017

BASTA! 2017 - Mit .NET Core und HATEOAS zum perfekten REST-API?

Mit dem Akronym HATEOAS, abgekürzt für "Hypermedia As The Engine Of Application State", hat der Computerwissenschaftler Roy Fielding im Jahr 2000 erläutert, wie aus seiner Sicht das perfekte REST-API gebaut werden muss. HATEOAS ermöglicht ein API, das ohne zusätzliche sogenannte "Out-of-band"-Informationen verstanden und konsumiert werden kann. Dies wird ermöglicht, indem die Antworten des Servers dem Aufrufer über Links mitteilen, welche Folgeabfragen möglich sind. Seither streiten sich die Experten über das Thema und dessen Relevanz in der Praxis. In dieser Session zeigen wir, wie Enterprise-REST-APIs mit .NET Core gebaut werden können, und was es mit HATEOAS genau auf sich hat.

Manuel Meyer

September 27, 2017
Tweet

More Decks by Manuel Meyer

Other Decks in Programming

Transcript

  1. REST-APIs mit .Net Core und HATEOAS REST API .Net Core

    HATEOAS Representational State Transfer Application Programming Interface Hypertext As The Engine Of Application State (Hypermedia)
  2. The History of REST „REST started as a model how

    the web and web apps should work.“ Roy Fielding, 2000 https://www.youtube.com/watch?v=w5j2KwzzB-0 http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
  3. The History of REST – Simple – Scalable – Reliable

    – Extensible. Roy Fielding, 2000 https://www.youtube.com/watch?v=w5j2KwzzB-0 http://www.ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm
  4. Promotes Simplified server, Scalability, Reliability Efficiency, Scalability Visibility Independent Evolution

    Decoupled Implementation Simplified clients, scalability Extensibility Constraint Client Server Stateless Optional non-shared caching Uniform Interface identification of resources in request, manipulation via resources self-descriptive messages HATEOAS Layered system code on-demand (optional)
  5. .NET vs .NET Core • Alle App-Modelle • Alle APIs

    • Windows • Monolith • Eingeschränkt • .NET Standard • Cross-Platform • Modular & Open Source -> Self-contained.
  6. HATEOAS «Hypermedia ist eine Erweiterung von Hypertext» «Der Rest von

    REST» «Der heilige Gral» «Müll». Hypermedia as the Engine of Application State
  7. REST Spec Constraint Promotes Client Server Simplified server, Stateless Scalability,

    Reliability Optional non-shared caching Efficiency, Scalability Uniform Interface identification of resources in request, manipulation via resources self-descriptive messages HATEOAS Visibility Independen Evolution Decoupled Implementation Layered system Simplified clients, scalability code on-demand (optional) Extensibility
  8. HAL Hypertext Application Language HAL = Resources & Links. content-type

    = application/hal+json “HAL is a simple format that gives a consistent and easy way to hyperlink between resources in your API”