[Zope] ZClasses and instantiation

Alexander Limi alexander@limi.net
Mon, 29 Nov 1999 20:18:40 +0100


Zopistas,

I would like to have some opinions on the following.

I've just created my first ZClass, but I find the documentation on them a
bit thin (as I've come to expect ;).

Anyway, here is my current structure:

Control Panel
  |
  |--Products
  |     |
  |     |--myProduct
  |     |     |
  |     |     |--Artist(ZClass)
  |     |     |     |
  |     |     |     |-- Track(ZClass)
  |     |     |     |-- acl_users

I've crated property sheets for both ZClasses, and modified the addForm
methods and the add constructor to do what I want. (After some 6 hours of
struggling with dtml last night - I might be on the verge of creating my
first how-to :)

Now for the questions:

1. I have a folder called "artists" where the Artist-objects should be
instantiated as unique objects. I've managed to do this by copying the
Artist_addForm method to the "artists" folder, but I suspect this is not
how it should be done. My guess is that the factory is involved in some
way, but how anonymous users should be able to access it from the context
of the empty "artists" folder is a bit unclear at the moment.

2. I would really like to have two different "properties"-views on the
instantiated class, one for the user, who does not need to be able to
modify all of his attributes, and one for us administrators, which can be
the standard properties view. How?

3. As you can see from the above questions, my knowledge is a bit
incomplete. I've read through Zope Content Managers Guide, DTML Reference,
and tried to find anything of value on zdp.zope.org. If anyone could point
me to where I can find more relevant info and tutorials, I would be
grateful. Banging one's head against the wall at 0500 in the morning after
6 hours struggle with basic concepts is not my idea of fun. Python and Java
are easier to learn than this :)

Regards,


Alexander Limi.