Walking through Five to Zope 3

In this tutorial we start you on your journey to the powerful Zope 3 Component Architecture (CA) by way of Five. You will learn about defining and configuring interfaces and adapters, and the CA programming model. You will also learn how to use our new TreeWalker, that helps you easily define recursive operations on object trees.

Warning: This item is marked as outdated.

  1. Introduction How we came to write this tutorial. An overview of our assumptions, our goals, and the pattern we are going to implement.
  2. Test, tests, and more tests Describes usage of doctests, and why we use them here.
  3. Using TreeWalker A look at the TreeWalker from the point of view of a developer who wants to understand what we did, or even download and use our code.
  4. Implementation Overview of the components we will look at in following sections
  5. Interfaces This section makes explicit the difference between Zope 2 and Zope 3 interfaces, and demonstrates the difference between interfaces implemented in the configure.zcml file and within the class. It's our first look at the ZCML configuration file, so goes into some depth.
  6. Adapters This section covers the rationale for and use of Adapters with a real example, including details of configuration, and a demonstration of adapter lookups in action.
  7. Browser View Here we look at the benefits, use, and configuration of, browser views, and touch on Marker Interfaces.
  8. Events Describes the new way to think about events in Zope 3.
  9. Using Filtering Describe how to define new filters for your own content.
  10. Final Our thanks to reviewers and contributors, and references.

All content on one page (useful for printing, presentation mode etc.)

 

Events

Posted by Frank Bennett at Jul 15, 2006 06:54 AM
In the Events chapter, the subscriber uses "for" and "factory". There must have been a changed between Five 1.2 (described here) and Five 1.3.5 (that ships with Zope 2.9); the docs for the latter call for using "for" and "handler" instead. Might be a good idea to amend the Events chapter to reflect the change.

Events (correction)

Posted by Frank Bennett at Jul 18, 2006 07:29 AM
I missed a note in the Events chapter that says very clearly "for 1.3, replace factory with handler". My oversight, please delete this comment and its parent.

Copy mistake in 'adapters' chapter? (s/implements/factory/)

Posted by Jean Jordaan at Nov 28, 2006 01:10 PM
I think this::

  <adapter
     for="A"
     provides="B"
     implements="C"
     />

should be this::

  <adapter
     for="A"
     provides="B"
     factory="C"
     />

the "traversable" is now deprecated.

Posted by Cheng Renquan at Jan 08, 2007 03:20 PM
from here (http://codespeak.net/z3/five/directives.html), I saw:

  traversable

  This statement is now deprecated, since the functionality now is on Zope Core.

  Make a Zope 2 content class traversable in the Zope 3 manner using Five. This is used to attached views, resources and other things to Zope 2 objects.

so I think if the traversable is still needed?