[Zope] Augmenting Structured Text (Re: <% ... %>) ?

Martijn Faassen M.Faassen@vet.uu.nl
Tue, 15 Jun 1999 18:50:30 +0200


Jules Allen wrote:
> 
> At 04:55 PM 6/15/99 +0200, Martijn Faassen wrote:
> >Yes, I'll add a 'me too!' here. Looking like Python is very important.
> >DTML is too Perlish in that it has verbose syntax with a lot of weird
> >characters, and too many ways to do the same thing at times.
> 
> Much as I dig Python, I'd have to disagree on this one. 

Do you disagree that DTML currently is rather Perlish and obfuscated?
The ideal DTML is (as Chris Petrilli just said in his reply to me) a
reporting language. If anything, the ideal DTML is *less* powerful than
the current DTML. I think that in fact we agree on this. :)

Of course my post that you are responding to was confused in that it was
trying to push two concepts at once:

* Cleaner DTML syntax, perhaps reached by stealing from Python? (unclear
if this works, though I try to defend it in my reply to Chris)

* More importantly: Clear, nice, Python way to do complicated things.
Some attempt at DTML-in-Python will follow in a later post.

[snip]
> DTML as it is right now is
> too hard for simpletons, erm, average users to write this stuff. And yes,
> the Perl-like line noise doesn't help.
> Keeping DTML simple (and
> simplifying the namespaces as you point out is an excellent example of
> simplification) will advance it. Obfuscation will prevent its acceptance. I
> have seen the light, brother!

So we *do* agree. 

The path to more Zope power as I see it now:

We need the Ideal DTML, and we do this by making it cleaner and if
necessary even less powerful than it is now. More complicated stuff
should be done in something other than DTML, and that other thing should
(of course) be Python (unless it's something SQL can do well). Current
Python ways to do things are however too hard to use for a number of
reasons, so people misuse DTML for it. 

The Python way should be able to do at least what the DTML way can do
(though should leave most of that to DTML), but much more as well. It
should share with DTML the security/safety mechanism for expressions,
and be manageable with the Zope web interface.

> >I think what we need is a way to somehow visually and syntactically
> >clearly distinguish what is HTML and what is DTML or even better
> >something closer to what Python is. Perhaps turn things around and mark
> >the *HTML* instead of marking the (Pythonic) logic.
> 
> Like CGI.pm? Ouch! Have you ever tried to do anyting *big* in CGI.pm? :-)

I have never used CGI.pm, and barely know Perl to my relief. :)

> You don't want to, trust me. I think that's a slippery slope.

I already know I don't want to. As I describe in my reply to Chris, I
was mixing two things together and talked about syntactic and semantic
changes at once. See my post to him for more details on the syntactic
changes.

> Suddenly there will be More Than One Way To Do It and we all know where
> that'll lead. Ask anybody who's had to use Lotus Domino and learn both
> LotusScript and the obscure @Macro Language.

I'm trying to make things cleaner, not harder. I was never proposing to
throw away DTML (or its equivalent, Ideal DTML) completely, though I
admit I sounded that way in my post.
 
> I-hope-we-can-still-be-friends-ly yours,

Of-course-we-can-ly yours,

Martijn