Bonobo::GenericFactory vs. GNOME::GenericFactory



The stock bonobo factory implementation is called
Bonobo::GenericFactory, but both gnorba and OAF expect it to be called
GNOME::GenericFactory. This is broken. The only reason it works is
because ORBit is not anal and will let you cast between objects that
implement differently named interfaces with identical contents.

I propose that the interface be called GNOME::GenericFactory
everywhere, since nothing about it is Bonobo-specific. It can be (and
is) used to activate objects that do not implement any Bonobo
interfaces. No other Bonobo interfaces reference it, and vice versa.

Actually, it is not even gnome-specific really, so I would propose yet
another module name. I suggested OAF::GenericFactory on IRC, but
Miguel didn't like it because he doesn't think the factory interface
has anything to do with activation. I disagree with him. Activation is
the _only_ thing that uses the factory interface. Also, this interface
was originally part of gnorba since it was activation-related; I think
the same arguments apply to putting it in OAF. Basically I think
renaming the interface in the first place was a mistake.

Also, right now the IDL file is checked into 3 places, gnorba, bonobo
and oaf. gnorba is deprecated in the long term at least, but having 2
copies of the IDL file long-term still sucks, in case someone needs to
change the interface. For instance, it may be worthwhile to add ref()
and unref() operations to the GenericFactory interface and make OAF
use them, to reduce the possibility of race conditions during
activation. Miguel brought up the possibility of some weird new system
that does activation in a different way, perhaps from a database, to
try to argue that the factory was not related to activation. I don't
think this argument is relevant. Such a system should implement the
OAF::ObjectDirectory interface and tie into the existing system.

I think the IDL and the code relating to this interface should, in the
long term, live in the oaf module.

Awaiting everyone's constructive comments.

 - Maciej




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]