1.1 --- a/docs/writing-adapters.html Sun Jan 15 23:20:51 2006 +0000
1.2 +++ b/docs/writing-adapters.html Sun Jan 15 23:21:19 2006 +0000
1.3 @@ -1,11 +1,8 @@
1.4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
1.5 -<html xmlns="http://www.w3.org/1999/xhtml">
1.6 -<head>
1.7 - <title>Writing Adapters</title>
1.8 - <meta name="generator"
1.9 - content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.10 - <link href="styles.css" rel="stylesheet" type="text/css" />
1.11 -</head>
1.12 +<html xmlns="http://www.w3.org/1999/xhtml"><head>
1.13 +
1.14 + <title>Writing Adapters</title><meta name="generator" content="amaya 8.1a, see http://www.w3.org/Amaya/" />
1.15 + <link href="styles.css" rel="stylesheet" type="text/css" /></head>
1.16 <body>
1.17 <h1>Writing Adapters</h1>
1.18 <p>Depending on how "simple" the
1.19 @@ -22,37 +19,37 @@
1.20 <p>When deploying an application,
1.21 it is possible to use a one-shot
1.22 deployment
1.23 -function for BaseHTTPRequestServer, CGI, Twisted and WSGI. The
1.24 +function for BaseHTTPRequestServer, CGI, Django, Java Servlet, mod_python, Twisted and WSGI configurations. The
1.25 <code>deploy</code>
1.26 function is called as follows:</p>
1.27 <pre>deploy(resource)<br />deploy(resource, authenticator) # where authenticators are used</pre>
1.28 <p>For some frameworks, an address
1.29 may be specified:</p>
1.30 <pre>deploy(resource, address=(host_string, port_integer))<br />deploy(resource, authenticator, address=(host_string, port_integer))</pre>
1.31 -<p>Here is a summary of which
1.32 -frameworks require address information:</p>
1.33 +<p>And for some frameworks, the return value of the function is important:</p><pre>something = deploy(resource)<br />something, something_else = deploy(resource, authenticator)</pre><p>Here is a summary of which
1.34 +frameworks require address information and which produce important return values from the <code>deploy</code> function:</p>
1.35 <table border="1" cellpadding="5" cellspacing="0">
1.36 <tbody>
1.37 <tr>
1.38 <th>Framework</th>
1.39 - <th>Address Information</th>
1.40 + <th>Address Information</th><th>Return Values</th>
1.41 </tr>
1.42 <tr>
1.43 <td>BaseHTTPRequestHandler</td>
1.44 - <td>Supported</td>
1.45 + <td>Supported</td><td align="undefined" valign="undefined"></td>
1.46 </tr>
1.47 <tr>
1.48 <td>CGI</td>
1.49 - <td>Ignored</td>
1.50 + <td>Ignored</td><td align="undefined" valign="undefined"></td>
1.51 </tr>
1.52 - <tr>
1.53 + <tr><td align="undefined" valign="undefined">Django</td><td align="undefined" valign="undefined">Ignored</td><td align="undefined" valign="undefined">Handler function</td></tr><tr><td align="undefined" valign="undefined">Java Servlet</td><td align="undefined" valign="undefined">Ignored</td><td align="undefined" valign="undefined">Servlet class</td></tr><tr><td align="undefined" valign="undefined">mod_python</td><td align="undefined" valign="undefined">Ignored</td><td align="undefined" valign="undefined">Handler function and authenticator function (a 2-tuple)</td></tr><tr>
1.54 <td>Twisted</td>
1.55 <td>Supported (<code>host_string</code>
1.56 -is ignored)</td>
1.57 +is ignored)</td><td align="undefined" valign="undefined"></td>
1.58 </tr>
1.59 - <tr>
1.60 + <tr><td align="undefined" valign="undefined">Webware (> 0.8.1)</td><td align="undefined" valign="undefined">Ignored</td><td align="undefined" valign="undefined">URL context object</td></tr><tr>
1.61 <td>WSGI</td>
1.62 - <td>Ignored</td>
1.63 + <td>Ignored</td><td align="undefined" valign="undefined"></td>
1.64 </tr>
1.65 </tbody>
1.66 </table>
1.67 @@ -103,19 +100,15 @@
1.68 <td>Web server runs the
1.69 adapter code</td>
1.70 </tr>
1.71 - <tr>
1.72 + <tr><td align="undefined" valign="undefined">Django</td><td align="undefined" valign="undefined">Simple - see above</td><td align="undefined" valign="undefined">The adapter prepares the handler function</td></tr><tr>
1.73 <td>Java Servlet</td>
1.74 - <td>Must subclass <code>HttpServlet</code></td>
1.75 - <td>Application must be
1.76 -deployed using supplied tools</td>
1.77 + <td><span style="font-family: monospace;"></span><code></code>Simple - see above</td>
1.78 + <td>The adapter prepares the servlet class</td>
1.79 </tr>
1.80 <tr>
1.81 <td>mod_python</td>
1.82 - <td>Must implement <code>handler</code>
1.83 -function</td>
1.84 - <td>Web server runs the
1.85 -adapter code (which must be declared
1.86 -within Apache)</td>
1.87 + <td><span style="font-family: monospace;"></span><code></code>Simple - see above</td>
1.88 + <td>The adapter prepares the handler function</td>
1.89 </tr>
1.90 <tr>
1.91 <td>Twisted</td>
1.92 @@ -128,8 +121,7 @@
1.93 <td><= 0.8.1: Must
1.94 implement <code>InstallInWebKit</code>
1.95 function<br />
1.96 -> 0.8.1: Simple, but must provide a <code>urlParser</code>
1.97 -object</td>
1.98 +> 0.8.1: Simple - see above</td>
1.99 <td>Application must be
1.100 deployed within WebKit</td>
1.101 </tr>
1.102 @@ -151,5 +143,4 @@
1.103 <p>See <a href="deploying-applications.html">"Deploying an
1.104 Application"</a>
1.105 for more details of the deployment process for each environment.</p>
1.106 -</body>
1.107 -</html>
1.108 +</body></html>
1.109 \ No newline at end of file