[Fwd: Re: [Repoze-dev] obob example...]

Mike Naberezny mike at maintainable.com
Wed Sep 12 16:37:09 UTC 2007


Chris McDonough wrote:
> That's a good idea.  Maybe something like:
> 
> result = lastobject()
> serializer = get_serializer(result, request)
> return serializer()

Yep, that works for me.

> It's tempting to make use of Zope interfaces 
> (http://griddlenoise.blogspot.com/2005/12/zope-component-architecture-interfaces.html) 
> to do dispatching like this because it gets us out of the business of 
> creating a hardcoded dispatch table or inventing a new registry syntax.  
> But I think it's important that we don't make consumers of obob buy into 
> Zope interfaces in order to do their job.  That said, duck typing is 
> DWIM. ;-)

The whole idea of making arbitrary objects available remotely certainly has 
security concerns, and interfaces are about specifying and enforcing 
contracts.  It seems to me to be very sensible and natural to use interfaces 
here, if for no other excuse than security policy.  However, this is one of 
those religious things...

Mike

-- 
Mike Naberezny
Maintainable Software
http://maintainable.com
_______________________________________________
Repoze-dev mailing list
Repoze-dev at lists.repoze.org
http://lists.repoze.org/mailman/listinfo/repoze-dev



More information about the Repoze-dev mailing list