ZopeMag's mascot the ZOPE fish


Article Finder
People
Issue 8 - Revision 8  /   September 26, 2004 


 
  ZopeMag Links:
Latest Issue
About the Fish
Issue 10
Issue 09
Issue 08
Issue 07
Issue 06
Issue 05
Issue 04
Issue 03
Issue 02
Issue 01
 
 
Downloads
     
  Letter from the Editor:
   Issue 8

Interviews:
Each issue we interview important people in the Zope world.

  Stéfane Fermigier

Articles:
Throughout the quarter we cover topics of interest to Zope developers, designers, and users.

  Fine Grained Permissions

  Archetypes Part III

  Intro to Silva

  Profiling Zope

  Intro to CPS

Product Review:
Too many Products, too little time? ZopeMag keeps you up-to-date which Zope Products are worthwhile checking out.

  DocFinderTab
  mxODBC DA


Guides:
This quarter we bring you a new SuperGuide. Our miniGuides and SuperGuides give you the background knowledge you need to mastering Zope.

  miniGuide to Zope Hosting
  SuperGuide - Zope for Newbies (Part II)
 
 
Downloads
     
  URLs / Download
Products we talk about in this issues Articles and Reviews

     


DocFinderTab

- - - - - - - - - - - -

By K. Kirchner |  May 27, 2004

print
____
 
 
Product name DocFinderTab
Description Enables access to an object's API information over the ZMI
Release Date 2004-04-25
Version DocFinderTab 0.5.0 (using DocFinder 0.4)
Rating
(all ratings are on scale of 1-5 with 5 sushi being the best)
Usability
Software Design
Documentation
Usefulness
Categories Development, debugging
Size DocFinderTab: 14,569 Bytes (tgz)
DocFinder: 10,863 Bytes (tgz)
Requirements DocFinder 1.0.3
Python 2.3
Creator DocFinderTab: Stefan H. Holek (stefan@epy.co.at)
DocFinder: Dieter Mauer (dieter@handshake.de)
License DocFinderTab: ZPL
DocFinder: BSD
URL DocFinderTab: Download
DocFinder: Download
Packaged as Zope Product
 
____

Pros
  • easy access to an object's API
  • shows base classes, security information and parameters
  • search by filtering information
Cons
  • Couldn't find any.




Introduction

One problem that almost inevitably arises when one is working with Zope is trying to work out where an object gets its methods and attributes. The difficulty here is often due to Python's feature of multiple base classes. Due to inheritance sometimes you have to work your way through 4 or more modules to find the method you are looking for. Debugging especially can be tedious. DocFinder or DocFinderTab will make your life easier.

DocFinderTab

Stefan Holek's DocFinderTab product, formerly known as DocFinderEverywhere, uses the 0.4 version of Dieter Maurer's DocFinder. For all products it patches the manage_options variable, which defines the tabs for an object, adding a tab to every object in the Zope Management Interface (ZMI), the 'Doc' tab. This tab leads to the DocFinder information, which can also be reached by adding /showDocumentation after an object's URL (for example, http://localhost/TestFolder/myfile.pdf/showDocumentation).

The DocFinder information consists of a table with the object's classes, for example 'File' for a pdf file, and its base classes, for example 'PropertyManager', again for a pdf file. Each class' docstring is shown below the class name. Each class can be expanded and collapsed by clicking the + or – signs to the left of the class name.

fig. 1
Figure 1 - DocFinder information for a pdf file

The figure above shows the DocFinder information for a pdf file. It is accessed via the pdf file's 'Doc' tab. The information for the 'File' class has been expanded and you can see some of its methods and attributes. Together with the method name, DocFinder shows the security information for the method, as well as its arguments and, of course, the docstring. The security information consists of the permission the method is protected by and a tuple or list containing the roles that are allowed to access this method.

fig. 1
Figure 2 - DocFinder information filtered for 'manage_options'

You can filter the information shown using the 'Filter' field in the upper right-hand corner of the page. In the figure above, the list only shows entries that contain the string 'manage_options'. You can also filter for parts of a string, for example 'manage_', to see only methods containing 'manage_'.

If you activate the 'Expert' checkbox, the list is reloaded and below each class name appears the module the class is defined in, for example 'OFS.Image' for the 'File' class. This is an immense help if you want to find the source code for the class.

As mentioned above, the current DocFinderTab uses the older version 0.4 of DocFinder. This product is kept in a separate folder inside the DocFinderTab folder, which makes it easy to upgrade DocFinder and still use DocFinderTab if you wish to do so.

If you use the DocFinder product on its own and not the DocFinderTab product, you need to create a DocFinder instance (the best place for it is the root folder, so that it is available for all objects).

fig.3
Figure 3 - DocFinder 1.0.3

The figure above shows the DocFinder information offered in version 1.0.3. In addition to the filter field, there is a selection list. Using this list, you can limit the information displayed depending on the type of information you are interested in. Currently, DocFinder has three documentation types: programmer, scripter and web. These three types show different parts of the entire documentation for the current object.

In this new version of DocFinder, the class names are links. When you click a link, the source code of the module the class is defined in appears.

fig.4
Figure 4 - Templates for DocFinder 1.0.3

You can change the templates used to display the DocFinder information by changing the Page Templates inside the DocFinder instance (see figure above). The default documentation type can be set via the DocFinder instance's 'Properties' tab.

Dieter Maurer provides developers with an excellent product for debugging and understanding Zope's infrastructure. Stefan Holek has made this a bit easier to use by making it accessible via a tab.



Summary

The DocFinder product allows easy access to an object's docstring information, so that one no longer has to dig into the source code. DocFinderTab makes this even easier by giving each object a tab over which this information can be accessed. These products are indispensable for developers or anyone who wants to learn about Zope's infrastructure and doesn't want or need to deal with the source code itself.

Product Review End.


Kristoph Kirchner: was born in Berlin in 1977 and finished school in 1996. After completing a degree in Commercial Correspondence, Kirchner went on to study Computer Sciences at the Technical University of Berlin. Since then Kirchner has been working for beehive writing e-books on Zope and documentation for projects of beehive's customers. Kirchner also co-authored the first German Zope book "Zope: Content Management and Web Application Server", the book "Zope: Web Application Construction Kit" and the book "Zope: How to Build and Deliver Web Applications".


shim
shim  ZopeMag is committed to bringing you the best in Zope Documentation. shim
shim


Home   Subscribe   FAQ   Contact   Write for us   Privacy Policy   Weekly News   PyZine   opensourcexperts.com  

Reproduction of material from any of ZopeMag's pages without prior written permission is strictly prohibited. Copyright 2003 - 2005 ZopeMag Zope/Plone hosting by Nidelven IT