[Grok-dev] Re: megrok.rdb updated
Martijn Faassen
faassen at startifact.com
Fri Jul 11 05:59:10 EDT 2008
Hey,
Toni Mueller wrote:
> On Wed, 09.07.2008 at 22:22:15 +0200, Martijn Faassen <faassen at startifact.com> wrote:
>> Toni Mueller wrote:
>>> ...
>> megrok.rdb uses the SQLALchemy declarative extension. The idea of this
>> is that you can design your model classes at the same time as the
>> tables, in the same class, describing fields.
>
> once I'm going to make use of interfaces, I have to define a schema two
> times anyway, right? Then writing it once as a zope.schema that helps
> with UI creation and once as an SA schema, that helps with declaring
> referential integrity (which is impossible to do with, and outside the
> scope of, zope.schema), imho doesn't really add much of a burden.
This is a use case we want to support and what you're doing looks fine.
I'd like there to be a way to generate most of what you need in a
zope.schema from a SQLAlchemy schema automatically, at least for some
default behavior, but I expect in most cases you'd need to tweak the
output anyway.
>> SQLAlchemy also supports another case where you define your tables and
>> object-relational mappers in a less integrated way. It's more gluing up
>
> I discovered SQLAlchemy before I discovered Grok...
Okay, understood, I'll get you to explain things to me then instead. :)
Have you used SQLAlchemy with other web frameworks before? If so, how do
things compare?
>> I'd like to hear more about what you think could be done to help making
>> the separate schema + SA column story end-user ready.
>
> Well, currently my quite limited understanding prevents me from doing
> the right thing, but I think that it's not so much a question of
> knowing Grok, but much more a question to make my way through
> zope.schema, zope.formlib and/or z3c.form. Using more advanced field
> types and widgets (files, esp. images, select boxes etc), and how to
> tack validation onto all of it, is currently far from obvious to me.
> =8-((
Understood. I'm happy to get any feedback we can get. :)
We need to write up more about how to do forms for grok.zope.org, I think...
Regards,
Martijn
More information about the Grok-dev
mailing list