Re: [Zope] Creating a New Object Type - Use ZClass or Python?
-----Original Message----- From: Anthony Pfrunder <s341625@student.uq.edu.au> To: eric jones <ej@ee.duke.edu> Cc: zope@zope.org <zope@zope.org> Date: Friday, July 30, 1999 7:43 AM Subject: Re: [Zope] Creating a New Object Type - Use ZClass or Python?
On Fri, 30 Jul 1999, eric jones wrote:
[snip]
I'd like the Add form to have places for adding all the basic properties. The paper title, journal name, and description are pretty straight forward I think. The authors are a little more troubling. I'd like to make them a list of tuples: [snip, snip]
In my opinion Zclasses are _far_ easier than Python, also, you can edit it on the fly and watch the changes in real-time. WRT your application, I suggest that you create a Zclass which subclasses XML Document. Put the instance within a Zcatalog search folder. Zcatalog is the bit that adds searching (see zope list for an example from the kind DC souls...) and XML allows you to create a structured document with your own tags. My guess (ie haven't tried it) is that Zcatalog can be made to index on the properties exposed by XML and then you can index on Author and create an appropiate sequence of results as required.
[more deleted] I agree that ZClasses are much easier than Python. Of course, every solution can have a million possible alternates, and this one is no different. One possibility: make a standard ZClass (ie no explicit subclassing) and add the necessary fields on a propertysheet. The Author could be a lines property so that each author's name is distinct. The Catalog should be able to search this. If there was a way to "link" from one ZClass instance to another, then you could have an Author object for each author and just have the publication point to the Author object. There are certainly ways to do this programmatically now, it's just not automatic. This way, an Author could have other properties (contact info, website address, etc.) if desired, and those properties are only stored in one place. Kevin
Kevin Dangoor wrote:
-----Original Message----- From: Anthony Pfrunder <s341625@student.uq.edu.au> To: eric jones <ej@ee.duke.edu> Cc: zope@zope.org <zope@zope.org> Date: Friday, July 30, 1999 7:43 AM Subject: Re: [Zope] Creating a New Object Type - Use ZClass or Python?
On Fri, 30 Jul 1999, eric jones wrote:
[snip]
I'd like the Add form to have places for adding all the basic properties. The paper title, journal name, and description are pretty straight forward I think. The authors are a little more troubling. I'd like to make them a list of tuples: [snip, snip]
In my opinion Zclasses are _far_ easier than Python, also, you can edit it on the fly and watch the changes in real-time. WRT your application, I suggest that you create a Zclass which subclasses XML Document. Put the instance within a Zcatalog search folder. Zcatalog is the bit that adds searching (see zope list for an example from the kind DC souls...) and XML allows you to create a structured document with your own tags. My guess (ie haven't tried it) is that Zcatalog can be made to index on the properties exposed by XML and then you can index on Author and create an appropiate sequence of results as required.
[more deleted]
I agree that ZClasses are much easier than Python. Of course, every solution can have a million possible alternates, and this one is no different.
One possibility: make a standard ZClass (ie no explicit subclassing) and add the necessary fields on a propertysheet. The Author could be a lines property so that each author's name is distinct. The Catalog should be able to search this.
If there was a way to "link" from one ZClass instance to another, then you could have an Author object for each author and just have the publication point to the Author object. There are certainly ways to do this programmatically now, it's just not automatic. This way, an Author could have other properties (contact info, website address, etc.) if desired, and those properties are only stored in one place.
I have already submitted this to the collector: http://www.zope.org/Collector/380/view But was informed that this was a low priority item, and that it had been downgraded in status to 'wish'. Since I think that this is a VERY important feature, I am willing to put my money where my mouth is and cough up some $$$ to get this done. Consequently I have three questions: 1) How much will it cost to get this added to Zope? 2) Does anyone else want to pledge some $$$ to make this happen? 3) Can we formalize this sort of arrangement in the future to allow individual developers/users to pool resources to get particular features added? (sort of a Zope-specific SourceXchange). Sincerely, Michael Bernstein.
participants (2)
-
Kevin Dangoor -
Michael Bernstein