[Zope-dev] Re: Future of ZClasses

Philipp von Weitershausen philipp at weitershausen.de
Sat Oct 7 17:51:01 EDT 2006


Dieter Maurer wrote:
> Philipp von Weitershausen wrote at 2006-9-30 02:30 +0200:
>> ...
>>> You want to stick this interface to individual objects,
>>> while Lennart proposed to stick it to a type and use
>>> some kind of inheritance to make it effective on all objects
>>> instantiated from this type.
>> But where does this type come from? Persistent classes are hard (hence 
>> ZClasses cannot be maintained by anyone except a few people).
> 
> I remember that Jim proposed "PersistentModule"s, currently
> a ZODB proposal, to implement functionality similar to ZClasses
> in an easier way.
> 
> But, I cannot yet answer your question sincerely.

I can't either. If we ever get persistent code, that's nice, but I'd 
still be skeptical. Frankly, I think it's yagni ("you ain't gonna need 
it"). And if I understood Jim correctly, he nowadays prefers the "code 
is on the filesystem and we evolve datastructures using generations" 
story over "code and datastructures are persistent so that both can be 
evolved at the same time".

>>> For me, Lennart's approach seems to be far more economic, as
>>> he does things on an abstract (the type) level rather than
>>> always work on the concrete (the individual object) level.
>> I don't see how introducing another concept (a type) would be more 
>> economic.
> 
> I find that the introduction of classes with (multiple) inheritance
> has been very economic. It was another concept but a highly fruitful
> one, despite the fact that they are not so liked in Zope3 land.

I think "fat" objects from mixing many different concerns into a single 
implementation are a failed approach. Seeing how flexible you can be wit

   a) separating concerns (functionality, responsibilities) into 
separate objects called components and

   b) making the lookup of these components pluggable (using registries 
a.k.a. the Component Architecture),

I would not recommend anyone to over-use multiple inheritance as it's 
been done in Zope 2. That is not to say that inheritance and even 
multiple inheritance is evil. I think the right balance is necessary :)


More information about the Zope-Dev mailing list