[Zope-dev] Re: zope.sqlalchemy, integration ideas

Marius Gedminas mgedmin at b4net.lt
Mon Jun 2 08:05:26 EDT 2008


On Fri, May 30, 2008 at 01:55:44PM -0400, Benji York wrote:
> On Fri, May 30, 2008 at 1:40 PM, Brian Sutherland
> <brian at vanguardistas.net> wrote:
> > I've just decided to jettison IAbsoluteURL and make a new interface
> > ICanonicalURL. The adapters for ICanonicalURL are available anywhere
> > without specially wrapping the object in a location proxy.
> 
> IAbsoluteURL doesn't neccesarily require a location proxy, it's just that the
> default implementations require objects to implement ILocation.
>
> No need to define your own interface, just override the IAbsoluteURL
> implementation(s) you don't like to behave differently (or better yet, don't
> let them get registered in the first place).

One thing I don't like about the default implementation is that if you
override IAbsoluteURL for a container, it has no effect for contained
objects.  I suppose there's a good reason for that -- efficiency -- but
it often makes custom IAbsoluteURL adapters pointless.  LocationProxy
helps then.

Marius Gedminas
-- 
Photons have energy, and trying to cram too many into too small of a space can
cause a black hole to form, which is, needless to say, not a desirable trait
for an optical computer.
                -- http://scottaaronson.com/blog/?p=261#comment-13693
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20080602/24b437e0/attachment-0001.bin


More information about the Zope-Dev mailing list