[Zope3-dev] Ranking adapters

Shane Hathaway shane at zope.com
Tue Sep 30 11:41:41 EDT 2003


Jim Fulton wrote:
> The most important factor is the interface being adapted.
> The second most important factor is location.
> The third most important factor is the interface being adapted to.
> 
> If we want a B, we don't really care much whether we get a B, a B1,
> or a B2.  It's fairly important to be able to override things locally,
> but it's not as important as getting an adapter tailored to the object.

My intuition ranks location before the interface being adapted.  A 
location may be a complete, constrained application, and I don't want 
sitewide policies to override local policies.

Let's say I use Zope to make a bunch of kiosks for developing film. 
Kiosks usually have a touch screen and no keyboard, so I can't use any 
web forms.  Let's also say that I construct the kiosk application as a 
local application rather than a global application.  I need to be sure 
that global adapters don't leak through to the local application; 
otherwise some global adapter could cause a UI to appear on the screen 
that the user can't possibly use.

Again, this is only intuition.  If you disagree, I'll spend some time to 
discover more specific reasoning.

Shane




More information about the Zope3-dev mailing list