The H Factor for Media Types

2010-03-09 @ 20:24#

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:

  1. Link Support
    • Embedding links (LE)
      e.g. HTML img tags
    • Outbound links (LO)
      e.g. HTML anchor tags
    • Templated queries (LT)
      e.g. HTML form w/ method='get'
    • Non-Idempotent Updates (LN)
      e.g. HTML form w/ method='post'
    • Idempotent Updates (LI)
      e.g. XmlHttpRequest object w/ PUT or DELETE
  2. Control Data Support
    • Control data for reads (CR)
      e.g. XInclude's accept attribute
    • Control data for updates (CU)
      e.g. HTML form w/ enc-type attribute
    • Control data for methods (CM)
      e.g. HTML form w/ method attribute
    • Control data for link relations (CL)
      e.g. Atom link elements supports rel="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.