Common Resource Indicators

A CRI is a subset of the URI (Uniform Resource Indicator) form which is already widely used. A CRI is a URI that takes a specific form.

Terminology

  • Module: The name of the module to which the request should be directed.
  • Environment: The name of the environment in which the request will be processed.
  • Class: The type of request, this can only be one of the following:
    • Dynamic: Used to indicate a request that is fetching the output of a dynamic resource.
    • Static: Used to indicate a request that is fetching the content of an unchanging file, on the file system for example.
    • Resource: Used to indicate a request that is fetching an embedded stream, stored in the Module's assembly file.
  • Resource: The name of the page, file, or other object which is being requested.
  • Full: A URI, URL, or CRI which contains all 4 parts mentioned above.
  • Partial: A URI, URL, or CRI which contains only some of the 4 parts mentioned above.

Partial CRI vs Full CRI

A partial CRI does not contain all 4 of the normal CRI components. A partial URL may contain only the Resource, or only the Module and Environment, for example.

How Serenity Handles Partial CRIs

When Serenity encounters a partial CRI, it attempts to intelligently expand it into a full CRI. If the CRI ends with a forward slash, "/", it is assumed to be an "Index Request", and thus it's unspecified values are filled in on the right. However if the CRI does not end with a forward slash, it is assumed to be a "Resource Request", and it's unspecified values are filled in on the left.

An example to demonstrate this behaviour would be to take a partial CRI, such as "http://domain.com/Foo", and show how Serenity expands it into a Full CRI.
  • First, Serenity determines the CRI does not end with a foward slash, so it must be a Resource Request.
  • Next, Serenity determines how many values are unspecified. In this case, 3 of the 4 CRI parts are unspecified.
  • Finally, Serenity fills in the default values based on the current state of the server's configuration. If the default Module was "Bar", the default Environment was "Baz", and the default Class was "Dynamic", the partial CRI of "http://domain.com/Foo" would be expanded to become "http://domain.com/Bar/Baz/Dynamic/Foo"

Last edited Jan 10, 2007 at 7:06 AM by WShelley, version 1

Comments

No comments yet.