Deploying a WebStack Application

The process of deploying a WebStack application should be as straightforward as taking some adapter or "glue" code and either running it or using the deployment processes of the server environment or framework in which the application will be living.

The Adapter Code

What adapter or "glue" code does is to set up your applications main resource object and to hook that object up with the underlying server environment. It typically looks something like this:

from WebStack.Adapters.CGI import deploy    # import the support for the server environment
from MyApplication import MyResource        # import the main resource class
deploy(MyResource())                        # connect a resource object to the server environment

Unfortunately, not all server environments can be connected up with applications this easily. Some environments require special classes and functions to be defined in the adapter code in order for the applications to be properly integrated into the environments. Here is a summary which indicates the server environments or frameworks which need most work:

Framework Adapter Code Requirements Deployment Process
BaseHTTPRequestHandler Simple - see above Run the adapter code directly
CGI Simple - see above Web server runs the adapter code
Java Servlet Must subclass HttpServlet Application must be deployed using supplied tools
mod_python Must implement handler function Web server runs the adapter code (which must be declared within Apache)
Twisted Simple - see above Run the adapter code directly
Webware <= 0.8.1: Must implement InstallInWebKit function
> 0.8.1: Simple, but must provide a urlParser object
Application must be deployed within WebKit
WSGI Simple - see above Web server runs the adapter code
Zope Must provide lots of Zope administative classes and functions Application must be deployed within Zope

The Deployment Process