[Zope3-dev] Voting on Schema design

Martijn Faassen faassen@vet.uu.nl
Mon, 15 Jul 2002 11:27:12 +0200


Hi there,

Are we calling votes now? I'm feeling icky about this -- last time you asked
for input it was mostly from people who didn't look at the code a lot
and didn't seem to know the use cases (sorry, people); how is this
going to help? Anyway, to inform people so they can make more informed
decisions:

  * we're mapping Python datatypes to schema fields  -- so much so that
    Schema currently do isinstance checks for these types in the validation,
    I'm hoping we can go to interface isImplementedBy() checks eventually
    for some more flexibility, but that doesn't change the goal.

    Later on of course we'll map other things than the Python types into 
    schema fields, but this is the intial goal and several important
    use cases depend on it.

  * Python uses these short names, and is moving towards that more and
    more in recent releases, away from types.StringType and the like. 
    'bool' is being introduced as that, not 'boolean'. Let's not move into the
    opposite direction with Schema. Long names are good, but not if they
    will confuse Python programmers. Already, for instance, Kapil got the 
    impression that these fields should have different names because 
    they have nothing to do with Python datatypes -- but they do. Making
    Python programmers have to say 'oh, this is schema, so I have to type
    Boolean' is bad.

Now if we want to dispute the basic goal of moving towards a support of
the Python typesystem first, then of course the long names become entirely
possible. But Schema are in the first place part of a python system to 
be used by Python programmers. Any mappings to other typesystems are 
desirable, but in the future.

> 2. I think the Schema package should be in lib/python/Zope and not lib/python. 
That's easy to decide; Jim and I at the sprint already agreed it should
be there, but since I'd placed them in lib/python already, we decided to
forgo moving it for the moment. Why is a vote necessary here? Do you think
I'll disagree on every single thing you propose? My problem was that
you didn't even give me a chance to respond to your proposals before
you went ahead.

Related to the dependency issue; one of the use cases of some people
(you, R.D.Murray) appears to be that we want to be able to use the Schema
code outside Zope, and therefore we need to minimize the dependencies
on Zope. Does this mean that Schema can't depend, for instance, on 
ComponentArchitecture? (for instance your adapter-like validators seem
to want this). 

So how do we handle this 'use externally so minimize dependencies' use case?
I'm just making this very explicit as it keeps influencing design decisions
people make. 

Regards,

Martijn