[Zope] Java Port

Barry A. Warsaw bwarsaw@cnri.reston.va.us (Barry A. Warsaw)
Wed, 3 Nov 1999 11:41:21 -0500 (EST)


>>>>> "MP" == Martijn Pieters <mj@antraciet.nl> writes:

    MP> As for he C code, if you get Acquisition to work in Java,
    MP> you're halfway there. That is the hardest piece of Zope to
    MP> convert I think.

There are some parallels to Acquisition already in JPython, although
the ideas haven't been formalized or used to the extent they are in
ExtensionClasses.  I know JimH was aware of JimF's work here when he
designed the mechanism, and it's something that I am quite interested
in exploring with JPython.

Essentially, when an attribute is found on a JPython object, a call is
made to a method of the returned object, passing in the container of
the object.  In JPython the method is a Java method called _doget(),
which can't be overridden in Python.  From my understanding of
Acquisition's basic model, _doget() plays the same role that __of__()
plays.

At some point, it would neat to standardize all this so things would
work the same in JPython as in CPython/EC. _doget() is a key piece of
the JPython machinery even apart from any Acquisition-y things it
might be used for.

-Barry