Properties and attributes

At first glance, properties might seem similar to attributes. However, these two mechanisms accomplish different goals and provide slightly different features.

Properties features Attributes features

Comparison of Properties interface and Attributes features
Allows multiple, unrelated clients to access the same collection of instances, cross-task and cross-session--without interfering with each other. Address issues related to storage management on a single task basis.
Mutable--you can change the value of a property as long as it is not defined by an interface that specifies the value as read-only. Immutable--once you establish the value for an attribute, you cannot change it.
Allow you to store instances of almost any type without providing a special protocol. Requires you to inherit from an attribute class in order to add an instance to an attribute collection.
Provides a query mechanism that you use to ask questions of a collection of properties. Does not provide a query mechanism.

The two primary clients of properties within the CommonPoint application system are the File System and the Communications Directory Service framework. These subsystems use properties to access instances across task boundaries.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker