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