My Hypermedia and ASP.NET Web API talk from Oredev
RestBugs sample (for of Howard Dierking's repo) using templates: https://github.com/glennblock/RestBugs
Collection+Json: https://github.com/glennblock/collectionjson
22. COLLECTION
+JSON HTML
HAL ATOM
Media Types
Hypermedia is conventionally
surfaced via the media type SIREN
Hypermedia can also be
surfaced via headers
23. Formatters and Media Type
Hypermedia
Formatter
Media Type API
Formatters create media type Formatter Controller
representations from objects
Media Type
Formatters are the key place Formatter
for hypermedia to be rendered
24. Controller
Media Type
populates a
model with
links
Models
Media Type API
One approach is to have a Formatter Controller
media type specific model
Formatter
renders the
The application populates the model and
links
model, and a custom formatter
renders it
25. Controller
Media Type
returns a set
of DTOs
Templates
Media Type API
Another is to have media type Formatter Controller
specific templates.
Formatter
The application returns a model renders
template
with links
passed to a formatter.
The formatter renders using a
a template (like razor)