[Zope-dev] Re: [Plone-developers] zcml entry points

Martijn Faassen faassen at startifact.com
Mon Oct 22 10:40:53 EDT 2007


Hey,

On 10/20/07, Lennart Regebro <regebro at gmail.com> wrote:
> On 10/20/07, Martijn Faassen <faassen at startifact.com> wrote:
> > I'd say it is a general concern of a framework to try to avoid how often
> > you need to repeat yourself. Right now you to use a Zope 3 package you
> > need to do the following things:
> >
> > * list the egg in your setup.py dependencies
> >
> > * load the ZCML required
> >
> > * import it in your code
>
> True. But they do different things.
>
> 1. Says "download and install a component"
> 2. Says "configure a component"
> 3. Says "use a component"

Sure, they do different things. Nonetheless, there is repetition that
could be reduced. In fact
there's potentially a fourth place now where we reference dependency
information again:

4. Use this version of this component

(though this may be maintained outside of the actual package)

In at least 3 places we express dependency information. For different
*purposes* in each case, but we still state something like:

1. "we use dependency X, and please download and install it"
2. "we use dependency X, please configure it"
3. "we use dependency X, please import the following from it"

It'd be nice if I only had to say "I want to import from dependency X,
please make sure it's there and available." Actually this is a little
bit like zc.resourcelibrary can make resources appear on your page
headers when you write code that needs it.

Of course this is sometimes not possible, as there's not enough
information available, or there are multiple separate ways to
configure it.

But there is significant repetition spread out across the codebase.
It's not in one place, which forces a repetition in referring to the
component being installed/configured/imported. My response is to think
about ways to reduce this (while of course, looking for ways to retain
power and flexibility).

Regards,

Martijn


More information about the Zope-Dev mailing list