Information Technology Reference
In-Depth Information
In order to distinguish the technical use of the term 'representation' within Web
architecture from the standard philosophical use of the term 'representation,' we
shall use the term 'Web representation' to distinguish it from the ordinary use of
the term 'representation' as given earlier in Sect. 2.2.6 .A Web representation is the
encoding of the content given by a resource given in response to a request that is
subject to content negotiation , which must then include any headers that specify an
interpretation, such as character encoding and media type. So a Web representation
can be considered to have two distinct components, and the headers such as the
media type that lets us interpret the encoding, and the payload itself, which is
the encoding of the state of the resource at a given point in time (i.e. the HTML
itself). So, web-pages are web representations given in HTML . Web resources can
be considered resources that under 'normal' conditions result in the delivery of web-
pages.
Our typical Web transaction, as given earlier in Fig. 2.5 , can become more
complex due to this possible separation between content and encoding on the Web.
Different kinds of Web representations can be specified by user-agents as preferred
or acceptable, based on the preferences of its users or its capabilities, as given in
HTTP. The owner of a web-site about the Eiffel Tower decides to host a resource for
images of the Eiffel Tower. The owner creates a URI for this resource, http://www.
eiffeltower.example.org/image . Since a single URI is used, the sense (the depiction)
that is encoded in either SVG or JPEG is the same, namely that of an image of
the Eiffel Tower. That is, there are two distinct encodings of the image of the Eiffel
Tower available on a server in two different iconic languages, one in a vector graphic
language known as SVG and one in a bitmap language known as JPEG (Ferraiolo
2002; Pennebaker and Mitchell 1992). These encodings are rendered identically
on the screen for the user. If a web-browser only accepted JPEG images and not
SVG images, the browser could request a JPEG by sending a request for Accept:
image/jpeg in the headers. Ideally, the server would then return the JPEG-
encoded image with the HTTP entity header Content-Type: image/jpeg .
Had the browser wished to accept the SVG picture as well, it could have put
Accept: image/jpeg, image/svg+xml and received the SVG version. In
Fig. 2.6 , the user agent specifies its preferred media type as image/jpeg . So, both
the SVG and JPEG images are Web representations of the same resource, an image
of the Eiffel Tower, since both the SVG and JPEG information realize the same
information, albeit using different languages for encoding. Since a single resource
is identified by the same URI http://www.example.org/EiffelTower/image , different
user-agents can get a Web representation of the resource in a language they can
interpret, even if they cannot all interpret the same language. In Web architecture,
content negotiation can also be deployed over not only differing computational
languages such as JPG or SVG, but differing natural languages, as the same content
can be encoded in different natural languages such as French and English. An
agent could request the description about the Eiffel Tower from its URI and set
the preferred media type to ' Accept-Language: fr ' so that they receive a
French version of the web-page as opposed to an English version. Or they could
set their preferred language as English but by using ' Accept-Language: en .'
Search WWH ::




Custom Search