[Zope3-dev] Interfaces and Schemas

Steve Waterbury golux at comcast.net
Fri Aug 8 17:58:09 EDT 2003


Hi Zope3-stas,

I'm new to the list and to Zope 3, but I've browsed the Zope 3 Wiki
and this list's archives (albeit not too thoroughly).  I'm pretty
sure my question hasn't been brought up yet.

By way of background:
   * I am using Twisted for my app
   * I like its new component architecture
   * I'd like to extend it to include schemas
   * but my approach to schemas may be slightly different than Zope 3's
   * and ultimately, I'd like to see the Zope 3 and Twisted
     component architectures be as "interoperable" as possible.

Basically, I see schemas and interfaces as complementary, and
perhaps "equal" in a sense.  The idea I'd like to propose is
that an interface could have a schema associated with it, and
that they could be similarly named -- e.g., an IDocument and
an SDocument.  And there should probably be well-defined
(i.e. testable) relationships between the methods of IDocument
and their effects on the "fields" (which in some cases may be
state-dependent) of SDocument.  And each could have families
of Adapters, which in general would be quite different.

Any class then could implement either the interface or the
schema (or both, or neither), but presumably there would at
least be a Document class that implements both.

Is that concept compatible with Zope 3's architecture?
(From what I've read so far, it isn't quite compatible, but
might be doable.)

Perhaps more importantly, is it of interest at all?

(It is of direct use in my application because I have an O-R
mapping to a PostgreSQL backend, and schemas and interfaces will
all be persistent in the registry that drives the mapping, so I
will implement something like this one way or another. :^)

Cheers,
Steve.





More information about the Zope3-dev mailing list