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

Tavis Rudd tavis at calrudd.com
Thu Aug 2 14:01:22 EDT 2001


Graham,
I think you might have gotten the wrong impression about what Cheetah
is, how it works and what it's capable of.

http://www.CheetahTemplate.org/learn.html

Graham Dumpleton wrote
> at applying this to though, as I am not sure an approach like Cheetah
> gives sufficient power to interact with the back end system. I guess
> this derives from the fact that I am not really after just a templating
> system for HTML pages. 

Nothing about Cheetah's core is HTML-specific. It's a code-generator
that can be used to generate any sort of text output.  Also, if you
don't like using '$' to mark out your insertion points you can change
it to any other character sequence: a useful feature if you are
generating PERL, shell or PHP code from Cheetah.

> Although with a template system like Cheetah you might be able to map a
> function to a particular exported method of a service, as far as I can
> see, it would always be the case that such a function must return text
> capable of being included into a web page. 

Cheetah works with any type of data, not just text. It doesn't force
you to do anything like that.

> With PSP, the method of a
> service object could return some data structure, which the in place code
> could iterate over to produce the actual HTML.

Like PSP, Cheetah can iterate over data structures in place.  Please
take a look at the Cheetah Users' Guide for more information:
http://www.CheetahTemplate.org/learn.html
Again, nothing about Cheetah's core is HTML-specific.

> To this end, approaches relying on Python
> scripting in some form, such as PSP or PTL may result in a system more
> able to harness the features of the back end system.

Cheetah has a plugin that enables PSP, if that's what you really want.
 However, *SP style coding quickly becomes a tangled mess.  Cheetah
was designed to provide a cleaner separation of content, graphic
design and program logic than the *SP languages.

> In the architecture I have, I guess I am uncomfortable about having code
> related to presentation mixed up in the service objects. 
> I suppose that
> some service objects may specifically relate to presentation, but in the
> main I would want to preserve the idea of services returning data related
> to the model, rather than a view of that model.

Ditto. That's exactly why I dislike PSP, PHP, etc. and is why we
created Cheetah.
 
Cheers,
Tavis



More information about the Python-list mailing list