On April 26, 2002 06:06 pm, Terrel Shumway wrote:
> http://webware.colorstudy.net/twiki/bin/view/Webware/UriMapping is for =
a
> concrete implementation that can go into Webware RSN that can replace
> the current filesystem-centric mapping strategy.
Tangent 1
-----------
This URI topic is somewhat related to how contexts/packages are loaded in=
to=20
WebKit. The current implementation of ServletFactory relies on the 'imp'=
=20
module and thus can't take any advantage of custom import hooks. As a=20
result, you have to create a new servlet factory for .tmpl files, .psp fi=
les,=20
etc., in addition to any import hooks you've written. =20
The code in ServletFactory.importAsPackage() and=20
ServletFactory._importModuleFromDirectory could be refactored to allow it=
to=20
work with import hooks and remove the need for a separate ServletFactory =
for=20
each extension. It should be possible to use a single ServletFactory for=
=20
=2Epy, .psp, and .tmpl servlets once the refactoring has been done and an=
=20
import hook has been written for .psp files. =20
Tangent 2
-----------
The current implementation of psp doesn't allow one psp servlet to seemle=
ssly=20
inherit from another psp servlet. An import hook would make this possibl=
e.=20
Ditto for .tmpl files. I've written an import hook for .tmpl files (usin=
g=20
Gordon McMillan's ui.py rather than ihooks or imputils, which are both ba=
dly=20
broken). See ImportManager.py and ImportHooks.py in Cheetah's CVS. It=20
should be fairly simple to extend this to work with PSP as well. Anyone=20
interested?
Tavis
|