Progress
Programming
Handbook
When to Use the Procedure-driven and Event-driven Models
Choosing a programming model has a lot to do with the environment in which your application runs. Progress supports both character and window interfaces for several operating system environments.
Multi-tasking windowing systems, such as Microsoft Windows, offer many graphical interface objects that are more intuitive for end users. In graphical interfaces, Progress supports the use of colors, fonts, and direct manipulation (selecting, moving, and resizing) of screen objects by the user. Attributes and methods for these objects provide visual feedback to the user. In this environment, the user has access to multiple windows and can use a mouse and keyboard to enter complex input to the program. Graphical interface objects are designed to receive events from the operating system. Thus, if you plan to use these objects, you should use the event-driven model.
Character interfaces, which Windows and UNIX provide, supply a few user interface objects, including fields, text, and primitive graphics. In this environment, the user has access to only one window at a time and uses the keyboard to enter input to the program. The program processes the input behind the scenes and displays the final results as another stream of characters on the user’s screen. In general, you should use the procedure-driven model whenever a simple character interface is all your application requires.
Progress offers event-driven capabilities for both graphical and character environments. Specifically, Progress provides versions of the graphical user interface objects for character interfaces through its windowing system. Your application might combine elements of both event-driven and procedure-driven design.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |