1.1 --- a/docs/deploying.html Tue Apr 19 22:32:46 2005 +0000
1.2 +++ b/docs/deploying.html Sun Apr 24 15:43:10 2005 +0000
1.3 @@ -18,73 +18,23 @@
1.4 <p>What adapter or "glue" code does is to set up your applications main
1.5 resource object and to hook that object up with the underlying server
1.6 environment. For the <code>MyApplication</code> <a
1.7 - href="resources.html">example</a> it typically looks something like
1.8 + href="resources.html">example</a>, together with a simple environment,
1.9 +looks something like
1.10 this:</p>
1.11 -<pre>from WebStack.Adapters.BaseHTTPRequestHandler import deploy # import the support for the server environment<br />from MyApplication import MyResource # import the main resource class<br />deploy(MyResource()) # connect a resource object to the server environment</pre>
1.12 +<pre>from WebStack.Adapters.BaseHTTPRequestHandler import deploy # import the support for the server environment<br />from MyApplication import MyResource # import the main resource class<br />print "Serving..."<br />deploy(MyResource()) # connect a resource object to the server environment</pre>
1.13 <p>In the case of BaseHTTPRequestHandler, which is a module in the
1.14 Python standard library, you can just run this code, making sure that
1.15 the <code>MyApplication</code> module or package is on your <code>PYTHONPATH</code>.
1.16 Then, you can visit <code>http://localhost:8080</code> in your
1.17 browser and see the result.</p>
1.18 -<h2>More Demanding Adapter Code</h2>
1.19 +<h3>More Demanding Adapter Code</h3>
1.20 <p>Unfortunately, not all server environments can be connected up with
1.21 applications this easily. Some environments require special classes and
1.22 -functions to be defined in the adapter code in order for the
1.23 +functions to be defined in the adapter code in order for
1.24 applications to
1.25 -be properly integrated into the environments. Here is a summary which
1.26 -indicates the server environments or frameworks which need most work:</p>
1.27 -<table border="1" cellpadding="5" cellspacing="0">
1.28 - <tbody>
1.29 - <tr>
1.30 - <th>Framework</th>
1.31 - <th>Adapter Code Requirements</th>
1.32 - <th>Deployment Process</th>
1.33 - </tr>
1.34 - <tr>
1.35 - <td>BaseHTTPRequestHandler</td>
1.36 - <td>Simple - see above</td>
1.37 - <td>Run the adapter code directly</td>
1.38 - </tr>
1.39 - <tr>
1.40 - <td>CGI</td>
1.41 - <td>Simple - see above</td>
1.42 - <td>Web server runs the adapter code</td>
1.43 - </tr>
1.44 - <tr>
1.45 - <td>Java Servlet</td>
1.46 - <td>Must subclass <code>HttpServlet</code></td>
1.47 - <td>Application must be deployed using supplied tools</td>
1.48 - </tr>
1.49 - <tr>
1.50 - <td>mod_python</td>
1.51 - <td>Must implement <code>handler</code> function</td>
1.52 - <td>Web server runs the adapter code (which must be declared
1.53 -within Apache)</td>
1.54 - </tr>
1.55 - <tr>
1.56 - <td>Twisted</td>
1.57 - <td>Simple - see above</td>
1.58 - <td>Run the adapter code directly</td>
1.59 - </tr>
1.60 - <tr>
1.61 - <td>Webware</td>
1.62 - <td><= 0.8.1: Must implement <code>InstallInWebKit</code>
1.63 -function<br />
1.64 -> 0.8.1: Simple, but must provide a <code>urlParser</code> object</td>
1.65 - <td>Application must be deployed within WebKit</td>
1.66 - </tr>
1.67 - <tr>
1.68 - <td>WSGI</td>
1.69 - <td>Simple - see above</td>
1.70 - <td>Web server runs the adapter code</td>
1.71 - </tr>
1.72 - <tr>
1.73 - <td>Zope</td>
1.74 - <td>Must provide lots of Zope administative classes and functions</td>
1.75 - <td>Application must be deployed within Zope</td>
1.76 - </tr>
1.77 - </tbody>
1.78 -</table>
1.79 +be properly integrated into those environments. A summary of the
1.80 +requirements of each environment can be found in <a
1.81 + href="writing-adapters.html">"Writing Adapters"</a>.</p>
1.82 <h2>The Deployment Process</h2>
1.83 <ul>
1.84 <li><a href="writing-adapters.html">Writing Adapters</a></li>