[***SPAM*** Score/Req: 04.00/04.00] Re: [Zope] Catalog aware

Tino Wildenhain tino at wildenhain.de
Thu Jul 20 07:28:52 EDT 2006


Garito wrote:
> Martijn Pieters escribió:
>> Please don't email me personally; let's keep this discussion on the list.
>>
>> Garito wrote:
>>  
>>> Yes, the indexes depends on the entity (I don't know what indexes I use
>>> until I define the entity but I need to catalog every characteristic of
>>> the entity)
>>>
>>> For example if I have a entity with a container where to put my cousins
>>> information I will catalog a keyword index called (is an example,
>>> remeber) HowMuch that counts the number of the objects stored in the
>>> container
>>>
>>> Or if I talk about skills I will catalogue the marks or the way to print
>>> the certificate of excelence (again an example)
>>>     
>>
>> But then you can create specific subclasses that are catalog aware. What
>> standard objects would you use to implement this? You have a specific,
>> non-generic use-case that has already been catered for by the framework.
>>   
> I can't subclass every class I need. These will need to reajust 
> (subclass) every new case
> For example:
> Now I know I need Page Templates and Script Python catalogaware, then I 
> subclass them and I finish the work, good
> 
> But tomorrow I need a Mail host catalogaware, begin again and create a 
> subclass for Mail host

haha. I wonder which property of that single MailHost object you
probably use you want to catalog and what exactly would be your
Query to the ZCatalog, once you want to find out...

> I would like if there are a generic way to add catalogawareness by code. 
> If there are my problem about catalogawareness finish

Speaking of code: did you think about my hint? I mean the one with
the loop - if you have the weird notion you need to make anything
catalogaware, why dont you write a product which iterates over
all other products in zope, and if not catalogaware, generate
a generic catalogaware subclass for you?

Heaven, you could even half way finished by the tiem you feed the thread :-)

Regards
Tino


More information about the Zope mailing list