[Zope] mixing python and DTML is hellish!

Peter Bengtsson mail@peterbe.com
Fri, 01 Mar 2002 20:58:01 +0100


I actually agree very much with Chris on this DTML vs. ZPT.
My experience is this:

- ZPT has more advantages that DTML in total
- ZPT has disadvantages
- DTML is for quick and dirty publishing, ZPT is for more serious 
longlasting things
- DTML is easier to understand for the novice (or is it because ZPT is not?)
- A site with DTMLed templates tend to be a big bunch of templates and ZPT 
seems to be fewer with many more Python Script objects
- ZPT is less suited for the little textarea editing
- DTML is less suited for Dreamweaver and such which is after all pretty 
important if we want to get paid for our work.

So, conclusion:
  * ZPT for longer lasting more scalable sites
  * DTML for quicker things where workflow and stuff like that doesn't matter

Peter


Oh! One other thing. A clearly negative thing about ZPTs is that it seems 
more difficult to learn and understand. I.e. the usability of ZPT is worse 
than DTML and I know that exactly this is something Zope.com does not want 
happening to Zope.





At 13:23 2002-03-01 +0000, Chris Withers wrote:
>kosh@aesaeion.com wrote:
> >
> > Can you call ZPT documents from other ZPT documents and so on without
> > having them pull in headers, footers etc at each step.
>
>Yes
>
> > Also how do you
> > deal with user agent detection such that you have a page that changes
> > depending on the requesting agent so that you have one url to x object and
> > x object does not always look the same.
>
>You can have a dynamic macro expansion :-)
>
> > Actually I don't think it is broken since I don't see them as the same
> > objects.
>
>Then your thinking is broken ;-)
>
> > location. Overall I don't think of a page as a single document I think of
> > it as a collection of objects that each does a job and only that job.
>
>You said that before, and I agree, so how do you handle the case where you 
>haev
>a table containing other objects? I half the table in the header and half 
>in the
>footer?
>
> > DTML looks to me to fit that concept better then ZPT does.
>
>Look harder!
>
> > However now you have defined it as html which is not always the case.
>
>Gimme some other cases where ZPT wouldn't work, go on, I dare ya ;-)
>
> > Overall that looks more complex to me then just calling the objects and
> > allowing them to behave as needed.
>
>That's just because you haven't seen it before, I can assure you its a lot
>simpler...
>
> > Actually we have been doing it for a lot more then 6 months now without
> > any problems. Introspection and reflection are not really that magical but
> > they do allow an object to react based on its surroundings.
>
>I agree, but ZPT does not proven intospection or reflection, it just doesn't
>require them.
>
> > How do you select for which user agent that you will be editing the
> > source.
>
>How do you do it using your method?
>
> > Overall if you adhere stricly to the DOM and follow the spec to the letter
> > that is not a problem. xhtml 1.0 strict is really not hard and if you use
> > it properly and know how the browsers work you can speed up page drawing
> > and make it easier to develop.
>
>ZPT has no requirement for xhtml 1.0.
>
> > Overall I am not happy with any generated code from any application I have
> > seen so far. They are often embarassinly far from the spec and most abuse
> > tables which slows down page rendering.
>
>Have you seen the HTML generated by Squishdot's DTML? ;-)
>
>cheers,
>
>Chris
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )