Skip to content

Latest commit

 

History

History
27 lines (17 loc) · 1.61 KB

affordance.md

File metadata and controls

27 lines (17 loc) · 1.61 KB

Affordance

Technology

Spring HATEOAS

To implement affordance, and more precisely HATEOAS REST constraint I chose Spring Hateoas which is interesting when we are used to Java & spring environment.
Sadly for now that's a little difficult to find interesting and up-to-date example project to implement it. I tried to do it with spring but for now the API is still tricky according to me...

After some tries I succeeded thanks to Spring hateoas examples and more precisely affordances part which show how to create templates

I initialized a service from scratch thanks to Spring starter and I copy/paste needed libraries.

Linked Documentation

HAL FORM exemple

I chose Hal+form content type because HAL is the most popular content type and also the one most likely to be known by consumers.
And the form extension to be able to explicit form elements and types. (Like that in front end you only have to react to this information).

Hal form example github