Difference between Methods and Scripts?
I see that the latest version of the O'Reilly Zope book now talks about Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*. Does this reflect some actual conceptual difference between a Script and a Method, or is it simply because of the burden of also renaming DTML, ZSQL, etc? I understand that it is recommended that logic be implemented using Python/Perl Scripts, while DTML Methods should now be reserved for presentation; but I wasn't sure if that could be the rationale for the Scripts/Methods division, since ZSQL Methods don't really fall into the presentation category. If the difference is explained in the book, please excuse my having missed it; if not, I'd welcome an explanation, and perhaps it would be worthwhile including it in the book too. Hamish Lawson ===== Hamish Lawson hamish_lawson@yahoo.co.uk ____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
On Thu, Dec 14, 2000 at 04:56:15PM +0000, Hamish Lawson wrote:
I see that the latest version of the O'Reilly Zope book now talks about Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*. Does this reflect some actual conceptual difference between a Script and a Method, or is it simply because of the burden of also renaming DTML, ZSQL, etc?
I understand that it is recommended that logic be implemented using Python/Perl Scripts, while DTML Methods should now be reserved for presentation; but I wasn't sure if that could be the rationale for the Scripts/Methods division, since ZSQL Methods don't really fall into the presentation category.
Hamish Lawson
The whole renaming mess has been unpleasant. The real problem is that method has a technical meaning in Python (and perl) that predate any usage in Zope. It happens that Python Methods do not have the same properties as methods in Python. This was felt to be too confusing. But, Methods do not have any technical meaning in SQL, or in DTML. So, it was felt that there was no large gain and much potential confusion in renaming something that people had been using for some time only to make it analogous to the renamed Python Method. I still want to see a thingy patch applied! Long live Python Thingies!
===== Hamish Lawson hamish_lawson@yahoo.co.uk
____________________________________________________________ Do You Yahoo!? Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk or your free @yahoo.ie address at http://mail.yahoo.ie
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
From: Hamish Lawson <hamish_lawson@yahoo.co.uk>
I see that the latest version of the O'Reilly Zope book now talks about Python and Perl *Scripts*, but refers still to DTML and ZSQL *Methods*. Does this reflect some actual conceptual difference between a Script and a Method, or is it simply because of the burden of also renaming DTML, ZSQL, etc?
DTML and ZSQL Methods (and the older Python Methods) act as though they are bound methods of the object on which they are called. Python Scripts aren't bound to any particular object, although they have access to their context, their container, and their selves. There could be a future class of DTML or ZSQL objects that behave this way, but they would probably be better named Templates than Scripts. Cheers, Evan @ digicool & 4-am
participants (3)
-
Evan Simpson -
Hamish Lawson -
jpennyï¼ universal-fasteners.com