Application Frameworks

Fortunately, there is a relatively recent development that has been more successful at meeting the real needs of developers. This new approach revolves around an architectural model known as an application framework. Application frameworks have been used successfully on Macintosh and personal computers, but have been less common in the UNIX environment. The concept behind an application framework is simple: instead of providing a library that contains small pieces from which an application can be built, an application framework implements an application that is fully functional, except for those parts that are application specific. Programmers who use such a framework can start their development with an application that already fully implements as many generic features as possible. Such features might include support for on-line help, support for audio input and output, automatic integration with the desktop or other applications in the environment, and so on.

Most application frameworks rely on object-oriented technology to provide as many basic services as possible without eliminating the developer's ability to modify the behavior of the basic application model. Because of the way in which frameworks typically work, application frameworks have been described as "upside-down libraries." When using traditional user interface toolkits, applications implement the control flow of the application and call functions provided by the toolkit when various toolkit-level services are needed. In an application framework, a significant portion of the control flow and application-level logic is contained in the library. The library calls functions provided by the application when application-specific behavior is required. Generally, these hooks are supported through the use of inheritance. The framework provides a collection of classes that implement the default behavior expected of all applications. Applications modify these classes to support application-specific behavior by creating subclasses that override the default behavior of the framework, as needed.

One problem with the application framework model is its tendency to be less flexible than the traditional toolkit approach. Any given application framework generally provides strong support for a certain style of application, but provides only weak support for applications that fall outside the domain for which the framework was designed. In the worst case, an application framework's design may interfere with an application's desired behavior.

___________________________________________________________________