[Contents] [Previous] [Next]

Framework programming

Another way to look at the class library-framework continuum is to think of a framework as having two additional APIs that are orthogonal to the calling and subclassing APIs: the client and customization APIs. Whereas the calling and subclassing APIs describe the mechanism by which functions are invoked,
the client and customization APIs describe the way developers use a framework's functions.

A framework's client API is employed by a programmer who wants to use the framework as it is intended to be used. Using a client API can in turn involve using both the calling and subclassing APIs, but without changing the fundamental internal operations of the framework.

The customization API is employed by a programmer who wants to modify, enhance, or extend a framework's behavior. Using a framework's customization API usually involves using the subclassing API, but in more complex ways that end up changing some portion of the framework into something completely different. However, the customization API can also involve the calling API if customizing the framework requires the programmer to provide new calling API functions. This kind of arrangement is analogous to "delegation" or "callbacks" in procedural programming.

In practice, the distinction between client and customization APIs gets blurry. A CommonPoint programmer can use a framework in a range of ways:


[Contents] [Previous] [Next]

Addison-Wesley Publishing Company, Copyright©1995 by Sean Cotter and Taligent,Inc. All rights reserved.