Just received an email from Godefroid Chappele talking about
Modeling, which is a python package that aims to provide a
object-relational bridge for Python, much the same way as SQLObject does.
I looked around at the documentation and got really impressed. It
sounds like its incredibly bigger than SQLObject, and also well
designed and has lots of tests. I just couldn’t figure out if it is
really a code generator or if it will generate classes instead. I
would prefer the latter. In fact, if it comes out that we decide about
using it, I may be working to fix that (of course I need to dig more
to see if this isn’t already implemented or if it is really possible
I can’t really understand why people want code generators, if they
could get much more flexibility from metaclass-based class generators
reading from XML. Oh well…
4 thoughts on “Modeling”
Not sure if bigger
I’m not sure if it’s bigger. It’s more complex, that’s right, has support for Zope, etc.
But it is a little behind SQLObject because it doesn’t support the n-any associations, that SQLObject supports.
After working with SQLObject for 3 weeks now, I feel its the more transparent OR mapper I would want. Next thing on my tasklist is to generate SQLObject classes from Schema (Zope 3 interfaces containing only field definitions).
Modeling, I think, is inspired by and largely translated from a WebObjects ORM. The result is a more formal ORM, with an almost Java feel (IMHO). Java not because of the source language (Objective C, I’m guessing), but because of the corporate influence.
It is coming from a field-tested architecture, proven to be complete (even if it hurts). There’s pluses and minuses there. But I think it looks like more than it is because of its source. It has lots of Big Concepts and Formal Terms, but it’s actually doing pretty much the same thing the other ORMs are doing.
Many-to-many and code-generators
Well, we support many-to-many ;) even if it’s still not fully automated.
and code generation is not the only way it goes: see https://sf.net/tracker/index.php?func=detail&aid=814055&group_id=58935&atid=489337
->this allows classes to ge generated on the fly, and it will be integrated into the core soon.