PSP, Cheetah, PTL, ZOPE, etc ...

Graham Dumpleton grahamd at dscpl.com.au
Sat Aug 4 06:01:24 EDT 2001


grahamd at dscpl.com.au (Graham Dumpleton) wrote in message news:<dc6f5c99.0108032114.c03a0a4 at posting.google.com>...
> tavis at calrudd.com (Tavis Rudd) wrote in message news:<f67cb2b7.0108031527.77c4af8 at posting.google.com>...
> > The docs are rather incomplete at the moment.  I'm about to upload the
> > latest version from the CVS, which is much more complete.  The
> > Velocity project (essentially Cheetah for Java) has some good
> > documentation at http://jakarta.apache.org/velocity/index.html
> 
> Had started looking at Velocity and if Cheetah is a similar thing for
> Python, then it is perhaps closer to what I am after. Not being able
> to find iteration etc in Cheetah documentation threw me and I hadn't
> had a chance to sift through the code as yet.

For what it is worth, Velocity looks pretty well what I am after. A
Python clone of it would be quite nice, although tweaks to make better
use of some stuff in Python would make it better. I guess I will have
to wait for updated documentation for Cheetah to get an understanding
of it. I trolled a bit through the CVS version of the documentation but
still can spot a least one thing which Velocity has which I see as useful.
Ie., an equivalent of #stop. Is there such a thing in Cheetah? It should
be simple to do as all it needs to potentially do is throw an exception
which is caught at the top.

Overall, the approach take by Velocity and Cheetah is what I am looking
for. In terms of functionality and interface, the balance is falling
towards Velocity. In the architecture I am dealing with, the service agent
framework provides an easy way of accessing objects outside of the scope
of the web page. In this sense, the aspect of Cheetah whereby one can
override the Python base class for the Python object generating the page
isn't strictly necessary. Will have to play and see.

At this point I guess the next question in regard to working out the best
approach to all this, is whether one goes the direction of interpreting
the page at the time of the request as I think Velocity might do, or to
pregenerate Python classes to handle the request. As with Cheetah, the
latter is also done in JWAA which someone else pointed out to me. My only
concern with precompiled code is that you either have to restart your
application when changes are made, or build in the smarts to rebuild classes
on the fly when the template file changes.

Can you tell me what happens in the Cheetah/Webware case. If template files
are changed, is the Python class automatically regenerated and reimported
into the program? Or am I totally misunderstanding how it works in this
respect? Is this dependent on whether you use the inheritance or containment
approaches? Perhaps the updated documentation will also answer this question.

Anyway, getting closer to where I want to be. :-)



More information about the Python-list mailing list