[Zope3-dev] Re: Dependencie-handling

R. David Murray rdmurray+dated+1057500799.4bdd0d@bitdance.com
Tue, 01 Jul 2003 10:13:10 -0400


"Marcus J. Ertl" <marcus.ertl@larp-welt.de> wrote:
>At Zope3, there will be some products, they depend so some others. Will
>be there some standard way of handling dependcies? Which is the right
>way to :
>
>- check if a product is available
>- check if all moduls are available
>- to tell the administrator something is missing

IMO, the right answer is none of the above <grin>.  Use Adapters
and Interfaces and Services so that your product does not depend
on another specific product, but rather on a set of Interfaces and
Services.  That way someone can write a new module without having
to change your module's code to work with it.  When an Adapter or
Service that your module needs isn't available, an appropriate error
message will result.  If you want to make the error message friendly,
do some of the checking at initialization time and generate a
specific message.

--RDM