1 Introduction
2 ------------
3
4 WebStack is a package which provides a common API for Python Web applications,
5 regardless of the underlying server or framework environment. It should be
6 possible with WebStack to design and implement an application and to choose a
7 deployment environment, without having to go back and rewrite large parts of
8 that application to work in the chosen environment or in other environments
9 (should the deployment requirements change after the application has been
10 written).
11
12 Framework Support
13 -----------------
14
15 Currently, BaseHTTPRequestHandler (via BaseHTTPServer in the standard
16 library), CGI, Jython/Java Servlet API, mod_python, Twisted, Webware and Zope
17 2 are supported. Each framework has its own set of strengths and weaknesses,
18 but the idea is that deployment concerns can be considered separately from the
19 implementation of application functionality. Consult the NOTES.txt files in
20 each framework's subdirectory of the docs directory for some notes on how
21 applications may be run in each environment.
22
23 Tested Frameworks Release Information
24 ----------------- -------------------
25
26 BaseHTTPRequestHandler Python 2.2.2, Python 2.3.3
27 CGI Apache 2.0.44
28 Jython/Java Servlet API Jython 2.1, Java JDK 1.3.1_02, Tomcat 4.1.27 (Servlet 2.3)
29 mod_python 3.0.3 (3.1.3 for framework cookie and session support)
30 Twisted 1.0.5
31 Webware 0.8.1, CVS (2004-02-06)
32 Zope 2.7.2-0
33
34 New in WebStack 0.7 (Changes Since WebStack 0.6)
35 ------------------------------------------------
36
37 Fixed path information semantics.
38 Fixed file upload semantics.
39 Fixed content type handling for Unicode output and for interpreting request
40 body fields/parameters (although some improvement remains).
41 Added a method to discover the chosen response stream encoding.
42 Fixed field/parameter retrieval so that path and body fields are distinct,
43 regardless of the framework employed.
44 Added a method to get a combination of path and body fields (suggested by Jacob Smullyan).
45 Introduced Zope 2 support.
46 Improved Jython/Java Servlet API support (although a special PyServlet class
47 must now be used, and certain libraries must be deployed with applications).
48 Session support has been added.
49 Alternative cookie support for mod_python has been added.
50
51 New in WebStack 0.6 (Changes Since WebStack 0.5)
52 ------------------------------------------------
53
54 Introduced Jython/Java Servlet API support.
55 Minor fixes to example applications and to BaseHTTPRequestHandler.
56
57 New in WebStack 0.5 (Changes Since WebStack 0.4)
58 ------------------------------------------------
59
60 Changed request body fields/parameters so that they are now represented using
61 Unicode objects rather than plain strings.
62 Introduced better support for Unicode in response streams.
63
64 New in WebStack 0.4 (Changes Since WebStack 0.3)
65 ------------------------------------------------
66
67 Added application definition of user identity, permitting alternative
68 authentication mechanisms.
69 Improved BaseHTTPRequestHandler and mod_python reliability around fields from
70 request bodies.
71 Provided stream and environment parameterisation in the CGI adapter.
72 Added LoginRedirect and Login examples.
73 Added get_path_without_query and fixed get_path behaviour.
74
75 New in WebStack 0.3 (Changes Since WebStack 0.2)
76 ------------------------------------------------
77
78 Added better header support for Webware (suggested by Ian Bicking).
79 Introduced CGI and Java Servlet support (the latter is currently
80 broken/unfinished).
81 Introduced support for cookies.
82
83 Future Work
84 -----------
85
86 Things to consider for future releases: improved cookie support, redirects,
87 access to shared resources and much better documentation.
88
89 Field access needs testing, especially for anything using the cgi.FieldStorage
90 class, and the way file uploads are exposed should be reviewed (currently the
91 meta-data is not exposed). The acquisition of fields from specific sources
92 should be tested with different request methods - some frameworks provide path
93 fields in the body fields dictionary, others (eg. Zope) change the fields
94 exposed depending on request method.
95
96 Interpretation of path field encodings needs to be verified. Currently, stray
97 path fields are handled (eg. in WebStack.Helpers.Request) as being ISO-8859-1,
98 but it might be the case that some such fields might be submitted as UTF-8.
99
100 Cookie objects need defining strictly, especially since the standard library
101 Cookie object behaves differently to mod_python (and possibly Webware) Cookie
102 objects. Moreover, the set_cookie_value method needs to provide access to the
103 usual cookie parameters as supported by the frameworks.
104
105 UTF-16 (and possibly other encodings) causes problems with HTML form data sent
106 in POST requests using the application/x-www-form-urlencoded content type.
107 This should be reviewed at a later date when proper standardisation has taken
108 place.
109
110 Session support, especially through WebStack.Helpers.Session, should be
111 reviewed and be made compatible with non-cookie mechanisms.
112
113 The location of deployed applications in the filesystem should be exposed to
114 those applications.
115
116 HeaderValue objects should be employed more extensively. Thus, the header
117 access methods may need to change their behaviour slightly.
118
119 Investigate the nicer functions in the cgi module, discarding the "magic"
120 stuff like FieldStorage.
121
122 Release Procedures
123 ------------------
124
125 Update the WebStack/__init__.py __version__ attribute.
126 Update the release notes (see above).
127 Check the setup.py file and ensure that all package directories are mentioned.
128 Tag, export.
129 Generate the PyServlet classes.
130 Archive, upload.