How Classes and Parts Are Related

VisualAge parts are C++ classes that conform to the IBM notification framework. Composite parts are made up of embedded parts. We use the term part to refer to both a class and its instances, as follows:

During visual composition, you interact with part interfaces. The most useful part interfaces contain the following features:

Access to data, or attributes. A complete attribute interface includes member functions to return the value of the attribute, to set the value of the attribute, and to notify other parts when the value of the attribute changes. The interface for a attribute does not have to be complete. For example, a attribute might be read-only, in which case the interface would not support the ability to set the value of an attribute. A attribute can be any of the following:

Access to the behavior of a part, or actions. These represent tasks you can ask a part to perform, such as open a window or add an object to a collection of objects.

Event notification. By signaling events, a part can notify other parts that its state has changed. For example, a push button can signal an event to notify other objects when it is clicked, or a window can signal an event when it is opened, or a bank account can signal an event when the balance becomes negative.

Events can also be signaled when the value of a part attribute changes, such as when money is deposited into or withdrawn from a bank account.


Related concepts
Visual Programming Fundamentals
VisualAge Component Model
Visual Composition
Part Design Guidelines