On Mon, 13 Mar 2006, Graham Dumpleton wrote:

Thus I want a documented convention that if a handler is going to use
util.FieldStorage, that it should before doing so, first check whether
an existing instance resides as req.form and use that instead.

I'm not sure if this is a good example - req.form is something specific to the publisher. Rather than perhaps documenting it as you suggest, util.FieldStorage can take it upon itself to create a req.form so that subsequent attempts to instantiate it just return req.form. (This is just an example, I'm not 100% sure that I having FS do this makes sense - seems like a good idea).

Similarly, if a handler is going to create a Session object, that it
look for an existing instance as req.session and again use that instead.

OR, the Session module would know to look for a req.session, in which case the handlers wouldn't need to worry about it.

(One thing to watch out for would be that mutliple concurrent sessions in the same request is a possibility)

Grisha

Reply via email to