The model-view-controller paradigm
The dynamic user interface architecture is based on the Model-View-Controller (MVC) paradigm.
The model defines the object to be displayed (typically the application data that is stored in program variables). The view defines the decoration of the model (how the model must be displayed to the screen, this is typically the form). The controller is the interactive instruction that implements the program code to handle the model.
Views are defined in the abstract user interface tree from compiled .42f
forms loaded by programs. The program variables act as models, and you implement the
controllers with interactive instructions, such as DIALOG
or
INPUT
. Controllers also define action handlers that contain the
program code to be executed when an action view is triggered.
Normally the controllers are not intended to provide any decoration information, as that is the
purpose of views. Over the course of the history of the language, however, some interactive
instructions such as MENU
define both the controller and some presentation
information such as menu title, command labels, and comments. In this case, the runtime system
automatically creates the view with that information; you can still associate other views to the
same controller.