[ZPT] Lots of HTML in a frame - ZPT or Python script?

David Mitchell djmitchell@optushome.com.au
Wed, 12 Mar 2003 23:37:22 +1100


Hello group,

I'm at a point in my project where I have to code up the following, which will 
be presented as a single frame of a page:

if variable == 'A':
    render about 500 bytes of HTML
elsif variable == 'B':
    render a different 500 bytes of HTML
elsif variable == 'C':
    ...

All up, the variable can take any of maybe 30-40 different values, and each 
option will mean I have to present a different ~500 bytes of HTML.  That's 
quite a bit of content for a single frame!

If I do all this in ZPT, I'll be left with a huge block of code, and it will 
probably take quite a while for the ZPT page to be drawn each time someone 
hits it.  A plus is that it should be easy for a Web coder to maintain, since 
ZPT pages can be maintained pretty well using e.g. Dreamweaver; all this HTML 
is going to change periodically, and I'd prefer to use a cheap HTML jockey to 
do that sort of work.

If I do it all in one or more Python scripts, I can "hide" all the HTML away, 
and should be able to deal with it in fairly discrete chunks.  I should be 
able to code it so the HTML content gets presented to the user significantly 
faster, since Python scripts seem to run significantly faster than ZPT pages, 
and I should be able to break it all up into several different chunks.  
However, it's not realistic to have a HTML coder try to maintain a bunch of 
Python scripts, so it will be more expensive in dollar terms to maintain this 
particular block of code.

Has anyone faced a similar sort of task?  Any suggestions on the best way 
forward?

Thanks in advance

Dave Mitchell