The H Factor for Media Types
today i stumbled upon The Hypermedia Scale posted to REST Patterns by @bjorg last year. it reminded me of some work i've been doing recently on cataloging Hypermedia Types.
unlike the REST Patterns article, which categorizes hypermedia based on CRUD capabilities, i've tried to parse out various features of a media type that allow servers and clients to share information about hypermedia capabilities. i've dubbed my effort The H Factor.
currently, i have identified two classes of factors: link support, and control data support. here's my current breakdown:
- Link Support
- Embedding links (LE)
e.g. HTMLimg
tags - Outbound links (LO)
e.g. HTMLanchor
tags - Templated queries (LT)
e.g. HTMLform
w/method='get'
- Non-Idempotent Updates (LN)
e.g. HTMLform
w/method='post'
- Idempotent Updates (LI)
e.g.XmlHttpRequest
object w/ PUT or DELETE - Control Data Support
- Control data for reads (CR)
e.g. XInclude'saccept
attribute - Control data for updates (CU)
e.g. HTMLform
w/enc-type
attribute - Control data for methods (CM)
e.g. HTMLform
w/method
attribute - Control data for link relations (CL)
e.g. Atomlink
elements supportsrel="edit"
and others
by identifying elements of a media type that support link semantics and detailing the ways clients and servers can decorate these elements with added information to modify the method used and the control data supplied, media types become more than representations of data, they become the instrument of application flow for both the client and server.
that is the essence of a hypermedia type.