[okfn-help] vdm: improvement thoughts
Martijn Faassen
faassen at startifact.com
Wed Aug 25 12:36:26 BST 2010
Hi there,
Now that I've looked a bit at vdm, here are some thoughts about
improving it I'd like to run by you all. If I end up using vdm for my
project (and I am hoping to), I can spend some time helping out with
these.
* vdm has support for both sqlalchemy and sqlobject. Is the sqlobject
support being maintained at all? Is it being used? If we can, I'd like
to throw out the sqlobject support altogether. We could then get rid
of some nesting and put the actual code in 'vdm' proper, retaining
'sqlalchemy' for backwards compatibility only. I think that would
clean up the namespace and make the imports nicer. Unless we
anticipate vdm working in the future with another ORM altogether, but
I don't see the reason to keep the code bundled into one package
anyway - such a new vdm would presumably have quite a different design
and its use would be different.
* pending revision support - the published database in one state, but
a set of newer pending revisions are available as well. Perhaps this
is simply an implementation pattern we can document, or perhaps this
needs new code.
* constructing a vdm compliant set of tables and models is rather
involved: set up a revision table for your database, make your tables
stateful, set up revision tables for each table, inherit from a whole
bunch of mixins in the models, create the Revision model, use the
Revisioner extension in the mapper, map the revision models. I hope we
can cut down on the amount of stuff you need to write by automating
some of this.
* MySQL support; I've already done work on this.
* test infrastructure for testing with MySQL and PostgreSQL - lots of
discussion about MySQL support already
* the documentation needs work. there's no discussion on how to set up
revisioned tables, or how to set up revisioned models (what mixins are
for what?), some of the documentation is actually not correct in
combination with sqlalchemy (there's no 'revision.commit()' for
instance), and it'd be nice to have an explanation of how you are
supposed to set a revision on a session (direct assignment or using
the set_revision infrastructure?). Explanation of how to do queries
within revisions would also be useful (I'm not exactly sure how myself
right now).
I don't mean to step on anyone's toes with these ideas of course, and
it'll take time to do all of them, but I'd like to start at least a
discussion on it.
Regards,
Martijn
More information about the okfn-help
mailing list