10. GregLTurnquist.com/springone2020
What is an API?
● Place to get a little JSON/XML/whatever?
● Way to interact with the app?
● Means to extract value from another app to help your own app?
11. GregLTurnquist.com/springone2020
What is an API?
● Place to get a little JSON/XML/whatever?
● Way to interact with the app?
● Means to extract value from another app to help your own app?
Let’s dig in and discover what it means to have a flexible API!
33. GregLTurnquist.com/springone2020
What about versioning?
6
It is always possible for some unexpected reason to come along that requires a completely
different API, especially when the semantics of the interface change or security issues require the
abandonment of previously deployed software. My point was that there is no need to anticipate
such world-breaking changes with a version ID. We have the hostname for that. What you are
creating is not a new version of the API, but a new system with a new brand.
On the Web, we call that a new website. Websites don’t come with version numbers attached
because they never need to. Neither should a RESTful API. A RESTful API (done right) is just a
website for clients with a limited vocabulary.
—Dr. Roy Fielding
“
43. GregLTurnquist.com/springone2020
What else do you need?
● Hypermedia controls
● Instead of telling someone how to use your API on a portal…
● …give them the controls right in the API
44. GregLTurnquist.com/springone2020
What else do you need?
● Hypermedia controls
● Instead of telling someone how to use your API on a portal…
● …give them the controls right in the API
● …using standard media types
45. GregLTurnquist.com/springone2020
What else do you need?
● Hypermedia controls
● Instead of telling someone how to use your API on a portal…
● …give them the controls right in the API
● …using standard media types
● It’s how the web functions
46. GregLTurnquist.com/springone2020
What else do you need?
● Hypermedia controls
● Instead of telling someone how to use your API on a portal…
● …give them the controls right in the API
● …using standard media types
● It’s how the web functions
● It’s the reason the web succeeded
47. GregLTurnquist.com/springone2020
What else do you need?
● Hypermedia controls
● Instead of telling someone how to use your API on a portal…
● …give them the controls right in the API
● …using standard media types
● It’s how the web functions
● It’s the reason the web succeeded
● The reason everyone today builds web apps
68. GregLTurnquist.com/springone2020
What if…
● You wanted your client to consume hypermedia?
● Ready to register all those messy message converters?
● Do you really want to look up how to customize RestTemplate (or
WebClient) to handle HAL, HAL-FORMS, etc., etc., etc.?
69. GregLTurnquist.com/springone2020
What if…
● You wanted your client to consume hypermedia?
● Ready to register all those messy message converters?
● Do you really want to look up how to customize RestTemplate (or
WebClient) to handle HAL, HAL-FORMS, etc., etc., etc.?
70. GregLTurnquist.com/springone2020
What if…
● You wanted your client to consume hypermedia?
● Ready to register all those messy message converters?
● Do you really want to look up how to customize RestTemplate (or
WebClient) to handle HAL, HAL-FORMS, etc., etc., etc.?
Spring HATEOAS has you covered!
87. GregLTurnquist.com/springone2020
Additional Features
● Spring WebFlux support
● More media types (UBER+JSON, Collection+JSON, Your Own ™)
● Standardized errors with Problem+JSON (RFC-7807)
● Lots of performance improvements
● Increasing community involvement
● JSON:API, Siren media types
● Document updates
● New ideas!
88. GregLTurnquist.com/springone2020
Additional Features
● Spring WebFlux support
● More media types (UBER+JSON, Collection+JSON, Your Own ™)
● Standardized errors with Problem+JSON (RFC-7807)
● Lots of performance improvements
● Increasing community involvement
● JSON:API, Siren media types
● Document updates
● New ideas!
89. GregLTurnquist.com/springone2020
Additional Features
● Spring WebFlux support
● More media types (UBER+JSON, Collection+JSON, Your Own ™)
● Standardized errors with Problem+JSON (RFC-7807)
● Lots of performance improvements
● Increasing community involvement
● JSON:API, Siren media types
● Document updates
● New ideas!
90. GregLTurnquist.com/springone2020
Additional Features
● Spring WebFlux support
● More media types (UBER+JSON, Collection+JSON, Your Own ™)
● Standardized errors with Problem+JSON (RFC-7807)
● Lots of performance improvements
● Increasing community involvement
● JSON:API, Siren media types
● Document updates
● New ideas!
Check it out!
91. GregLTurnquist.com/springone2020
Thank you SpringOne 2020!
Join me on #session-building-flexible-apis-with-spring-hateoas
for Q&A
Follow us on twitter @SpringHATEOAS
Visit GregLTurnquist.com/springone2020 to WIN a
paperback+ebook copy of Hacking with Spring Boot 2.3