[Zope] Zope needs this (and Dynamo has it)

Shalabh Chaturvedi shalabh@pspl.co.in
Fri, 10 Mar 2000 14:29:37 +0530


Martijn Faassen wrote:
> Shalabh Chaturvedi wrote:
> > I don't think a new syntax should be brought about. There are too many
> > things
> > to learn already, it will only add to the confusion.
>
> That's true, but that shouldn't hold us back indefinitely; some things are
> can only be improved after a while if they're redesigned from scratch,
> otherwise the back-compatibility issues become too complicated. I don't know
> if DTML is at this state though, and any new language proposal should be
> something to consider for the (very) long term.

If we can gather enough support for something like this, I'm all for it.

> > I would favour for a somewhat
> > different paradigm:
> >  [ paradigm snipped ]
> >
> > The advantage here is that:
> >    o   One logical presentation element (a table) is one element in dtml
> >         code.
>
> But you lose some flexibility in defining table headers and footers;
> you have to be careful your simple language becomes too rigid, making
> too many assumptions.

Um, no. Since the code that defines 'layout.table' is also available and
editable, (just like any other object).
So you can not only code the specific header you want into the object, but also
create a parameter which can be used like so:

 <dtml-var object="layout.table">
   <param name="datasource" value="get_above_age">
   <param name="columns" value="Name,Age">
   <param name="table_tagattrs" value=" border=0 bgcolor=green">
 </dtml-var>

>
> >    o   One-to-one relation is possible between the code and any GUI entity
>
> Hm, what you're proposing is some higher level object (a product) that
> does tables (in this case). That would in fact be rather neat.. Our simple
> glue language could become extremely simple if we have sufficient higher
> level components, and if it's easy enough to code up your own components.
> I'm doing something like that for web forms in my ZFormulator product.

I learnt you're doing something similar (from Rik). I have to look at it.

What I'm suggesting is that instead of having to create a product every time
you want a higher level object, we could have a framework so that you could
just create an object that does it. The goal would be to make it easy for
everyone to code their own component objects (or templates, or patterns,
or whatever)

Another thing I would like is that people start looking at 'documents'
differently. Instead of 'my_element_header' and 'my_element_footer', people
think of 'my_element' which takes one or more parameters. (Please don't flame
me, it's Paul who started all this :-)

PTK List thread:
http://lists.zope.org/pipermail/zope-ptk/2000-February/000347.html

Zope-Moz List Thread:
http://lists.zope.org/pipermail/zope-mozilla/2000-February/000125.html

Cheers,
Shalabh
______________________________
Shalabh Chaturvedi
icq://43284067
http://advogato.org/person/shalabh/