[Zope3-dev] RFC: Reducing the amount of ZCML directives
regebro at gmail.com
Mon Feb 13 08:09:39 EST 2006
On 2/13/06, Philipp von Weitershausen <philipp at weitershausen.de> wrote:
> Sometimes not only using more lines, sometimes only using 2 or 3 more lines.
> I'd say whoever wants to save 2 or 3 lines at the expense of indirection is
I don't think it's about saving lines, but about saving headaches. ;-)
> > I think that goal is misguided, as
> > it would require you to make longet ZCML files with more basic
> > statements. This in turns means you need to understand more of what
> > you are actually doing.
> Well, how much longer would the ZCML files really be?
The point is that it requires you to understand more of the internals
of Zope3, making it even harder to use and understand. Which is
exactly the opposite of what people who try to use Zope 3 say they
> Plus, I don't think letting people in on the secret that factories are
> utilities, for example, is a bad idea.
Now you are switching from the generic to the specific in an effort to
I didn't say that removing the factory statement was a bad idea.
> > Many of the statements you want to deprecate should be deprecated,
> > true.
> I'm confused. I thought I'm shooting slightly beside the goal :).
> > But I think the main effort of ZCML simplification is to move
> > things into Python that does not belong into ZCML at all.
> Yes. This proposal is only scratching the surface of this problem. As I said in
> my email and point out at the end of the proposal, this is just the beginning.
> The more extensive ZCML directives like browser:page and the form directives
> require a lot of thinking. I'm not there yet :). Let's take it step by step.
Ah, but I think that of you try to get rid of *those* then you are not
slightly wrong anymore, but doing a Cheney. ;-)
And when it comes to step by step, I think we should think about the
big/basic stuff first, becuase that's what will cause problems if we
do it. Depracating specific statements is comparatively a no-brainer.
> The adapter statement is still necessary as an on/off switch. Who says that you
> always want that adapter? And perhaps you want to override it with a different
> one. ZCML is good for on/off switches, Python isn't.
That's a good point. But maybe then it should be made into an
on-off-switch, instead of a defining switch?
> > Simplification of ZCML should have the goal not to have less
> > statements, but not to do things in ZCML that shouldn't be done in
> > ZCML,
> I disagree. The simplification should be about both.
> I hope zope.app will go away :). Seriously, I rather have meaningful interfaces
> with which I register *and* look-up stuff the same way than registering
> something with a factory directive and looking it up by IFactory. I see no
> connection obvious connection there. And you will have to remember the
> interface anyway, whether you use <factory /> or not...
As noted, I don't have any quarrel with removing the factory
statement. In fact, I think it is highly obscure, and personally, I
don't understand what you are supposed to do with it, which is a bad
If you want +/- per statement, then I'm minus on removing
browser:addform, and I'm unsure about the vocabulary statements. (But
I actually want to get rid och schemas altogether, I think they are
complicated to use and understand and not good enough, and should be
replaced with something based on XForms. ).
The others I'm either +1 on, or don't know anything about.
Lennart Regebro, Nuxeo http://www.nuxeo.com/
CPS Content Management http://www.cps-project.org/
More information about the Zope3-dev