[Zope3-dev] Back to Job editing

Martijn Faassen faassen@vet.uu.nl
Wed, 4 Sep 2002 16:56:23 +0200


Magnus Heino wrote:
> > In theory properties/schema help with introspection and I think the code
> > can look more readable too.
> 
> Will it be easy to extend existing types with new properties too?

[snip example]
> Adding a new "field" foo to a CollectorIssue isnt fun as it is today... :-P

One would certainly hope it would be easier with properties/Schema! :)

Anyway, extending a schema (lowercase, not talking about Schema as in Zope3) is
never trivial. You'd still have to change both the interface (Schema) 
adding the field, as well as the instance (adding an attribute or 
property). Then presumably the __init__ needs to initialize things, unless
you can depend on sensible defaults defined in the Schema.

And if the object is in the ZODB you need to extend previous instances.. :)

There are of course patterns to fight this, and we should look for them.

Regards,

Martijn