[Zope-dev] Specialists, Racks, and Objects, oh my!

Phillip J. Eby pje@telecommunity.com
Mon, 13 Nov 2000 19:11:42 -0500


At 04:14 PM 11/13/00 -0700, Bill Anderson wrote:
>
>I want a specialist to have two (or more hypotheticaly) racks, and each
>rack is to contain one type of object. I then want to be able to add
>objects. 
>
>I have the two racks set up, but I am unclear as to how to specify that
>I want to add an item of a certain type, or to a certain rack.
>
>Ideas appreciated ...
>

You can either give your specialist methods to create objects of each type,
which call the respective Racks' newItem() methods, or give your specialist
a single method that determines based on input parameters which class would
be better suited.  The choice depends on the requirements of your problem
domain.

In either case, the specialist is also the natural place to put the UI
("add forms") for creating the objects.