Spotfire Developer Documentation

The SDK

The SDK from Spotfire Developer provides required Spotfire developer resources: the Spotfire Extension Project Templates, development assemblies, example projects, and the Package Builder application which can be used to wrap the extensions for deployment. Some of the examples are available for deployment of Web Player packages on either Windows or Linux platforms.

The SDK is required when extending the platform. See Downloading Spotfire Developer for information on how to obtain the Developer product and the SDK files.

Unzip the SDK into the recommended folder structure: Spotfire SDK\[version]\SDK

The structure may be placed in any location.

The SDK is a folder structure. The unzipped SDK contains the following folders:

Binaries

This folder contains the .NET assemblies that are referenced when creating solutions using the Spotfire platform on Windows or on Linux. Since the two platforms have different .NET requirements, the Binaries folder contains one set of files for each type. It also contains the related IntelliSense files.

Examples

This folder provides a wide set of solutions that may be used to solve common development scenarios. The SDK is divided into subfolders based on the technical character of the solutions:

COM Automation: Describes inter-application communication using COM.

Extensions: Provides a set of fully functional .NET projects solving specific tasks for Spotfire and Spotfire web clients. These extensions are simple enough to constitute a source of insight as well as code. Refer to the Community for a list of extension types and other options to add analytic capabilities to the platform.

All of the provided example extensions are included in the Visual Studio solution Spotfire.Developer.Extensions.sln, and all custom tools examples that contain C# code are included in the solutions Spotfire.Developer.CustomToolsExample.sln and Spotfire.Developer.CustomToolsExampleVS.sln. The solutions provide an easy way to get started with the examples and can be compiled in Release mode directly. Both the intended platforms windows and linux are built automatically.

All C# example extension projects include a .pkdesc file, which can be used to build separate packages using the Package Builder console.

Two distribution description.xml files, DistributionDescription-windows.xml and DistributionDescription-linux.xml are included for the C# example extensions. These files list the examples to include in the distribution for each platform.

The two .bat files BuildPackages-windows.bat and BuildPackages-linux.bat contain logic to build all valid Windows and Linux packages, respectively, for the C# example extensions using the Package Builder console. They call the included .pkdesc files for the applicable examples and use the provided description.xml files to build distribution files containing the example tool packages.

Four of the existing example projects have currently been adopted for both .NET flavors (for building on Linux as well as on Windows):

  • SpotfireDeveloper.CalculationMethodExample
  • SpotfireDeveloper.CustomToolsExample
  • SpotfireDeveloper.CustomToolsExampleForms
  • SpotfireDeveloper.CustomToolsExampleWeb

For all these, the csproj files have been converted to SDK-style and they all contain two csproj files. One for just compiling for the two flavors of .NET, and another one that integrates with PackageBuilder-Console to also automatically build the package files.

In addition to extension projects, this folder contains the SpotfireDeveloper.ApiExamples project, which provides source code illustrating how to automate common tasks, like configuring visualizations, handling filtering and periodically refreshing data.

Integration: Provides an example on how to call REST/SOAP methods in the Spotfire Server.

JavaScript: Provides mashup solutions using the JavaScript API of the web clients.

Package Builder

Spotfire Package Builder provides a framework for developing, debugging, packaging and deploying extensions to Spotfire. It is an important tool when adding custom capabilities to the Spotfire platform. There is both a UI-based version and a Console version of the Package Builder available.
Note: Building extensions for Linux is only supported using the Spotfire Package Builder console and not using the graphical Package Builder tool.

Starter

Contains a special Spotfire.Dxp.exe integrating with the expanded Package Builder application. It is used by the examples projects to enable extension development and debugging.

Also contains a special Spotfire.Dxp.exe.config file, which is configured by Package Builder at design time to reflect the configuration used while developing extensions, thereby covering development across all supported Spotfire versions.

Templates

The Spotfire Extension Project Template is used in Visual Studio® to create new Spotfire extension projects. It handles implementation details and enables you to focus on adding new functionality. There are multiple versions of the template available, depending on which platform you intend to develop your extension for (Windows or Linux), and how to work during development (using the Package Builder or Visual Studio only).

A project file to be run on Linux must be a so called "SDK-style project", see https://docs.microsoft.com/en-us/dotnet/core/project-sdk/overview .

However, it is possible to use SDK-style for building Windows projects as well. Therefore, the template projects are set up to build both flavors of .NET automatically by using the property <TargetFrameworks>net48;net6.0</TargetFrameworks> in the csproj file.

To automatically refer to the correct version of the Spotfire binaries, the MSBuild property TargetFramework is used to construct the reference path in the csproj file. For example:
<Reference Include="Spotfire.Dxp.Application">
<HintPath>../../../Binaries/$(TargetFramework)/Spotfire.Dxp.Application.dll</HintPath>
<Private>false</Private>
</Reference>

VisualStudioMacros

The SDK contains a Visual Studio macro simplifying development of document nodes. It injects boiler plate code based on the private fields defining a custom Spotfire document node.