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