[Zope3-dev] Re: capi vs zapi

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Mar 6 07:32:54 EST 2005


On Saturday 05 March 2005 10:12, Philipp von Weitershausen wrote:
> > capi is a short form for zope.component and should only be used when zapi
> > cannot be used. For example, you cannot use zapi in zope.app.traversing,
> > because this package is part of zapi. Another use case is when you
> > develop a package that does not depend on zope.app, then you must use the
> > component API directly.
>
> Of course, you're totally right on when to zope.component and not zapi.
> However, I think calling it 'capi' dilludes new developers (and even
> Garret here) into believing we're dealing with some sort of different
> API, while in fact it's just zope.component. As I've said in a post to
> Garret's checkin msg just a minute ago, we should replace 'capi' with
> 'zope.component' for clarity at least in doctests...

Jim thinks so too, I disagree. I think it is a great symmetry in the code and 
wherever I use it in tests I do the import in the test, i.e.

  >>> import zope.component as capi

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