[Product-Developers] Limitations in the use of schemaextender

Giovanni Toffoli toffoli at uni.net
Sat Sep 12 15:15:32 UTC 2009

Hi all,

recently I started using schemaextender in developing product B, which tries 
to reuse as much as possible of product A.
It seems to work well to a certain extent.
More precisely, the instances of the extended classes seems to be ok.

But, in product A, I had developed some generic functions for automatically 
generating search forms for each content type, and also for sets of content 
types derived from the same (possibly abstract) class.
Now, it seems that said search-related functions aren't extended as 
(naively) I had expected.
In fact, the generic search-related functions don't use the instance methods 
to enumerate the schema fields and extract their attributes; rather, since 
no instance is available, they get the schema from a class variable whose 
value doesn't seem to have been extended.

I arrived to the following conclusions
- it was a design choice of schemaextender not to alter the original schema 
in the class variable
- it is for a similar problem that search macros (like view and edit macros) 
never haven't been systematically developed in Archetypes
- probably newer frameworks, such as Dexterity, are the real solution
- for now, I have to stick to subclassing, and give schemaextender up.
Are these conclusions correct ?

Thank you in very much advance, Giovanni

More information about the Product-Developers mailing list