Re: [Zope-dev] Task, Job or Operation?

2000-10-23 Thread Chris Withers

[EMAIL PROTECTED] wrote:
 I can see four potential properties that one could want to emphasize
 about a python method.
 
 1) It is safer (to the Zope server) than a python external method.
 2) It safer to the end user than a JavaScript (it never touches the client).
 3) It uses python, and not something else as its implementation technique.
 4) In OO terms, it is not really a Method.

Good points :-)

 Hence the preference for Safe in the name.  Even a newbie ought not to
 be able to cut himself too badly on a python method.

I dunno...

 descriptive.  Widget has technical meaning.  Perhaps task or job are
 suitable, as in
 Safe Python Task
 Safe Python Job

Nah, they have too many cron-esque associations. Sounds like things to
be found on a to-do list on in a schedule of some sort.

 Safe Python Subtask

:-(

 Then external methods, which are often also not methods, can become
 Flexible Python Task

Well, felxible doesn't really explain a lot. Filesystem is probably the
most explicit.

I dunno, I actually like Jeff's suggestion of Operation giving you:

PythonMethod- Python Operation
External Method - Filesystem Python Operation

The same could also apply to DTML and Perl Methods. A nice side effect
is that you could have Filesystem DTML Operation replace those horribly
named HTML File objects you get when use grab your DTML out of .dtml
files on disk. Especially as they bypass all known security ;-)

cheers,

Chris

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Task, Job or Operation?

2000-10-23 Thread Ken Manheimer

Huh.  We're looking for something neutral, to connote code that runs in
zope to do some business logic or similar effect.  It should distinguish
the language used to express the logic - perl vs python vs xslt,
etc.  I hate "script", but it occurs to me that the "-let" convention may
be useful:

Python Zopelet
Perl Zopelet
XSLT Zopelet

Zope-specific, runs on the server, shows the implementation language,
won't be confused with non-remotely-editable functions, methods, scripts,
code in general.

This is the first one with which i'm comfortable - but i may well have
missed something.

Ken
[EMAIL PROTECTED]


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )




Re: [Zope-dev] Task, Job or Operation?

2000-10-23 Thread jpenny

On Mon, Oct 23, 2000 at 03:07:25PM -0700, James Johnson wrote:
 Is there a Wiki or some other starting point for this thread. As a 
 newbie I like safe vs power over anything else.  I also understand 
 that with using anything in a power mode can be risky for a newbie.  
 It's nice to know that I can start out learning in a safe mode and 
 then graduate to a power mode after learning more. Is there a 
 ZopeScript and why not? Safe ZopeScript can be written in using other 
 scripting languages.  Zopelet imho is not as marketable as ZopeScript.

OK, this is the problem.  There are several ways of writing executable
code available to other objects in Zope.  One is the Python Method.
It is available from http://www.zope.org/Members/4am/PythonMethod

From 4am's page:
PythonMethods will not allow assignment to an attribute, element, or slice. 
No "del" is allowed.  Names starting with "_" are not accessible. Import 
is controlled. Globals all live in a private namespace.

There is a proposal to call this construct a Zope Script.  And your
message is exactly the ammunition I wanted.  Thanks!

The other way to script in python is currently called an External
Method.  Since perl is being added as a Zope scripting option, this
will clearly have to be renamed, as well.  External Methods have none
of the restrictions of PythonMethods.  This makes it quite easy to escape
all Zope security, to crash Zope, and to do other nasty things.  Needless
to say, Zope hosting sites do not generally provide External Methods.

There is no ZopeScript, and probably never will be.  What would
ZopeScript do?  Would it be a construct like JavaScript that was
executed on the client's computer?  If so, every browser vendor would
have to support it.  This is unlikely, to say the least.

Is it server side?  Then DTML, PythonMethods (to be renamed), PerlMethods
(which don't exist yet), External (Python) Methods, External Perl Methods
(which also don't exist yet) give plenty of scripting options, without the
need for another language.

It is not at all clear that Safe scripting methods (in the strong sense
meant here, meaning that it can neither damage the client nor the 
server), can be written in languages other than Python (I have
heard some doubts expressed about perl).

And, there is generally no need to "graduate" to external (power)
methods.  You only need to use an external method when you need a
module not imported by Zope (not available through the _ namespace).

So, you have written several things in your message that really
bolster my dislike for both zope script and power as terms.
1) You have gone from the word Zope Script to a separate language
ZopeScript in a single bound.  2)  You have assumed that you will
want to "graduate" from Safe Methods to "Power" Methods (You don't,
external methods are last resort options).  3)  "Power" methods
don't require a lot more learning than Safe Methods.  You have
to learn what modules are available, but you are using the same
language in either case!

Maybe my suggeston of flexible is to weak.  Maybe they should be
Escape Hatch Python Operations (Escape Hatch Python Zopelets)!

   When you call it operation, method, or function it takes it away 
  from it's context.  This is zope specific right?  Excuse me while I 
 use safe ZopeScriptPython or power ZopeScriptPerl.

Not really Zope specific in the sense you mean.  It is an object (not
in the OO meaning) that can be called from a Zope site.  But the 
language is pure Python (perl), with no modifications, and usually
can be snipped and executed outside of Zope.

 
 
 Get your Free E-mail at http://tacoma.zzn.com
 
 Get your own Web-Based E-mail Service at http://www.zzn.com
 
 ___
 Zope-Dev maillist  -  [EMAIL PROTECTED]
 http://lists.zope.org/mailman/listinfo/zope-dev
 **  No cross posts or HTML encoding!  **
 (Related lists - 
  http://lists.zope.org/mailman/listinfo/zope-announce
  http://lists.zope.org/mailman/listinfo/zope )
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )