[Zope3-dev] IMPORTANT RFS: Through the Web Site Development

Jon Whitener wmmail@twmi.rr.com
Mon, 13 Jan 2003 16:49:33 -0500


Jim:

Your responses seem to describe a Zope 3 world where either users restrict themselves to content-space scripts and pages, or they are full-fledged Python programmers who can hack out a module for every purpose.  I think this neglects a large audience of Zope users, and further, ignores one of Zope's most attractive features.

Joachim Werner nailed it directly on the head when he said:

>If there are TTW ways of writing or adapting custom (real) Python classes,
>nobody will miss ZClasses.

Forgive me my ignorance: despite working in Zope nearly full-time for several months now, I have never created a full Python module, let alone a Zope persistent Python module.  I don't even know what they look like (I've written a handful of Script (Python)s).

I'm going ahead, however, and assuming that (for any non-Python-programmer) a Python module is less easy to create than that point-and-click thing everyone wishes worked better, the ZClass.  

Dider Georgieff makes a strong point I wish to second:
>I've used ZClasses with great success in this area (popoto), and now
>that the new developments (CPS) are done (by a Zope company) in the
>"right" way (python products, fs,...) i loose some great advantages i
>had.
>
>Having best of both words in Z3 will make my IT manager day without any
>doubt, and bring me back in control.

I propose that the exciting and compelling *idea* of ZClasses should be revisited and reimplemented in a way that allows Zope users to create Python modules with the ease and speed of current ZClasses.

If I understand correctly, persistent modules would replace ZClasses, but you need to be a Python programmer to create them.  ZClasses are easy and fast to create even for the beginner, and allow people to simply create Zope objects that model their business realities, but are buggy and fragile.

Is there no middle-ground, or hybrid, between these two things?

(If you'd like my real world example of using ZClasses, I'll be happy to describe it upon request.)

Jon Whitener
Detroit Michigan USA


At 1/13/03 01:33 PM -0500, Jim Fulton wrote:
...
>Stephan Richter wrote:
>...
>>What I noticed is that we will have an awesome system for people that know Python and understand the CA.  On the other hand we will loose about 70-80% (wild guess) of the current Zope 2 TTW developers, who do not know any Python and have difficulties to understand it.
>
>That is a wild guess. I wish I knew what the real numbers were.
>
>One wonders what they *do* know, if not Python .... of course,
>you answer that below....
>
>>I am pretty sure that there are many, many sites out there that are written using one of the following two options:
>>
>>1.) They only use the standard Content Objects that are provided by default in Zope 2 (maybe they download another product or two). Then they use ZPT and DTML to do all the logic. Note: I do not think that much Python Script is used unless someone on the mailing list gave it to them.
>
>So they don't know Python, but they *do* know dtml and zpt.  Certainly,
>they have to *learn* these to use Zope.  Of course, we're being pretty vague
>about what we mean by logic.
>
>Any non-display logic in DTML or ZPT is Python, so they are probably using some Python
>anyway. But maybe you are talking about people who just do simpler interaction,
>conditionals and data insertion.
>
>I think that this group of users is best served by content-space scripts and pages.
>
>>2.) They use ZClasses (because they understand sort of OO programming) and use scripts often DTML and ZPT, but maybe already some very small Python scripts to do the logic.
>
>Well, if they use ZClasses, they are forced to deal with class, products,
>methods, and either Python, or some hairy DTML or ZPT logic.
>
>>Advanced Zope developers use:
>>3) They write their own Python products, but develop most of the look and feel using the ZMI and therefore ZPT and DTML that lives in the ZODB.
>>
>>While I think that group 3 is addressed nicely, Group 1 and 2 are not.
>
>I don't think your group 2 is well served by ZClasses. I think that they
>are better served with something like the system I've sketched out.
>If they don't need any Python logic, or insist on only using Python
>scripts in their templates, they can work solely with ZPT (or DTML if we
>decide we need that).
>
>If they do need Python, they's be much better off creating modules.
>Modules are pretty simple, after all.
...
>>Addressing Group 2, let's say I want to quickly create a NewsItem object that has a couple of properties and methods. In Zope 2 I would just create a ZClass, add all the properties and create a couple of scripts for the methods and I am done. If ZClasses weren't so unpredictable, this should be a 10-minute task. How would I do that in Zope 3? Note that writing a Python module is **not** an option.
>
>Could you explain why creating a module is not an option? If people are
>using Python anyway, wouldn't it make more sense to have them create something
>familiar, like a Python class in a module?
>
>>What I want to do is:
>>1. Create ContentObject that inherits from this and that.
>
>Like what and which? Do you really think the non-advanced user
>cares that much about inheritence?
>
>>2. Create properties in Content Object.
>
>These are most simply done in a Python module.
>
>>3. Create methods in Content Object.
>
>Ditto
>
>>4. Define security.
>
>You'll be able to do that with content configuration in a way that's
>*much* simpler than ZClasses.
>
>>5. Register the Content Object.
>
>Yes, this too will be much cleaner than with ZClasses.
>
>>A more Zope3ish way would be to define the interface doing step 1-3 and then autogenerate the Content Object skeleton. 
>
>We could certainly provide a tool like this.  Steve and Martijn
>are working on a system for generating content types from schema.
>
>Their system generates Python modules that implement the schema.
>
>Jim
>
>-- 
>Jim Fulton           mailto:jim@zope.com      Python Powered!
>CTO                  (888) 344-4332            http://www.python.org
>Zope Corporation     http://www.zope.com      http://www.zope.org
>
>
>_______________________________________________
>Zope3-dev mailing list
>Zope3-dev@zope.org
>http://lists.zope.org/mailman/listinfo/zope3-dev