the advantages of hypermedia types

2010-07-30 @ 21:11#

employing hypermedia types on the WWW has a number of advantages. below is a set of seven key aspects of hypermedia designs that are worth noting. i've used this list a number of times when talking to folks about the power of hypermedia designs when compared to the more common Web 2.0, SOAP RPC over HTTP, Discovery-Based, and other approaches to exposing functional data on the Web.

"The WWW is fundamentally a distributed hypermedia application."

Taylor, Medividovic, Dashofy (2010)

Address Abstraction
Hypermedia types use designated elements (e.g. A, FORM, IMG, etc.) and link relations (@rel) as 'tokens' for clients to watch for. The actual contents of the associated URI is not important to the client. This means the URIs can safely change over time.
Protocol Abstraction
Hypermedia types can be designed as protocol agnostic. Links can use any protocol supported by the [client|server] and can safely change over time as needed.
Object Model Abstraction
Hypermedia types can expose state representation transfers that need not match to any server-side object model or storage model. Passing representations means the server can safely change it's internal object/storage details without breaking the client.
Workflow Abstraction
Hypermedia programming allows sharing representations and links as a means to drive applications. That means servers can, over time, safely change the flow of an application by introducing new links and/or new state transfers or by changing the order of the existing state transfers.
Function Call Abstraction
Using state transfers means data passed between clients and servers can be in different formats, based on the use case requirements. That includes typical name/value pairs (name=mike&size=large...), binary objects (e.g. image transfers passed via base64 encoding), or even direct transmission of data blocks (e.g. XML, JSON, etc.)
Asynchronous Evolvability
Using Hypermedia types means authors can add new features to the messages without breaking existing clients. The media-type itself can be safely "versioned" in ways that will not break deployed clients, too. This also means that new clients can take advantage of the new features while co-existing with the old clients.
Client-Driven Composability
Clients that understand a sufficient range of media types can "compose" their own work by leveraging multiple servers, negotiating media types with those servers and, in effect, creating an individualized "program" for the client to follow. Hypermedia types encourage this "composability" since servers can offer up data via well-known hypermedia types and allow clients to determine what tasks are done at which servers using the hypermedia application control information provided in responses.