On Wednesday 31 October 2001 12:36, Tim Roberts wrote: > Even though I've actually implemented a small WebWare site, I'm > still trying to grasp the 10,000 foot view of all the tools. I > have a specific question about PSP. > > Am I correct in thinking that PSP is, essentially, just syntactic > sugar? As I read the doc, it looks to me like a PSP-based page is > fed into a translator that produces a Python module -- a temporary > servlet -- which is then passed into the Python interpreter to be > executed. Is that the model?
Yes, but it would be more accurate to say that the PSP is 'compiled' into a Python servlet. > How many server invocations am I paying for in that scenario? Is > the PSP translator persistent? The big benefit of ASP, at least, > is that the interpreter lives in the server, so there is little > penalty. Is the same true here, or do I get one invocation to > translate, and another to interpret the results? The PSP-to-Python compilation is once off, unless the source file is changed. Thus, there is no extra cost after the first request. > For those of you that use PSP: do you find that the syntax is > actually easier to maintain than a straight Python scripts with > HTML in """quoted strings"""? Yes, and no. It is common to use PSP for the frontend and do all the backend processing in pure Python classes that are inherited by the PSP classes. MS calls this the 'code-behind' method with ASP. While PSP is better than pure Python for the front-end stuff, there are alternatives that are better suited for this task. Check out Cheetah (http://www.cheetahtemplate.org). Cheers, Tavis _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss
