[Web-SIG] Defining a standard interface for common web tasks

Steve Holden sholden at holdenweb.com
Thu Oct 23 08:38:39 EDT 2003


[David Fraser]
>
> Ian Bicking wrote:
>
> > On Friday, October 17, 2003, at 03:51 PM, Bill Janssen wrote:
> >
[...]
> >
> >> 2) A standard Apache plug-in.  Does mod_python fill this
> role?  (Should
> >> this really be part of the stdlib?)  It would be useful if the APIs
> >> used here were similar to those used in the API support.
> >
> > mod_python pretty much fits this.  I don't see any reason
> to develop
> > anything else (at least in terms of Apache integration).  I don't
> > think it would make sense as part of the stdlib -- it depends on
> > Apache just as much as Python, and people install Apache in
> all sorts
> > of different ways.
>
> Yes, in Apache, mod_python is pretty much it. As far as the
> API goes, I
> think mod_python is an important one to look at at the design stage
> rather than trying to fit an API to it later, since Apache is fairly
> standard and mod_python is used by lots of different people.
> You don't
> want mod_python to have to be rewritten to comply with the API later.
>
I'm not sure that we should be arguing to include something that depends
on a specific environment like Apache in the standard library. We should
certainly be trying to promote a standard of some sort, however, which
seems to conflict.

I see the parallel more as being with the DB API - there are Oracle
modules and ODBC modules (which are cross-engine) and SQL Server modules
and so on. What we need is something to provide closely similar
interfaces to different web server engines - whether those engines are
in pure Python or external components.

The one problem I see with mod_python is its defaulting behavior - you
can get the same content several different ways. Specifically, the
following URLs

	http://server/
	http://server/index.py
	http://server/index.py.index

all refer to the same content, and this makes it rather difficult to
come up with a scheme for producing sensible relative URLs -- the
browsers don't always interpret the path the same way the server does --
which in turn can make it difficult to produce easily portable web
content.

While this is probably not an issue for the standard library I'd like to
know whether anyone has actually addressed the problem. My own solution
is to canonicalise everything to be explicit, but if there's an easier
way I'd love to hear it.

regards
--
Steve Holden          +1 703 278 8281        http://www.holdenweb.com/
Improve the Internet           http://vancouver-webpages.com/CacheNow/
Python Web Programming                http://pydish.holdenweb.com/pwp/
Interview with GvR August 14, 2003       http://www.onlamp.com/python/






More information about the Web-SIG mailing list