[Grok-dev] Re: model schema declaration

Martijn Faassen faassen at startifact.com
Thu Jul 19 04:41:37 EDT 2007

Philipp von Weitershausen wrote:
> Leonardo Rochael Almeida wrote:
>> The other day, Luciano and Martijn where talking about the deprecated
>> inner class idiom for schema declaration
> Deprecated? Have I missed something? WHen did we deprecate this?

I want to deprecate and get rid of the inner 'fields' class. It doesn't 
work well with subclassing, and it doesn't seem to add very much in 
brevity. It's also rather magic and leads to all kinds of questions that 
are easily solved if you switch to an explicit schema.

> -1
> Too much magic and, as you say yourself, only active after grokking...

I think we shouldn't stop exploring some forms of automatic assocation 
though. The question is how much this magic actually hurts things. I 
think it likely hurts far less than the inner 'fields' class. :)

> If you want something quick'n'dirty, inline the schema fields into the 
> form's form_fields or put them on the Model class.

Inlining the fields is one approach. What do you mean by 'put them on 
the Model' class, though?



More information about the Grok-dev mailing list