1.1 --- a/docs/deploying.html Fri Apr 08 23:11:22 2005 +0000
1.2 +++ b/docs/deploying.html Sat Apr 09 12:32:28 2005 +0000
1.3 @@ -1,6 +1,6 @@
1.4 <?xml version="1.0" encoding="iso-8859-1"?>
1.5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
1.6 - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.7 + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.8 <html xmlns="http://www.w3.org/1999/xhtml">
1.9 <head>
1.10 <title>Deploying a WebStack Application</title>
1.11 @@ -9,70 +9,87 @@
1.12 </head>
1.13
1.14 <body>
1.15 -<h1>Deploying a WebStack Application<br />
1.16 -</h1>
1.17 +<h1>Deploying a WebStack Application</h1>
1.18 +
1.19 +<p>The process of deploying a WebStack application should be as
1.20 +straightforward as taking some adapter or "glue" code and either running it
1.21 +or using the deployment processes of the server environment or framework in
1.22 +which the application will be living.</p>
1.23 +
1.24 +<h2>The Adapter Code</h2>
1.25
1.26 -<p>When deploying an application, it is possible to use a one-shot deploy
1.27 -function for certain frameworks. The <code>deploy</code> function is called
1.28 -as follows:</p>
1.29 -<pre>deploy(resource)
1.30 -deploy(resource, authenticator) # where authenticators are used</pre>
1.31 +<p>What adapter or "glue" code does is to set up your applications main
1.32 +resource object and to hook that object up with the underlying server
1.33 +environment. It typically looks something like this:</p>
1.34 +<pre>from WebStack.Adapters.CGI import deploy # import the support for the server environment
1.35 +from MyApplication import MyResource # import the main resource class
1.36 +deploy(MyResource()) # connect a resource object to the server environment</pre>
1.37
1.38 -<p>For some frameworks, an address may be specified:</p>
1.39 -<pre>deploy(resource, address=(host_string, port_integer))
1.40 -deploy(resource, authenticator, address=(host_string, port_integer))</pre>
1.41 +<p>Unfortunately, not all server environments can be connected up with
1.42 +applications this easily. Some environments require special classes and
1.43 +functions to be defined in the adapter code in order for the applications to
1.44 +be properly integrated into the environments. Here is a summary which
1.45 +indicates the server environments or frameworks which need most work:</p>
1.46
1.47 -<table border="1" cellpadding="5" cellspacing="0">
1.48 +<table border="1" cellspacing="0" cellpadding="5">
1.49 <tbody>
1.50 <tr>
1.51 <th>Framework</th>
1.52 - <th>Address Information</th>
1.53 + <th>Adapter Code Requirements</th>
1.54 + <th>Deployment Process</th>
1.55 </tr>
1.56 <tr>
1.57 <td>BaseHTTPRequestHandler</td>
1.58 - <td>Supported</td>
1.59 + <td>Simple - see above</td>
1.60 + <td>Run the adapter code directly</td>
1.61 </tr>
1.62 <tr>
1.63 <td>CGI</td>
1.64 - <td>Ignored</td>
1.65 + <td>Simple - see above</td>
1.66 + <td>Web server runs the adapter code</td>
1.67 + </tr>
1.68 + <tr>
1.69 + <td>Java Servlet</td>
1.70 + <td>Must subclass <code>HttpServlet</code></td>
1.71 + <td>Application must be deployed using supplied tools</td>
1.72 + </tr>
1.73 + <tr>
1.74 + <td>mod_python</td>
1.75 + <td>Must implement <code>handler</code> function</td>
1.76 + <td>Web server runs the adapter code (which must be declared within
1.77 + Apache)</td>
1.78 </tr>
1.79 <tr>
1.80 <td>Twisted</td>
1.81 - <td>Supported (<code>host_string</code> is ignored)</td>
1.82 + <td>Simple - see above</td>
1.83 + <td>Run the adapter code directly</td>
1.84 + </tr>
1.85 + <tr>
1.86 + <td>Webware</td>
1.87 + <td><= 0.8.1: Must implement <code>InstallInWebKit</code>
1.88 + function<br />
1.89 + > 0.8.1: Simple, but must provide a <code>urlParser</code>
1.90 + object</td>
1.91 + <td>Application must be deployed within WebKit</td>
1.92 </tr>
1.93 <tr>
1.94 <td>WSGI</td>
1.95 - <td>Ignored</td>
1.96 + <td>Simple - see above</td>
1.97 + <td>Web server runs the adapter code</td>
1.98 + </tr>
1.99 + <tr>
1.100 + <td>Zope</td>
1.101 + <td>Must provide lots of Zope administative classes and functions</td>
1.102 + <td>Application must be deployed within Zope</td>
1.103 </tr>
1.104 </tbody>
1.105 </table>
1.106
1.107 -<p>The other frameworks do not support the deploy function due to the way
1.108 -applications are typically integrated into the various server mechanisms:</p>
1.109 -
1.110 -<table border="1" cellpadding="5" cellspacing="0">
1.111 - <tbody>
1.112 - <tr>
1.113 - <th>Framework</th>
1.114 - <th>Deployment Details</th>
1.115 - </tr>
1.116 - <tr>
1.117 - <td>JavaServlet</td>
1.118 - <td>Applications are packaged specially</td>
1.119 - </tr>
1.120 - <tr>
1.121 - <td>ModPython</td>
1.122 - <td>Applications must expose certain functions</td>
1.123 - </tr>
1.124 - <tr>
1.125 - <td>Webware</td>
1.126 - <td>Applications must expose certain classes</td>
1.127 - </tr>
1.128 - <tr>
1.129 - <td>Zope</td>
1.130 - <td>Applications must expose certain functions/classes</td>
1.131 - </tr>
1.132 - </tbody>
1.133 -</table>
1.134 +<h2>The Deployment Process</h2>
1.135 +<ul>
1.136 + <li><a href="writing-adapters.html">Writing Adapters</a></li>
1.137 + <li><a href="pythonpath.html">Getting PYTHONPATH Righ</a>t</li>
1.138 + <li><a href="deploying-applications.html">Deploying an Application</a></li>
1.139 +</ul>
1.140 </body>
1.141 </html>