[Zope] mixing python and DTML is hellish!

kosh@aesaeion.com kosh@aesaeion.com
Fri, 1 Mar 2002 06:43:50 -0700 (MST)


On Fri, 1 Mar 2002, Chris Withers wrote:

> kosh@aesaeion.com wrote:
> >
> > Actually I don't think it is broken since I don't see them as the same
> > objects.
>
> Then your thinking is broken ;-)

Well we can certainly disagree on that one. ;)
>
> > 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?
>
I don't make pages where you have a table that spans a page. That is a
misuse of tables. Tables are for tabular data not for layout. Use divs for
layout and position them as needed. It works much better on the newer
browsers and it draws a lot faster. IE 4-6, Netscape 6.x, Opera, and
konqueror all handle that very nicely then you just put a netscape 4.x
version in to catch that browser and some of the older ones.

Overall I see a page as being broken if you have a table spanning it. :)

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

Well I do think just about everything could use that capability since it
expands what you can do by a good bit.

>
> > How do you select for which user agent that you will be editing the
> > source.
>
> How do you do it using your method?
>

I use a python product that I wrote and it has an inteface in it for
editing those items. I store the data in custom objects embedded in it and
then they have a filter based on the user agent being used to access them.
So in order to edit/see the code for various user agents you would just
check out the interface it has for editing those items.

> > 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? ;-)

Hmm when I looked at it before it was pretty bad. I kind of doubt it has
improved that much. :) However DTML does not make it worse it just doesn't
help fix the problem.