[Zope] Re: What causes the community to stall so often?

Danny William Adair danny@adair.net
Tue, 12 Mar 2002 09:38:04 +1300


> On Sunday 10 March 2002 9:43 pm, Terry Hancock wrote:
> >             (e.g. why not represent
> >             "sequence" as a Python class with "item", "index"
> >             attributes and/or "odd()" "even()" methods).
>
> Hmm, this sounds familiar.... how well did you look at ZPT exactly?
>
> >             (for example), instead of the ridiculous
> >             work-around:
> >
> >             _.getitem('sequence-item').absolute_url()
>
> Not pretty, is it?  Glad I don't use DTML any more.  ZPT is nice and clean.


For the sake of completeness, I would just like to add that the "hyphen 
problem" has been identified quite a while ago, and "sequence-item" has been 
kept for comptatibility reasons only. Instead of getting rid of it totally, a 
"prefix" attribute has been added to the in-tag (and all variables used 
there), so that you can do stuff like

<dtml-in mysequence prefix="loop">
  <dtml-if loop_start>
    <dtml-var "dosomethingwith(loop_item)">
  <dtml-else>
    <dtml-var loop_var_thisisavariableofthecurrentsequenceitem>
  </dtml-if>
</dtml-in>

which also allows easy implementation of nested loops (different prefixes).

I find it alright to have and keep the choice of two approaches (DTML/ZPT) as 
long as the mere existence of the one doesn't negatively influence the 
performance or whatever of the other (which is not the case here).

For the same reason I appreciate it that ZClasses still exist:
If you don't need'em, don't use'em.

I would find it quite a hard task to decide what to keep and what to chuck, 
and imho ZC did quite a good job up til now. The "big step" incorporating at 
least most of the prior experiences in the development of Zope is not far 
away after all (Zope 3).

Cheers,
Danny