Jump to content
  • Spotfire® Add-in Framework

    This article explains Spotfire add-ins


    A Spotfire extension is the smallest functional unit added to the platform. It is developed in Visual Studio® and is included in a Spotfire add-in.

    A Spotfire add-in is implemented as a C# project in Visual Studio®. The design guidelines for Spotfire extensions prescribes that every add-in contains one class derived from the AddIn class. An add-in is basically defined by information provided when creating the project from the SDK template. The add-in project contains one or more extensions. Additional extensions can easily be added to the project at a later point in time, to build a new version.

    Each extension is implemented in a set of classes, typically overriding a base class defining a specific extension type. The add-in registrations are made declaratively by overriding an extension type specific method, Register[ExtensionType](). Each such method is passed a registrar that allows the add-in to register the extension in the appropriate registry in Spotfire. For instance, to register a new tool, the RegisterTools(ToolRegistrar) is overridden. A similar procedure is used when licensing extensions.

    An add-in can also register services that can be used by other add-ins. This provides a simple way for add-ins to provide extension points of their own.

    module is defined as qualified for loading in Spotfire if it has a valid module definition file (module.xml). It declares the add-in to the application by defining the fully qualified type name for the AddIn class and the assembly name. It also declares a unique project GUID and a strong name for the assembly. Combinations of these uniquely identifies the project and the add-in. Extension assemblies must therefore be signed with a strong name key using a strong name key file (.snk). The extension project template contains a default key. You may replace this key file with your own, but if you do, make sure to alter the module definition file accordingly.

    Extensions are compiled and packaged into Spotfire packages, .spk files, containing the dlls for the extension code and other resources as well as amodule.xml file describing the metadata of the extension.

    Extension artifacts

    Packages and add-ins

    An Extension is typically implemented in with a Visual Studio solution containing one or more projects of which at least one contains an add-in, that is, a class deriving from AddIn. There must also be a module.xml file that describes the metadata of the extension and points out the AddIn classes. The Spotfire Package Builder application that is part of the SDK helps with creating and updating the module.xml file and creating the .spk file for the Spotfire Package.

    When Spotfire loads a deployed package (sometimes also referred to as a module), it will instantiate all its AddIns and let them register their extensions. It is possible for an AddIn to register more than one extension. It can, for instance, register tools, custom data methods, and both models and views for custom visuals.

    Intended clients

    Each Spotfire Package has an intended client attribute in its metadata that describes whether it shall be downloaded by the installed client, the web client or both. In most cases, all extensions provided can be run on both clients. If so, when creating the Spotfire Package Builder project, set the Spotfire Intended Client project option to Spotfire Any Client.

    Client specific extension parts

    In cases where you need different view implementations for the installed client and the web client, the extension should be split into two or three packages, targeting the different clients.

    Model add-ins

    Implement the model parts using the core Spotfire APIs and define the add-in in a Visual Studio project. When creating the Spotfire Package Builder project, set the Spotfire Intended Client project option to Spotfire Any Client.

    View add-ins

    Extension views are also set up as Visual Studio projects. They define their own add-ins, registering the view by overriding the RegisterViews method. They must also define dependencies to the project implementing the model that is used by the view. For views that target either Spotfire Analyst or Spotfire Business Author and Spotfire Consumer, the Intended client for the Package Builder project corresponding to the view is either set to Spotfire Installed Client or Spotfire Web Client.

    Extension artifacts example

    The following figure illustrates an extension with one model component and two views, one for Spotfire Analyst and one for Spotfire web clients:


    Note: some extension types, for example Custom Visualization or Custom Panel, use the same HTML/JavaScript-based view for all clients and no form-based view is needed.

    Licensing Extensions

    A Spotfire license controls access to a specific extension. Learn more.

    32-bit and 64-bit platforms

    64-bit (x64) platform, as opposed to 32-bit (x86), is considered the default platform for Spotfire. If the custom extension uses a third party native 32-bit DLL to run on a 64-bit platform, the 32-bit DLL must be executed in a separate 32-bit process. Learn more.

    User Feedback

    Recommended Comments

    There are no comments to display.

  • Create New...