[Zope] manage_addMyZClass

Joachim Werner joe@iuveno-net.de
Wed, 4 Jul 2001 09:37:20 +0200


> And while I'm on that topic, what are the benefits/tradeoffs
> between using the ZMI to define products and using Python?

Some of the main reasons to use Python-based products are
- much better performance (ZClasses just "emulate" object behaviour; e.g.
all sub-objects are actually just put into propertysheets)
- being able to do much more things (e.g. calling Python libraries like the
Python Imaging Library etc.)
- avoiding problems with ZClasses (e.g. acquisition works not quite as
advertised, multiple inheritance: base classes can only be defined at
creation time and not changed later, inheritance does not work properly for
propertysheets defined in ZClass-type base classes, ...)

> Also, if I decide to go with Python based products, is there any easy
> way to turn a ZClass defined though the ZMI into a Python product? I'm
> not to worried about retyping code, but I've defined some fairly large
> propertysheets that would be annoying to recreate if I were to start
> from scratch.

It is not extremely hard to write a ZClass-to-Python code converter. But
AFAIK there is no such beast yet.

If you don't need the extra power Python gives you, you might be better off
with them. Your programming will be magintudes faster using ZClasses (while
the resulting code will be much slower ...), provided that you don't hit the
limitations of ZClasses.

We at iuveno are facing similar problems and are working at tools for making
Zope product creation much easier. Most of it is not ready for use yet. But
I'd ask you to tell me what you would expect from a "better Zope product
definition framework" or whatever you'd call it.

Just to give you an impression about our ideas, here are some of them:

- Definition of REAL Python-based classes over the web (like ZClasses);
everything I mention below should also work with these new over-the-web
classes

- Being able to define template-like classes (like "Meta-ZClasses"); e.g.
you'd have a predefined "Persons" ZClass and could use it to derive a
special "Co-Workers" or "Customers" class by just adding/changing stuff

- Wizards for the basic tasks (like creating a new ZClass; you'd not have to
click through all the definition tabs after the basic creation of the
ZClass); the wizards framework exists already

- Defining basic "components" like data class, presentation class, etc.

- A forms builder framework (with the help of Martijn Faassen's Formulator,
this part is quite advanced already)

- being able to define objects from UML tools

- roundtrip engineering (from UML tools etc. to Zope and back); there
already are tools to get ZClass structures into the Object Domains UML
software ...

- providing a lot of frequently needed basic modules to the programmer/power
user; the Content Management Framework is a basic attempt to do this


Cheers

Joachim

-