Skip to main content

Runtime Structure

The runtime comprises client and programming concepts not directly related to the features of Spotfire. Particularly the Document Model Framework must be mastered.


The Model-View-Controller design pattern separates representation of state (Model), from presentation of state (View) and manipulation of state (Controller). Since Windows® Forms programming treats the View and the Controller as a single UI concept, this runtime description will solely rely on the Model and View concepts.

The general principle of Spotfire is to represent the state of a UI artifact by a Model object, and then present this state using a corresponding View object. For instance, a bar chart is defined by two objects: The BarChart object represents the state, from which the BarChartView presentation object retrieves the data it needs to draw itself.

The Spotfire Runtime

From the moment data is loaded, the state of the view is derived from the state of the model. Actions in the view result in model changes that propagate back to the view via events, which in turn result in the view redrawing itself:

Model-View sequence diagram for File > Open

View objects must be stateless in the sense that they should only hold state that can be directly derived from the model. The purpose of any view object is to change properties in the model according to the user interaction, and then redraw itself to reflect the new state of its corresponding model object. Since views are typically composite in nature, for instance a page view usually contains visualization views, the view type corresponding to a model must be identified. This is handled by the ViewRegistry.

The Document Model Framework and related concepts

The clear-cut distinction between model and view ensures that the state of the document is consistent prior to any UI updates. Violations to the interplay between model and view potentially result in vicious event–redraw circles. Since corruptions of the model result in error or worse, there is a dedicated and extendable structure handling states, the Document Model Framework. The Document Model Framework provides the building blocks of a Spotfire document in a running instance of Spotfire. It guarantees the integrity of the document model.. Successful development of Spotfire requires basic mastery of this structure.