[Zope-CMF] Class based vs TTW for Schemas.
Lennart Regebro
regebro at nuxeo.com
Wed Feb 25 11:28:25 EST 2004
Andreas Jung wrote:
> Please explain.
OK. I was planning to think it through and write something consistent,
but I don't have the time, so this will probably be a bit confused. I'll
explain with an example:
In CPS, we do the member management through directories. In CPS3, these
directories are based on CPSSchemas, which makes it possible for us to
define the schema of a user and then have the directories display this
schema (just like Archetypes) for each user without any actual member
objects existing.
I'm not sure if this is possible with Archetypes, maybe it is. But as I
understand it you create a python class for each schema, which would
only complicate things. So that is one point.
A next point is that CPS by default sets up a member schema with first
name and last name, and such. No problem there. However, the NuxWebMail
product needs to have a IMAP username and password associated with the
user. This is simply done by adding these two fields to the schemas in
the NuxWebMail setup. I don't se how this can be done with a schema
defined in a python file.
Also, the ttw design of CPSSchemas means that we have a TTW interfaces
for managing vocabularies, so that a manager can change them. No Python
hacking, not even fiddling with dictionaries in a skin is needed.
And last, and maybe least, already two years ago I started working
together with Johan Carlsson on something we had an idea of. Something
we wanted instead of ZClasses, namely a way to create useful classes
without programming, or possibly with only very basic simple scripting,
all TTW. I have often found a need to create simple classes that really
need almost no programming, just a bunch of properties. For me as a
programmer that is of course no problem to create a disk based class,
but for others? I have always felt that ZClasses is supposed to fill
that slot, but fail, because they are even more complicated to wrap
their head around than disk based classes. I think CPS Schemas comes
very close to that vision. You can have a site manager that adds and
changes classes without having to program python.
Well, that's all I can come up with now.
//Lennart
More information about the Zope-CMF
mailing list