[Grok-dev] megrok.traject + sqlalchemy integration example
Martijn Faassen
faassen at startifact.com
Mon Jan 18 16:25:53 EST 2010
Hi there,
I checked in an example demonstration how to use megrok.traject with
sqlalchemy in Grok. It's the equivalent of megrok.rdbexample in
functionality, but the way the code is structured is quite different.
You can check it out like this:
svn co svn://svn.zope.org/grokapps/trajectrdbexample/trunk trajectrdbexample
Note that it is a lot more verbose than megrok.rdb. This is deliberate
to demonstrate how it promotes a cleaner separation of concerns between
SQLAlchemy-based models and Grok.
If we used megrok.rdb's alternate model-based configuration mechanism
the example could be shrunk down, but that would be at the cost of this
separation.
The example could then be shrunk down even further by using megrok.rdb's
SQLAlchemy declarative integration. That combined example I'll leave to
the future, though. :)
Regards,
Martijn
More information about the Grok-dev
mailing list