Skip to main content

Infrastructure

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

Overview

The Spotfire runtime is divided into Model and View. This distinction separates application state from user presentation, and defines the interaction. In Spotfire the Document Model Framework is responsible for building and maintaining the model.

Runtime Division

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:

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 structure, the Document Model Framework, guaranteeing the integrity of the model. Successful development of Spotfire requires basic mastery of the Document Model Framework.

The Document Model Framework and related concepts

  • 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.
  • Extending the Document
    The document model is a node tree. It is extended by adding new nodes.