Re: [Zope3-Users] How to find something in the apidoc ?

2006-10-09 Thread Stephan Richter
On Sunday 08 October 2006 09:06, Christophe Combelles wrote:
 Hi,

 the /++apidoc++ is the main and greatest source of documentation for the
 zope 3 API, but sometimes I spend a lot of time to find something. So I
 have 3 questions:

 Take an example: Say I've heard about the function getMultiAdapter, and I
 want to know how to use it. So I first go to the apidoc and:

 1) if I don't know which component this function is part of, how do I
 quickly find it?

You can't at the moment. There is no generic search feature at this point. 
Actually you can easily search for packages, modules, and classes using the 
Code Browser, but not functions and methods. Maybe we should create an 
efficient index to search these things too? I would be happy for a detailed 
proposal of the features users would like to see for the code browser.

 Then I find two code examples calling it, one from
 zope.component.getMultiAdapter, and the other from
 zope.app.zapi.getMultiAdapter

Right, both will work. They are exactly the same function. However, we will 
eventually deprecate zope.app.zapi altogether.

 2) How can I know which one to use, and whether they're identical or not?

 To be sure, I go to the Code Browser: I click on zope, then on
 component. Here, nothing that looks like getMultiAdapter. I guess this
 function is defined in an interface, so I click on interfaces and I find
 at least 15 interfaces. After 5 more minutes, I finally find the function
 in IComponentArchitecture.

The problem here is that the API is hidden in some deferred import magic that 
apidoc cannot resolve further. 

 I do the same for zope.app.zapi but this time it's easier since there is
 only one interface zope.app.zapi.interfaces.IZAPI in which I can find the
 wanted getMultiAdapter function.

 Another more difficult example: zope.schema.getFields().
 When you go to zope-schema-interfaces, there are 57 entries. Where is
 getFields()? And is it related to zope.app.apidoc.interface.getFields() ?

Again, I would like to see some concrete suggestions on how things can be 
improved. Note that APIDOC cannot do magic, but it tries very hard to collect 
and organize every bit of useful information.

 So my last question is:

 3) How can I quickly find  zope.something.example.function in the doc ?

Ditto to 1.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics  Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users


Re: [Zope3-Users] How to find something in the apidoc ?

2006-10-09 Thread +lupa+

At 12:14 PM 10/9/2006, Stephan Richter wrote:

On Sunday 08 October 2006 09:06, Christophe Combelles wrote:
 Hi,

 the /++apidoc++ is the main and greatest source of documentation for the
 zope 3 API, but sometimes I spend a lot of time to find something. So I
 have 3 questions:

 Take an example: Say I've heard about the function getMultiAdapter, and I
 want to know how to use it. So I first go to the apidoc and:

 1) if I don't know which component this function is part of, how do I
 quickly find it?

You can't at the moment. There is no generic search feature at this point.
Actually you can easily search for packages, modules, and classes using the
Code Browser, but not functions and methods. Maybe we should create an
efficient index to search these things too? I would be happy for a detailed
proposal of the features users would like to see for the code browser.


Perhaps Google's new code searching will be some help getting started?

http://www.google.com/codesearch?q=getMultiAdapter+lang%3ApythonbtnG=Search+Code

Certainly there should be ways to narrow this down more effectively, say 
limiting search to a specific body of code (which I have not done).


I've not explored much yet, but already with this Google tool I have found 
several cases where other people are publishing modified versions of 
software that I had originated that I had no idea were out there.  Not that 
I needed to know, but it is interesting to find when someone likes what 
you've done enough to push it toward new limits.

+lupa+




___
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users