[storm] proposal for improvement
Jean Daniel
jeandaniel.browne at gmail.com
Mon Jun 8 18:12:49 BST 2009
> The important thing is that there be a single
> definition of the data, not two or three. A technique like Steven Waterbury
> mentions might be ideal.
You can say less stuff than with zope.schema if you start from the SQL
schemas. There is one validation feature that I haven't found neither
in SQL nor in the XML Schema nor relax NG, it is the possibility to
declare functions which validate relationship between two fields (like
one of the two needs to be non null).
Conversely, if I start from the zope.schema, i will have a hard time
describing indexes and partitioning.
> I looked at zope before discovering storm, but was unable to get my brain
> around it enough to actually use it
The Zope people have done a pretty good job at presenting zope.schema
and zope.interface with no dependency toward other parts of their
framework.
The validation code is not in the class, it is in the interface of the
class, so that you do not need to derive from a specific object to use
the features (storm uses that idea too actually: you do not need to
derive from a specific object to map an object to a table).
This introduction is good, the simple case is a bit too smart for
being called simple though (more like "storm tutorial smart"). The
interface relationship is less straightforward than a simple
derivation.
http://pypi.python.org/pypi/zope.schema/3.5.4
Cheers,
More information about the storm
mailing list