31 Frameworks for
It is unlikely that you will learn how to use a "framework class library" in any of
your computer science courses at university. Frameworks don't possess quite the
social cachet of "normal forms for relational databases", "NP complexity analysis",
"LR grammars", "formal derivation of algorithms", "Z specification" and the rest.
You might encounter "Design Patterns" (which relate to frameworks) in an
advanced undergraduate or graduate level course; but, on the whole, most
universities pay little regard to the framework-based development methodologies.
However, if you intend to develop any substantial program on your personal
computer, you should plan to use the framework class library provided with your
As illustrated by the simple "RecordFile" framework presented in the last
chapter, a framework class library will embody a model for a particular kind of
program. Some of the classes in the framework are concrete classes that you can
use as "off the shelf" components (things like the MenuWindow and NumberDialog
classes in the RecordFile framework). More significant are the partially
implemented abstract classes. These must be extended, through inheritance, to
obtain the classes that are needed in an actual program.
Of course, the framework-provided member functions already define many
standard patterns of interactions among instances of these classes. Thus, in the
RecordFile framework, most of the code needed to build a working program was
already provided by the Application, Document, and Record classes along with
helpers like RecordWindow.
If you can exploit a framework, you can avoid the need to reimplement all the
standard behaviours that its code embodies.
The "typical framework"
The commonly encountered frameworks provide a model for what might be termed
"the classic Macintosh application". With some earlier prototypes at Xerox's
research center, this form of program has been around since 1984 on the Macintosh
(and, from rather later, on Intel-Win