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

Joachim Werner joe@iuveno-net.de
Mon, 13 Jan 2003 20:11:06 +0100


> > 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.

>From what our hosting customers do I'd say that it is not too far from
reality that a majority of current Zope 2 users do not code in Python
(except for very limited use of Python scripts or External Methods). They
use some products, like Squishdot, and build their applications either using
DTML scripts or ZClasses. Even ZPT is not very popular among the "first
generation" Zope users. I don't say that is good. But it is what the
official Zope literature suggests and most people get into first ...

> 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.

Yes. And it would be much better to get them learn a certain subset of
Python instead. A personal example: It took me ages to understand the _[]
namespace thing in DTML. But as soon as I knew about the Python behind it
was all so easy: You have a namespace, and to get an item in the namespace
you provide its key, like you'd do with any dictionary. You will not find a
decent explanation of this anywhere in the Zope documentation.

> 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.

These people don't know they use Python. They just use "funny brackets"
syntax ...

> Well, if they use ZClasses, they are forced to deal with class, products,
> methods, and either Python, or some hairy DTML or ZPT logic.

I guess what makes ZClasses so cool is that you can just add them as an
object using a form and later change stuff over the web. Of course it is
much more convenient for an experienced Python programmer to use file system
based tools for this. But it's like the Word vs. TeX thing: If you only use
the word processor from time to time, the learning curve for TeX would be
too big of a deal.

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

> 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).

I think using Python scripts instead of "real" code should not be generally
encouraged in the documentation, not even for beginners. If there is a
reason for it, like when you write filter scripts that should be adaptable
by the TTW "pseudo programmer", Python scrupts are the best choice. But
everything serious seems to be better placed in modules.