You are not logged in Log in Join
You are here: Home » Members » Phillip J. Eby's Zope Center » My Wikis » ZPatterns Wiki » Methoids

Log in
Name

Password

 
 
PropertyHandlers »

Methoids

In ZPatterns terminology, "Methoids" are shared, normally immutable sub-objects which, like methods, implement a portion of an object's behavior. Unlike methods, they have methods of their own, and unlike other kinds of sub-objects, they do not contain any data of their own, but operate on their containing object's data as a sort of "friend class". Examples of this approach can be found in Zope as well as ZPatterns. For example, the standard propertysheets attribute found on many Zope objects is a methoid; it contains no data of its own even though it behaves as if it does.

Methoids are a way of cleanly seperating the functionality of a variety of interfaces, and making it easier to compose new objects without overusing multiple inheritance, or conversely having to write code to glue together a set of unrelated components. PlugInGroups and PropertyHandlers are the two primary methoids dealt with in ZPatterns at present.