The ViewKit Application Framework

The ViewKit application framework makes it easier for programmers to develop applications that require a graphical user interface. The ViewKit is not a stand-alone library, but instead leverages the Motif user interface toolkit to provide a complete solution that is more flexible than a typical application framework, but more powerful than using only the Motif toolkit. When developing with the ViewKit library, the framework provides a high-level application architecture along with pre-packaged solutions to common needs. At the same time, developers who require more flexibility always have full access to the Motif user interface library, with all its low-level widgets.

The ViewKit framework is written in C++ and provides strong support for an object-oriented application architecture that works well with the Motif toolkit. The ViewKit library supports a strongly stylistic approach to using the Motif widget set, based on the usage patterns of experienced Motif programmers. Developers who are new to Motif programming will find themselves automatically guided to an architectural approach that is straight-forward and flexible, and that supports both small and large applications.

Because the ViewKit library emphasizes a particular application architecture, the ViewKit framework is best suited for new development. It may be difficult to move existing applications to the ViewKit framework, but those beginning new development will find distinct advantages to using the ViewKit architecture. Developers who are familiar with C++ will find that the ViewKit library offers a familiar and comfortable object-oriented architecture for writing applications while allowing them to take advantage of the standard user interface facilities provided by the Motif library. Programmers who have used the Motif widget set will find that the ViewKit framework performs tasks automatically that they have had to implement themselves in the past.

One of the strengths of the ViewKit library is its support for small details that are often neglected when using the Motif widget set. For example, many applications need to perform certain operations that prevent the application from interacting with the user while the operation is in progress. The accepted behavior in such situations calls for the application to display a busy cursor if the period of time is expected to be brief. For longer periods of time, a dialog may be posted, possibly providing occasional feedback about the progress of the task. In X applications, it is important to also be sure input is blocked during the period in which the application is too busy to handle events. If an application supports multiple windows, input needs to be blocked and a busy cursor displayed in all currently visible windows. Ideally, if the operation is lengthy, the application should allow the user to interrupt the task, as well.

From a user's perspective, such behavior is simply expected. However, when using the Motif toolkit, implementing these features for all situations in which an application may be busy performing some task is sufficiently difficult that many applications do not support this behavior. The ViewKit framework provides extremely easy-to-use support for such situations. Programmers simply call a function to indicate that the application is entering a busy region and another to indicate when the application is no longer busy. Calls can be nested, and the same function can be used to display an optional status message. The ViewKit framework handles the details of creating busy cursors, displaying them in all windows, disabling input to all windows, creating and displaying dialogs if necessary, and so on. This simple feature alone can save a programmer hours, if not days of work. Allowing operations to be interrupted is trickier, and necessarily requires some cooperation from the developer. However, the ViewKit framework provides as much support as possible to make interruptible operations easy to implement.

___________________________________________________________________