http://s/p?q#fwhere s is the server domain name, p is an opaque string passed to the server, q is a string representing parameters to a query of http://s/p, and f is a fragment identifier.
Let us use the smalltalk object notation in which [ob meth:param] indicates the result of applying the method "meth" with parameter "param" to object "ob".
The HTTP protocol treats p?q opaquely. It provides a retrieval method GET which returns a whole object
ob = [HTTP method:GET uri:"//s/p?q" ]or more concisely, assuming HTTP to be simply part of the infrastructure of invokation,
ob = [s GET:"p/q"]This then returns an object in some mutually understood syntax, which is then available on the client side. The client then activates the object in some way passing the object the string f:
[ob view:"f"]The result of this is the rendition of the object in a given view.
Crucial assumptions of this model are:
The phrase "fragment identifier" is perhaps unfortunate. It allows to misunderstandings to crop up. One is that f should always be used as in HTML to indicate a fragment. We should interpret f as any set of parameters to be passed to the object to define the rendition, or view, required. For text, the only variables are the selected area and the scroll position, so this is what is effectively communicated in f. For a three dimensional view, a viewpoint would be quite appropraiate. "View identifier" would have been better perhaps, but it is too late now.
The other misunderstanding is that f should be used to indicate part of an object's state to be transferred by the server It cannot be empahsised too strongly that f is not used for this purpose. If there is a requirement to fetch a "slice" of an object for efficiency reasons, then that is a seperate function which we do not consider here.
A problem with the assumption that f is only seen by the object arises immediately with format conversion. the syntax of f has to be such that it will be understood by all objects which are valid representations of ob.
The client is aware of a limited syntax for q in the cases in which it has to build the query string. In these cases the string is either a random text string (in the case of a general searchable index) or it is a attribute/value pair list, in the case of encoded form data or ISMAP data.
We have the useful but strange situation that what to the client is an identifier is to the server a function. We have two levels of application of paremeters/methods/operations/qualifirs to a basic object, one of which (q) takes place on the server and one (f) on the client. However, we are interested in systems in which the server and client distinctions blurr. Maybe we want to give the server the option of doing the application of f to the object on the sevrer side, or re-expressing f when converting the format of p?q.
A basic challenge here is how we can use the power of combination of typical programming languages with the information-hiding properties of the web. Let's look at some of the principles we need to maintain
There is a clash of principle between the markup world and the Object oriented world. The markup world maintains the feature that an object is stored in a cannonical form so that its stored state may be interpreted by any conforming implementation. Therefore, the internal syntax is exposed, but the implementation hidden. The OO world does not generally move objects around between heterogeneous systems, it more naturally invoked methods on them remotely. OO systems pride thmselves on hiding from the user the details of the storage format. The semantics of the object can be defined in specifications, but as they are inherited by subclassses, few systems dare to mix different implementations of the same object. Typically, the implementation code will be common, and the data hidden. Ideally, the specification of an object will inlcude both a cannonical storage/transfer format, and the API (interface) for its implementation,
<a href="foo">More information</a>is interprested to mean
"A link exists starting at the phrase more information and ending at the object with URL foo".It is not interpreeted as
"Underline the phrase more information and when a mouse click occurs, then present the object with URL foo"The advantages of the declarative approach are that
In this impoverished era of hypertext, the only creative action the average user has is to add an item to his or her hotlist. This simple action relies on a solid concept of an object (or more specifically, a view of an object) and of a solid notion of an identifier. The hotlist contains the value of the URI, and the guarantee is that when it is activated later, the the same view will be presented again.
There is also something important psycologically about the declarative nature of the web. It can be argued that the web took off and appeals to people because the have a sense of its existence. This may be because people have the ability to handle maps of quasi-static systems of objects and links. This is acontrast to the procedural interfaces, for example of FTP, in which the language is of "setting mode", and "transfering". he emphasis on verbs leaves the user with a need to model the protocol state of a remote peer entity, and deduce, from the conversation, a model of the actual inormation at the far end. There may be psycological as well as computer science reasons for thinking hard before beaking the declarative nature of the web.
These forms typically differ in machine representation (content-type), human language, resolution, and version.
The current model is that an object may have different URIs, for example one for the specific oject, and one for a more generic one. The method of handling this hich has been proposed is
Content-type: image/png Content-language: en_us URI: "http://foo.com/bar"; vary=language,content-type,version URI: "http://foo.com/bar.en_us"; vary=content_type, version URI: "http://foo.com/bar.en_us.png"; vary=version URI: "http://foo.com/bar.en_us.png.v10"; vary=noneindicating that the document may be refered to in a number of ways, as a gneric document, as specifically the english translation, as specifically the PNG format of that, and specifically as the current bitstream version of the PNG format english translation.
Jumping ahaead a bit, one can see a need for giving more information about these specific encodings:
This is one richness which has give the web flexibility, in that it has allowed one to separate the concept of an object from that of a bit pattern, and so allow migration of storage and transmission formats as technology evolves.( url "http://foo.com/bar.fr" (vary (langauge content-type))) ( specialization-by "content-language" "http://foo.com/bar" ) ( content-langauge: "fr" )
[ [s get:"p?q"] view:"f"]in which the client-server architecturally embedded. If we looked at it without the client-server distinction then we would just see
[ ob view:f]where the implementation of ob could be anywhere. In this model if the object is determined (by some name service) to happen to be on a remote server s, then we have to ask s the whole question:
[ s view:"ob#f"]This allows s to return the object ob and view identifier f, or to return an object which encompasses only the view but not all of "ob", or to return an object ob2 which is equivalent in some way to ob, with a view specifier f2 which is the equiavlent (for ob2) of f (for ob). This gets us around the problems such as conversion of an id in an SGML document into a byte rnge in the equivalent text file, or of conversion of a byte range in an original text version to a byte range in an updated version of a living document.
This means that the "identifier" for this must contain all the function parameters if the penguin is a function. The problem with that is that these things are very cumbersome in URL-encoded form. Hence Larry Masinter's proposal for multipart/form encoding of form parameters. Another more compact proposal is LISP-like syntax.
A sensible proposal then might be to have two alternative syntaxes for which url encodeing would be the defualt for transmission in an HTTP GET, and where the other syntax is usable where readability is desired.
(query "http://www.w3.org/foo" "something on animals" ) http://www.w3.org/foo?something+on+animals (map "http://s/map" ( 23 48 ) ) http://s/map?x=23;y=48 (form "http://s/foo" ( ( name "John Doe" ) ( address "1, ridgewater street" ) ( state "TX" ) )) http://s/foo?name=John+doe;address=1%2c+ridgewater+street;state=TX (view "http://www.w3.org/" "Software" ) http://www.w3.org/#Software (view "http://s/foo" ( (r 30.0) (theta 30) (phi 0)) )This is simply for convenience. It gets over the inconvenience of URL encoding.