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