At 02:18 PM 1/8/02 +0000, McDonald, Ross wrote: >Sorry about the garbled message, I think its to do with hotmail and slow >internet connection. >Anyway, the gist of it was, are their any examples lying about of good >practices to employ in psp pages where we seek to separate content from >presentation, and are their any sample pages of the type where we connect to >a middlekit layer and therefore access sql database?
I don't have any samples to refer you to. But I can at least mention the way I separate content from presentation. I put the methods that provide the "content" into base classes that are derived from Page. Actually I have a whole hierarchy of base classes depending on the type of web page. These base classes are located in a separate Python package -- they are not in the context directory. Then the context contains PSPs which are used to present the content as HTML. This is done by making the PSP inherit from the correct base class (see the PSP documentation for details on how to do this) and then the PSP utilizes the methods of the base class to fetch the content and format it appropriately as HTML. In this way you can have a very minimal amount of Python code in your PSP's -- just a few imports, looping, conditionals, calls to formatting functions, etc. -- - Geoff Talvola [EMAIL PROTECTED] _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss