[Zope3-dev] IFactory, and composite factories

R. David Murray bitz@bitdance.com
Sun, 1 Sep 2002 16:03:57 -0400 (EDT)


On Sun, 1 Sep 2002, Jim Fulton wrote:
> The main purpose of IFactory is to support "createObject", so I suppose
> that another term would be "creator".
>
> Another option is to rename the factory attribute in ZCML.

The problem is that I think 'factory' is the "correct" term for
both cases.  I think 'creator' could be used in either case, as well,
but I'm certainly willing to consider renaming the attribute
to 'creator'.

But, just what is the distinction between the two?  One is for
creating objects/components that will live in the ZODB, and the
other is for specifying through zcml how to create the objects
that glue the App server together (but aren't Persistent objects)?

I kind of feel like we have Factories and factories, if you get my
drift.  But that may be too subtle by itself for documentation
purposes.  Maybe using the same name is OK (given that the name is
accurate in both cases) as long as we make a distinction in the
documentation between a 'factory', and 'a factory for creating
persistent objects'?

Or maybe it's too soon for me to be thinking about this, maybe
I need to get further into creating the documentation before
the answer will become clear.

--RDM