[albatross-users] Re: Python embedded like PHP

Dave Cole djc at object-craft.com.au
Mon Mar 25 08:45:44 EST 2002


>>>>> "Duncan" == Duncan Booth <duncan at NOSPAMrcp.co.uk> writes:

Duncan> Dave Cole <djc at object-craft.com.au> wrote in
Duncan> 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.

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

That is the best way to go IMO.  ZPT seems fine to me except in the
coarser aspects of template programming.  Control flow in particular
just does not look right to me.

>> 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.

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

Are you suggesting that there are three different people would work on
the same template file?

IMO there would be some sort of graphic design done which may not
necessarily produce useful HTML - that design would be taken by the
content developer who would then build the template.

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

I expect that most HTML editors are pretty good when they encounter
stuff that they don't understand.

Duncan> I think that until I actually used ZPT, it wasn't obvious just
Duncan> how good a job it does of separating the logic, the
Duncan> presentation, and the content.

You are talking my language there.  One of the things which makes me
dislike PHP is that there is little effort to perform separation.
Sort of what you would expect from a perl for web pages.

Duncan> In particular the CMF skins help a lot.

I haven't looked at CMF skins.

- Dave

-- 
http://www.object-craft.com.au



More information about the Python-list mailing list