Newbie's 1st Web App decisions!

Geoffrey Talvola gtalvola at nameconnector.com
Fri Apr 5 12:38:43 EST 2002


Scrumpy wrote:
> I do like to separate style, layout, app and data and will 
> avoid using PSP, 
> Cheetah etc. completely or at least in ways which integrate 
> app code within 
> HTML pages.

Webware's PSP certainly doesn't require you to mix app code into your pages.
I use PSP extensively, but all of the app logic is contained in other Python
modules -- either WebKit Servlets which are used as base classes for the
PSP, or just as regular old reuseable Python modules.  The only code I
include in the PSP is simple presentation-level stuff like if statements,
for loops, etc. that you need to render the page properly based on the data.
It's all very natural and easy with Webware's PSP.

I think that the *SP model got a bad reputation from Microsoft's Active
Server Pages, where the methods for splitting out your app logic from your
presentation logic require more labor-intensive techniques like writing the
app logic into "middle-tier" compiled Visual Basic COM objects or writing
"scriptlets" in a combination of VBScript and an unusual XML-ish wrapper.
So many people wound up just including the app logic directly in the ASP
pages because it was easier.  But really, Webware's PSP's make it so easy
and natural to separate out your app logic into Python modules that you
can't use that as an argument against PSP.

A better argument against PSP is that it isn't web-designer-friendly.  That
was a primary motiviation for creating Cheetah -- because its syntax is
considered better for non-programmers than PSP's syntax.

- Geoff





More information about the Python-list mailing list