[Zope-DB] writing a template to test if the sql worked

Philip Kilner phil at xfr.co.uk
Thu May 6 05:07:31 EDT 2004


Hi Charlie,

Charlie Clark wrote:
> No, DTML and all other forms of inline scripting are inherently evil.
> 

I'm interested in this statement, because it touches on something I 
don't feel I understand sufficiently.

Sure, DTML intertwines presentation and logic - but if I develop a ZPT 
which conditionally fires python script (e.g. for form validation, or a 
database write), is that any less "in-line scripting"?

> Speaking as a polyglot rather than a programmer: mixing database, procedural 
> and presentation code together is like mixing different natural languages 
> together and it is very easy to get mixed up and once that happens (and it 
> will!) it gets really difficult to work out what's actually being said.
> 

I've just made a transition in what I'm curently working on from using 
scripts which call ZPTs (Which I found mightily confusing WRT to 
namespace and scope issues - e.g. where a script called a ZPT which in 
turn called a script - yuck!), to exclusively using ZPTs which call scripts.

/I/ feel as though I've now got a much more intelligible paradigm - but 
I'm not sure that it doesn't still qualify as in-line scripting ... 
although of course in any one document there is no mix of logic and 
presentation (aside from a few conditional statements).

Comments?

-- 

Regards,

PhilK

Email: phil at xfr.co.uk / Voicemail & Facsimile: 07092 070518

"The lyf so short, the craft so long to learne" - Chaucer




More information about the Zope-DB mailing list