[albatross-users] Re: Python embedded like PHP

Duncan Booth duncan at NOSPAMrcp.co.uk
Mon Mar 25 05:03:21 EST 2002


Dave Cole <djc at object-craft.com.au> wrote in 
news:mailman.1016855556.16177.python-list at python.org:

> You are forced to embed programming logic which is used to dynamically
> alter the presentation of the interface directly inside the
> presentation elements.  I have a feeling that this makes the whole
> template unduly fragile and resistant to change.

I would have said you are forced to remove almost all programming logic 
from the template entirely and wrap it up in a separate script. All that is 
left in the template is the display logic.

> The idea that an HTML developer who does not understand ZPT will be
> able to ignore the ZPT attributes and just change the interface in
> isolation is a fantasy.  The ZPT attributes define an executable
> program - their correct placement is critical to the functioning of
> the template.  Note that the same is true of Albatross tags, but you
> can change the HTML in isolation to the Albatross tags.

I agree with you here up to a point. I would break down the roles into html 
developer who needs to know some ZPT, presentation developer who just needs 
to know what not to touch, and content developer who just needs to know 
which parts of the page require content.

You can even edit ZPT using Microsoft Frontpage, and mostly things don't 
break. If someone is simply adding content to a specified cell in a table, 
then they can edit happily within that cell. It would be nice though if the 
HTML editor could somehow be told to make the rest of the template 
readonly.

I think that until I actually used ZPT, it wasn't obvious just how good a 
job it does of separating the logic, the presentation, and the content. In 
particular the CMF skins help a lot.

-- 
Duncan Booth                                             duncan at rcp.co.uk
int month(char *p){return(124864/((p[0]+p[1]-p[2]&0x1f)+1)%12)["\5\x8\3"
"\6\7\xb\1\x9\xa\2\0\4"];} // Who said my code was obscure?



More information about the Python-list mailing list