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