Hypermedia Types

H Factor

The H Factor of a media-type is a measurement of the level of hypermedia support and sophistication of a media-type. H Factor values can be used to compare and contrast media types in order to aid in selecting the proper media-type(s) for your implementation.

H-Factor values are made up of two parts, each with their own set of factors: [MCA: Is this a complete list? overkill?]

  1. Link Support
  2. Control Data Support

By checking each hypermedia element in media-type for each of the identified factors, one can arrive at the composite 'H Factor' for the target media type.

Example H Factor Charts

When comparing media types, it can be helpful to document the existing H Factors in a simpel visual chart. In the exmaples below, the bottom row identifies basic link factors. These are the most most noticeable hypermedia factors. The upper two rows identify control data factors. These factors allow media types to provide support for additional aspects of hypmermedia semantics.

Link Support Values:


Support for embedded links (HTTP GET)

    <img src="http://www.example.org/images/logo" title="company logo" />

Support for out-bound navigational links (HTTP GET)

    <a href="http://www.example.org/search" title="view search page">Search</a>

Support for templated queries (HTTP GET)

    <form method="get">
      <label>Search term:</label>
      <input name="query" type="text" value="" />
      <input type="submit" />

Support for non-idempotent updates (HTTP POST)

    <form method="post" action="http://www.example.org/my-keywords"/>

      <input name="keywords" type="text" value="" />
      <input type="submit" />

Support for idempotent updates (HTTP PUT, DELETE)

    function delete(id) 
      var client = new XMLHttpRequest();
      client.open("DELETE", "/records/"+id);

Control Data Support Values:


Support for modifying control data for read requests (e.g. HTTP Accept-* headers).

   <xsl:include href="http://www.exmaple.org/newsfeed" accept="application/rss" />

Support for modifying control data for update requests (e. g. Content-* headers).

    <form method="post" action="http://www.example.org/my-keywords" enctype="application/x-www-form-urlencoded" />

      <input name="keywords" type="text" value="" />
      <input type="submit" />

Support for indiciating the interface method for requests (e.g. HTTP GET,POST,PUT,DELETE methods).

    <form method="post" action="http://www.example.org/my-keywords" />

      <input name="keywords" type="text" value="" />
      <input type="submit" />

Support for adding semantic meaning to link elements using link relations (e.g. HTML rel attribute).

    <entry xmlns="http://www.w3.org/2005/Atom">
      <title>Atom-Powered Robots Run Amok</title>

      <author><name>John Doe</name></author>

      <content>Some text.</content>
      <link rel="edit" href="http://example.org/edit/first-post.atom"/>

Update History

Updated storage and layout
Cleaned up Control Data descriptions
Initial post