An oldnewbie writes (Was [Zope] DTML?)
Date: Mon, 10 Jul 2000 17:49:25 -0400 From: Shane Hathaway <shane@digicool.com> Organization: Digital Creations, Inc. To: Chris Withers <chrisw@nipltd.com> CC: zope@zope.org Subject: Re: [Zope] DTML?
Chris Withers wrote:
[snip]
I also think having Python Methods ship with Zope would really help...
I'm working on enhancing Python Methods right now. I'm close to getting them properly interfaced with DTML namespaces, so that DTML can invoke Python Methods using simpler DTML syntax.
I've followed this thread with particular interest. I'm almost 18 months old with Zope and have done many useful things with it. But my journey up the learning cliff has been punctuated by spells of doing other things (I'm not a programmer in real life) during which I inevitably forget most of what I've just learned about DTML (and slip back down the cliff). OK, this is true of most things (computer languages, foreign languages, mental arithmetic, parenthood, etc) - if you don't use it, you lose it. But there is something about DTML that distinguishes it (for me) from other languages - it's the rate at which it decays on you. Python's decay constant is much more favourable. So I've learned a rule of thumb - if I'm writing DTML and it isn't flowing then I really ought to be using Python. PythonMethods are nice but, as they stand, you only have access to built-in functions. So if you want to import modules you have to resort to External Methods. [Am I talking nonsense here? My empirical experience is that I can use string functions in a PythonMethod but not, say, stuff from the time module. Neither string nor time are built-in though ..... so why one and not the other?] The point of these reflections: * PythonMethods ought to be a high priority IMHO. * DTML is holding Zope back for the rest of us (and is arguably a "proprietary" component of Zope (in that you can't use it anywhere else) - this is a disincentive to many power-Perl,JSP,<name-your-scripting-poison> users I suspect. * Please can we import Python modules from PythonMethods (or can we already and I don't about it, or does this break the sandbox that PythonMethods is meant to provide)? * Don't worry about changing DTML syntax. It's an excellent marketing ploy to ensure good sales of the 2nd edition of The Zope Book ;-) Apologies for any misconceptions in any or all of the above. Paul -- The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK E-mail: paul.browning@bris.ac.uk URL: http://www.bris.ac.uk/
--On Wednesday, July 12, 2000 9:23 AM +0100 Paul Browning <paul.browning@bristol.ac.uk> wrote: [snip]
So I've learned a rule of thumb - if I'm writing DTML and it isn't flowing then I really ought to be using Python. PythonMethods are nice but, as they stand, you only have access to built-in functions. So if you want to import modules you have to resort to External Methods. [Am I talking nonsense here? My empirical experience is that I can use string functions in a PythonMethod but not, say, stuff from the time module. Neither string nor time are built-in though ..... so why one and not the other?]
The point of these reflections:
* PythonMethods ought to be a high priority IMHO.
[snip] Thanks for http://dev.zope.org/Wikis/DevSite/Projects/PythonMethods/PythonMethods/Fron tPage which answers my questions. I'll watch this space with interest. Paul -- The Library, Tyndall Avenue, Univ. of Bristol, Bristol, BS8 1TJ, UK E-mail: paul.browning@bris.ac.uk URL: http://www.bris.ac.uk/
Paul Browning wrote:
OK, this is true of most things (computer languages, foreign languages, mental arithmetic, parenthood, etc) - if you don't use it, you lose it. But there is something about DTML that distinguishes it (for me) from other languages - it's the rate at which it decays on you. Python's decay constant is much more favourable.
I think this would be a very useful metric to measure how effective any improvements to DTML are, can you stick it in the relevent wiki somewhere?
So I've learned a rule of thumb - if I'm writing DTML and it isn't flowing then I really ought to be using Python.
This isn't always true IMHO...
PythonMethods are nice but, as they stand, you only have access to built-in functions. So if you want to import modules you have to resort to External Methods. [Am I talking nonsense here? My empirical experience is that I can use string functions in a PythonMethod but not, say, stuff from the time module. Neither string nor time are built-in though ..... so why one and not the other?]
I hope you're talking nonsense ;-)
The point of these reflections: * PythonMethods ought to be a high priority IMHO.
Very much so...
* DTML is holding Zope back for the rest of us (and is arguably a "proprietary" component of Zope (in that you can't use it anywhere else) - this is a disincentive to many power-Perl,JSP,<name-your-scripting-poison> users I suspect.
I think all these scripting poisions are proprietery and will remain so in that sense. The sad fact is that DTML ranks amoung the worst of them right now, IMVHO...
* Please can we import Python modules from PythonMethods (or can we already and I don't about it, or does this break the sandbox that PythonMethods is meant to provide)?
Would be nice, if not, reasons why not... :-)
* Don't worry about changing DTML syntax. It's an excellent marketing ploy to ensure good sales of the 2nd edition of The Zope Book ;-)
heh :-) Well, thanks for your views, I guess you started when it was still <!-- --> ? ;-) cheers, Chris
participants (2)
-
Chris Withers -
Paul Browning