Something better than ZClasses (was: Re: [Zope-dev] Re: Zcatalog bloat problem (berkeleydb is a solution?))

Erik Enge erik@thingamy.net
Thu, 28 Jun 2001 14:03:46 +0200 (CEST)


On Thu, 28 Jun 2001, Stephan Richter wrote:

> Here my list of questions:
> 
> 1. Will we create ZClass or Python Products?

Python Products.
 
> >Product-name
> 
> 2. I think it should ask some more meta-data information here, such as 
> License, Author(s), Description ....

Yepp :)
 
> >A list of images (like dtmldoc.gif and such)
> 
> 3. Okay, here we should have a loop of enter images with upload 
> functionality. The only problem is where do we save them in the mean time?

Upload?  Upload to where?

mk-zprod (as it works today) creates a directory on your filesystem, and
in that directory (which you just copy to your Products directory) it
creates an img/ directory and puts them there.
 
Or are you asking where the wizard should store them?  (Which I thought it
didn't have to.)

> >If you want to set a default Catalog name
> 
> 4. Okay, I do not work with the catalog; what do you need, just a name or 
> the path? I think the WizardTreePage will help here.

Just the name. :)
 
> >If you want nice redirection after adding objects
> 
> 5. Yep, how could that look like; should I provide users with a text area 
> or what?

In the dtml/ directory of mk-zprod you have Add2.dtml, that's the page the
user is redirected to after adding an object.  Maybe a text area with a
suggestion (like Add2.dtml) in it?
 
> 7. Yeah, this is all the meta-data here, so that could go on one page.
> But you are missing a list of Base Classes. I have no clue where to
> get these from. I guess it is time to look into the ZClass code, but I
> think they use a separate Mechanism. The problem with the current
> product registry is that NO classes are listed anywhere, only their
> constructors, which is nothing worth in this case.

Hubbliski.  We could provide them with standard classes as defaults
(Persistent, Explicit/Implicit, AccessControl) and suggest some
others.  I'm not too sure about the ZClass thing.

> 8. Should that just use the PropertyManager attribute _properties?

Yepp.

> I usually add the 'default' key to each property dictionary and write
> a two liner in the __init__ method to generate the properties with
> their default...

Why not just have:

	def __init__(self, attrib1, attrib2='something'):
		"""doc string"""
		self.attrib1 = attrib1
		self.attrib2 = attrib2

which could come from such a description:

	attribs:
		name: attrib1 default value: None
		name: attrib2 default value: "something"
 
What do you think?

> 9. Again, that would be a loop. But my question here would be: Are you
> using sub-classes that much. I have written one so far in all the
> products ...

My latest projects sub-classes left, right and center.  If we just have
the logic for a recursive loop there the user could add as many as s/he
wanted without it being much more work for us.
 
> Are coming to Berlin?

Well, I was, but I'm moving to France the 8. of July and I've just come
home (to Norway) from England.  England, Norway, France, Germany, France
all in just three weeks is a bit much :)  (Oh, and I have to get an
apartment in Antibes.)