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.8 (Changes Since WebStack 0.7)
34 ------------------------------------------------
35
36 Added a standard exception, EndOfResponse, which can be used to immediately
37 stop the processing/production of a response; this is useful when resources
38 need to issue a redirect without unnecessary content being generated, for
39 example.
40
41 New in WebStack 0.7 (Changes Since WebStack 0.6)
42 ------------------------------------------------
43
44 Fixed path information semantics.
45 Fixed file upload semantics.
46 Fixed content type handling for Unicode output and for interpreting request
47 body fields/parameters (although some improvement remains).
48 Added a method to discover the chosen response stream encoding.
49 Fixed field/parameter retrieval so that path and body fields are distinct,
50 regardless of the framework employed.
51 Added a method to get a combination of path and body fields (suggested by Jacob
52 Smullyan).
53 Introduced Zope 2 support.
54 Improved Jython/Java Servlet API support (although a special PyServlet class
55 must now be used, and certain libraries must be deployed with applications).
56 Introduced authentication/authorisation support for Jython/Java Servlet API.
57 Session support has been added (except for Webware 0.8.1).
58 Alternative cookie support for mod_python has been added.
59 Cookie support now supports encoded Unicode sequences for names and values.
60
61 New in WebStack 0.6 (Changes Since WebStack 0.5)
62 ------------------------------------------------
63
64 Introduced Jython/Java Servlet API support.
65 Minor fixes to example applications and to BaseHTTPRequestHandler.
66
67 New in WebStack 0.5 (Changes Since WebStack 0.4)
68 ------------------------------------------------
69
70 Changed request body fields/parameters so that they are now represented using
71 Unicode objects rather than plain strings.
72 Introduced better support for Unicode in response streams.
73
74 New in WebStack 0.4 (Changes Since WebStack 0.3)
75 ------------------------------------------------
76
77 Added application definition of user identity, permitting alternative
78 authentication mechanisms.
79 Improved BaseHTTPRequestHandler and mod_python reliability around fields from
80 request bodies.
81 Provided stream and environment parameterisation in the CGI adapter.
82 Added LoginRedirect and Login examples.
83 Added get_path_without_query and fixed get_path behaviour.
84
85 New in WebStack 0.3 (Changes Since WebStack 0.2)
86 ------------------------------------------------
87
88 Added better header support for Webware (suggested by Ian Bicking).
89 Introduced CGI and Java Servlet support (the latter is currently
90 broken/unfinished).
91 Introduced support for cookies.
92
93 Future Work
94 -----------
95
96 Things to consider for future releases: improved cookie support, redirects,
97 access to shared resources and much better documentation.
98
99 Field access needs testing, especially for anything using the cgi.FieldStorage
100 class, and the way file uploads are exposed should be reviewed (currently the
101 meta-data is not exposed). The acquisition of fields from specific sources
102 should be tested with different request methods - some frameworks provide path
103 fields in the body fields dictionary, others (eg. Zope) change the fields
104 exposed depending on request method.
105
106 Interpretation of path field encodings needs to be verified. Currently, stray
107 path fields are handled (eg. in WebStack.Helpers.Request) as being ISO-8859-1,
108 but it might be the case that some such fields might be submitted as UTF-8.
109
110 Cookie objects need defining strictly, especially since the standard library
111 Cookie object behaves differently to mod_python (and possibly Webware) Cookie
112 objects. Moreover, the set_cookie_value method needs to provide access to the
113 usual cookie parameters as supported by the frameworks. The standard library
114 Cookie module has issues with Unicode cookie names (and possibly values) -
115 this is worked around, but it would be best to resolve this comprehensively.
116
117 UTF-16 (and possibly other encodings) causes problems with HTML form data sent
118 in POST requests using the application/x-www-form-urlencoded content type.
119 This should be reviewed at a later date when proper standardisation has taken
120 place.
121
122 Session support, especially through WebStack.Helpers.Session, should be
123 reviewed and be made compatible with non-cookie mechanisms.
124
125 The location of deployed applications in the filesystem should be exposed to
126 those applications.
127
128 Path information should be consistent across all frameworks, and the "path
129 info" value should be meaningful.
130
131 HeaderValue objects should be employed more extensively. Thus, the header
132 access methods may need to change their behaviour slightly.
133
134 Investigate the nicer functions in the cgi module, discarding the "magic"
135 stuff like FieldStorage.
136
137 The apidocs.py script needs finishing or a better documentation system needs
138 to be adopted.
139
140 Release Procedures
141 ------------------
142
143 Update the WebStack/__init__.py __version__ attribute.
144 Update the release notes (see above).
145 Check the setup.py file and ensure that all package directories are mentioned.
146 Tag, export.
147 Generate the PyServlet classes.
148 Archive, upload.