[Zope-CMF] Class based vs TTW for Schemas.

Sidnei da Silva sidnei at awkly.org
Wed Feb 25 12:26:12 EST 2004


On Wed, Feb 25, 2004 at 06:15:10PM +0100, Lennart Regebro wrote:
| OK, that is one step toward merge identified. :)

Great!

| An idea struck me here: We already have this schema repository, called 
| portal_schemas (duh!). One way to do this could be by allowing two types 
| of schemas, CPS Schemas and Archetypes schemas in the repository?
| 
| Or? Of course a common API would have to be defined for the schemas too. 
| Hmm. OK, maybe it wasn't that simple. Ah well.

I would suggest for having just CPS Schemas in the repository, and
having a 'FacadeCPSSchema' class to be used in Archetypes that would
adapt (as lossless-ly as possible) to Archetypes Schemas. Then we
would be golden.

| >It's an instance of a 'Schema' class, which has methods for modifying
| >the schema. (addField, removeField, etc).
| 
| With the above repository that is no problem then.

Agreed!

| >You can do the same on Archetypes, though its not the default setup
| >and we dont have a vocabularies tool. 
| 
| So another step would be making the schemas use out portal_vocabularies 
| then. That's good, I hoped it would be that easy.

Yup!

|  > I've given some thought to this subject too, and I came to the
| >conclusion that this could be easily achieved by having a 'Dummy'
| >cmf-aware content type, that would be then used to create new portal
| >types using the types tool, and then one could just attach archetypes
| >schemas to this portal type. (optimally using Kapil's Annotations tool)
| 
| Well, that sounds similar to what we have done, yes. We have a type 
| class which you instantiate in the types tool and attach a schema, 
| layout and a bunch of other stuff to it.

Neat! Where do I sign for getting all of this? :)

-- 
Sidnei da Silva <sidnei at awkly.org>
http://awkly.org - dreamcatching :: making your dreams come true
http://plone.org/about/team#dreamcatcher

God is real, unless declared integer.



More information about the Zope-CMF mailing list