3.3 Responders

There are basically two kinds of websites, publications and applications, differentiated by their organization and interface models. A publication website organizes information into individual pages within a hierarchical folder structure that one navigates by browsing. In an application website, on the other hand, data is not organized into hierarchical pages but is dealt with via a non-browsing interface such as a search box.

The HTML version of this documentation is an example of a publication website: a number of hypertext documents organized into sections. If we weren't using LaTeX (or if I knew how to use it better), the sections would probably be encoded in folders. Gmail is a pure application website, one which organizes and presents information non-hierarchically. Most websites, however, are hybrids. That is, within an overall hierarchical organization you will find both individual pages of information as well as applications such as a site search feature, or a threaded discussion forum.

Publication websites are actually a subset of application websites, of course. An application site can use any interface metaphor; a publication is an application that uses the familiar folder/page metaphor to organize and present its information. Therefore, every website is fundamentally an application.

httpy enables you to build custom hybrid, publication, and application websites, and its bundled responders include an implementation of each.

class Multiple( [root])
Constructs a new Multiple responder object. root is the filesystem path of the directory to use as the publishing root. If not given or None, then it is set to the current working directory. If root does not point to a directory, ValueError is raised. This class is defined in the httpy.responders.multiple module.

class Static( [root][, defaults])
Constructs a new Static responder object. root has the same meaning as in Multiple. defaults is a sequence of names to use when looking for a default resource. If it is omitted or None, it is set to ('index.html', 'index.htm'), after checking the class attribute as with root. This class is defined in the httpy.responders.static module.

class XMLRPC
The XMLRPC responder is not designed to be instantiated directly, but rather used as a mixin. This class is defined in the httpy.responders.xmlrpc module.



Subsections
httpy is Zeta software. It is copyright © 2006 by Chad Whitacre, and is offered free of charge, warranty, and restrictions.