[Zope3-dev] Re: Field binding considered icky
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sun Apr 4 08:52:26 EDT 2004
On Friday 02 April 2004 19:32, Garrett Smith wrote:
> Maybe this is a silly question, but why not just pass the context to the
> field validate method?
>
> field.validate(value, context)
>
> Using adapters seems like a lot of infrastructure for something like
> validation. I assume you see other advantages, beyond cleanup?
Then you have to drag the context around all the time. You might not have been
around when we still had to use ContextWrappers for parent information, but
it was just a nightmare. This might be on a smaller scale, but it is the same
issue. Having to manually carry something like contextual information around
is tedious, unnecessary and a source for unexplainable bugs.
We want to get rid of binding, since not every user of zope.interface and
zope.schema will want to do the same with interfaces and schemas that we do.
So they are something zope.app specific; therefore the adapter.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list