[PEAK] Does a PEAK-ized webware esist ?
Wayne Larsen
wayne at larsen.st
Thu Jan 29 20:18:39 EST 2004
Phillip J. Eby wrote:
>> Looking at peak.ini, it appears that there is support for this style of
>> configuration file / path setup, but I have no idea how that would be
>> used.
>>
>> A lot of open issues for me -- any comments?
>
>
> It looks to me like you're going for a structure based on directory
> layout and dynamic discovery, similar in some ways to what I did with a
> previous framework, ASDF. 'peak.web' is my attempt to get as far *away*
> from that architecture as possible, even though I'll admit that it does
> offer some very enticing "instant gratification".
>
Webware currently behaves this way, with the option of turning on
ExtraPathInfo so that a single servlet can handle multiple paths,
removing the url/path coupling. My app currently behaves this way, so
actually this is not a strict requirement for _my_ application, but for
maximum flexibility it seemed to be a decent solution.
> The shortest route might be for you to use peak.web.resources, and
> define your own factory types for the various sorts of objects you want
> to have in the directories. The way this stuff is set up, you could
> write the entire app inside of the resources, as long as you're okay
> with all your URLs starting out '/++resources++/my.package/'. :)
>
Well, with mod_rewrite in Apache, this is not an issue, as long as full
control of the rest of the url is possible.
> But, personally, I think you might find it an uphill battle, since it's
> not really intended for that development model. peak.web assumes you
> are creating a Python application in normal Python "module space", and
> that the hierarchical structure comes from the hierarchy of your "view
> components". Resources can then be either objects that are needed by
> the view components to do their thing (like page templates for their
> methods), or static data served up as things like images, scripts, PDF
> files, or whatever. It's not really designed for building the
> application out of the resources, though you certainly could do it if
> you set your mind to it.
It would be great to get an example of how that would be constructed.
Wayne
More information about the PEAK
mailing list