[Grok-dev] Re: FieldProperty
faassen at startifact.com
Mon Mar 12 05:29:56 EDT 2007
Tim Terlegård wrote:
>> Just wondering why FieldProperty is not used in the example apps
>> (grokwiki and grokstar). Without it setting attributes is not validated
>> - eg I can set myobj.title = 'Non unicode string' but when I use
>> FieldProperty in the traditional manner then WrongType error is raised
>> as I would expect.
> Often you don't need FieldProperty because formlib does the validation
> of forms for you. If you do lots of manual manipulations of attributes
> you might want to use FieldProperty, but that's entirely up to you.
> Python programmers have done well without type checking before :)
Yes, I agree with that. FieldProperty in my experience just gets in the
way by putting in more complication in the access logic. Your form logic
will do the checking already.
Feel free to use it though in your own applications. I can imagine it
could be of value in some circumstances, especially when you have other
developers who you expect will do a lot of manipulation of your objects.
More information about the Grok-dev