Python component model
paul at boddie.org.uk
Tue Oct 10 19:54:49 CEST 2006
skip at pobox.com wrote:
> Edward> My OP was just to query whether a component model existed for
> Edward> Python, like JavaBeans for Java or .Net for C#, C++/CLI
> Edward> etc.
> For those of us who've never used Java, .Net or C++/CLI, a more concrete
> description of what you were after from the beginning would have been
>From vague recollections of the original Java Beans technology, the
primary "innovation" was to have getProperty and setProperty methods,
along with things like isCapability and hasProperty, if I remember
correctly. None of this was really shocking to anyone using Python,
mostly because Python had __getattr__ and __setattr__ even back then
for customising real property/attribute access, and Python's run-time
introspection capabilities were superior to Java's (and probably still
The other innovation was the introduction of standard interfaces for
listening to and dispatching events, where you implement some listener
interface and respond to events in order to "care about" those events.
I don't recall any particularly good mechanisms for connecting beans to
each other in order to fire off events, although the beanbox (or
whatever the graphical tool originally promoted was called) and/or the
IDE is supposed to help you with that part of the work.
The groovy 1990s API is actually viewable in various places; here, for
Despite the supposedly exciting advances heralded by Java Beans, a
large part of the technology was just codifying existing practices and
techniques, but it could be argued that such techniques have been
superseded by signal/slot mechanisms and more advanced event
architectures (pioneered by frameworks like Qt and since adopted by
Gtk, I believe).
More information about the Python-list