The MVCD Design Pattern:
Comparison with the Classical MVC Model

The main difference between the present framework and the classical Model/View/Controller (MVC) framework is that in this framework, a Controller element encapsulates the actual control functions to be performed on one or more instances of associated Models. In the classical MVC framework, a Controller represents the functions that may be performed by a human interface element to modify the data in the Model or the appearance of the Model presented in the View. In the present framework, this function is performed by a HMI (Human/Machine Interface) element.

The major differences in the interactions among framework elements that are introduced by this modification of the classical MVC framework are shown in the tables below.

NOTE - The object classes and interactions shown are abstractions and do not necessarily represent the actual names of methods or object classes.

Effects of Model Data Change

In the classical MVC framework, the Model (e.g., a data base or dynamic process model) notifies both the Controller and View elements when its data has changed, with the effect that the View updates its graphic representation of the Model and the Controller element notifies the user of the change.

In the present framework, the Model (a function block instance) also notifies the Controller and View elements (also function block instances) when its data has changed, e.g., via an event at its IND output along with associated data. However, in this case the Controller may take appropriate control actions and notify the Model to change some of its data (e.g., via a REQ input and associated data to the model), and may also notify the user of the change through an HMI element (also a function block instance).

NOTE 1 - In this framework the "HMI element" replaces the "Controller element" of the classical framework.
NOTE 2 - In this framework a change of Model data may cause 2 changes in View data: the first due to the initial data change in the Model, and the second caused by the feedback from the Controller.

This framework allows the Model element to be replaced by an Interface element, i.e., a function block instance which implements the same interface as the Model element.


Effects of User Input

In the classical MVC framework, user input is translated by the Controller element into either a command to the Model element to change its data, to the View element to change the way the data is displayed, or both.

In the present framework, user input from an HMI element (a function block instance) notifies the Controller element (also a function block instance) when its data has changed, e.g., via an event at its IND output along with associated data. In this case the Controller may take appropriate control actions and notify the Model to change some of its data, which may then also notify the View of the changed data.

NOTE 1 - If the effects of the control actions are such as to cause additional changes in the Model data, this may result in additional notifications to the Controller and View elements.
NOTE 2 -In this framework, a View element may also contain HMI elements for user input to the Model, which may result in a notification from the View element back to the Model element, which in turn may notify the Controller of the associated data change. In the control system implementation, this notification would then be built into the Equipment interface. An example of this is the fault injection mechanism built into the View elements.