[Zope3-dev] TTW Schema-based content types

Jim Fulton jim@zope.com
Mon, 04 Aug 2003 12:01:46 -0400


Sidnea threatened to start working on "ttw schema". I'm note sure
exactly what he means, but I thought I should write down some of my thoughts
on the matter.

Here's what *I* want. I want people to be able to create schemas in site-management
folders.  There should be a nice GUI UI for this. (Note that you can create schemas
in persistent modules TTW now. Of course, there's no UI.) These schemas should register
themselves with the schema service.

The schema building UI needs to know about available fields. I can see a couple
of ways to approach this. There could be a field service, or, perhaps, the
factory service could be used.  Maybe the builder should ask the factory service
for factories that create IField objects. This will require enehancements to
the factory service though.

Once we have a schema, it should be easy to create a content type based on the schema.
There should be a class with __getattr__, __setattr__ and __delattr__ that uses the
schema to provide data management.  I suggest that these TTW schema should have the
property that each field should have a unique id.  The content class should use
the ids, rather than the field names to manage data.  That way, fields can be renamed
without messing up existing instances.

FWIW

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (703) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org