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