[Zope3-dev] Re: capi vs zapi

Garrett Smith garrett at mojave-corp.com
Sun Mar 6 07:53:33 EST 2005


Stephan Richter wrote:
> 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

With this argument, I could see 'api' inflation occurring here over time
(e.g. dcapi, webapi, etc.) I'd rather see a single zapi that advertised
(most of) the core functionality for the typical Zope user.

 -- Garrett


More information about the Zope3-dev mailing list