Qlik Sense / Qlik Analytics Platform Articles, Projects & Tutorials by Stefan Walther

Qlik Sense 2.2 for developers

Get some first insight into what Qlik Sense 2.2 brings to you as a developer.

Qlik Sense 2.2 is a big release from a Qlik Analytics perspective. A lot of new exciting functionality for developers has been added:

Revamped Engine Api Explorer

The Engine API represents the true power behind QlikView and Qlik Sense, thus the so called QIX Engine.
In Qlik Sense 2.1.1 the new Dev-Hub has been introduced, but the Engine API Explorer didn't change a lot compared to the old "Protocol Tester" (available since Qlik Sense 1.0).

The new Engine API Explorer focuses on making the start with the Engine API as enjoyable as possible, thus focuses on:

  • A consistent UI compared to the other tools in Dev-Hub
  • An easy flow to start working with the Engine API
  • Some convenience features, like easy copy&paste, etc.

The new Engine API Explorer

Qlik Analytics for Visual Studio

Qlik Analytics for Visual Studio is a completely new offering introduced with Qlik Sense 2.2.
Basically it can be installed independently from Qlik Sense as a Visual Studio 2015 plugin and is therefore available on Microsoft's plugin site.

The Visual Studio plugin is a development toolbox created to simplify the process of integrating Qlik Sense functionality into other environments. Qlik Analytics for Visual Studio provides quick access to relevant information from your Qlik Sense environment, which for instance makes it easy to integrate Qlik Sense visualizations into an existing web site.

You will be able to:

  • Explore apps and its related sheets and objects.
  • See all your apps, with related sheets and objects.
  • See a preview of the object.
  • See the properties of the server and charts.
  • Drag-and-drop objects (in different modes) directly into your code.

Qlik Analytics for Visual Studio

Visualization API

Prio to Qlik Sense 2.2 a developer had to create visualization objects first in Qlik Sense to embed those into mashup based websites.

By using the newly introduced JavaScript API Visualization API it is now possible to create all objects on the fly. You just need a Qlik Sense app (containing the data model and data) and then you are ready to go:

Create objects on the fly using the new Visualization API

Qlik Visuals

Based on the Visualization API Qlik Visuals allows you to create visualization objects on the fly in a 100% declarative manner:

<qlik-visual appid="Helpdesk Management.qvf"
     type="barchart"
     cols='["Case Owner Group","=Avg([Case Duration Time])"]'
     options='{"title":"On the fly barchart"}'>
</qlik-visual>

Results into:

Visualization Extensons on the fly (in Mashups)

Visualization Extensions can now be used in Mashup solutions without having them registered/imported first on Qlik Sense server. Just reference the code of your Visualization Extension by using qlik.registerExtension and load it on the fly:

// Determine the path
var path = window.location.href.substr( 0, location.href.lastIndexOf( "/" ) );

// Register the desired extension
require( [path + "/myextension/myextension.js"], function ( myextension ) {
    qlik.registerExtension( 'myextension', myextension );
} );

More properties in Visualization Extensions

Qlik Sense 2.2 also gives more power to Visualization Extension developers. The following property-types are now officially supported and documented to be used in Visualization Extensions:

Example: The array/list property:

More on defining custom properties can be found in the official Qlik Sense Developers help.

Faster Mashup Loading

Mashups will load faster in the future since the size of qlik-styles.css has been reduced from 750KB down to a portion of its original size.

qlik

App Integration API

The newly introduced complements the set of URL based APIs to integration Qlik Sense into existing websites, workflows and processes.

The App Integration API provides parameters that can be used to create an URL that returns a complete HTML page containing the embedded app. This URL can be embedded in a web page, for example by including it in an iframe.

It allows you to pass parameters to an app and to open an app with one or several selections applied.

Example 1: Clear selections + new selection

<iframe src="https://%server-name%/
        sense/app/%app-id%/
        sheet/%sheet-id%/
        state/analysis/
        options/clearselections/
        select/Region Name/[International]" 
/>

Example 2: Call a bookmark

<iframe src="https://%server-name%/
        sense/app/%app-id%/
        sheet/%sheet-id%/
        state/analysis/
        bookmark/%bookmark-id%" 
/>

More information can be found on the Qlik Sense Developers help site.

Non clashing CSS frameworks

Prior to Qlik Sense 2.2 it was unfortunately quite often the case that mashup developers struggled using one of the most common CSS frameworks in combination with Qlik Sense. The reality was, that the frameworks’ styles and Qlik Sense CSS declarations clashed immediately.

Starting with Qlik Sense 2.2 the experience is a completely different. We have put big efforts into allow living the CSS frameworks side by side with Qlik Sense.
The following six most common CSS frameworks should now work out of the box with Qlik Sense:

The six most common CSS frameworks work now out of the box with Qlik Sense

Note: Due to the fact that all these frameworks can basically change over night, it will never be possible to support these frameworks officially, but the ambitious aim is to make them just working out of the box in the future.

API Improvements

The following improvements have been added:

Engine API

  • Data can be exported from pivot tables
  • Sorting has been improved in pivot tables
  • Updated API for search

Selection API

An new Capability API has been added, to better support Visualization Extensions & Mashup developers to bring Qlik Sense' unique selection capabilities into their solutions.

// Get the current selection state
qlik.app.selectionState(state);

Reference: Selection API in Qlik Sense Developers help

.NET SDK

  • Improvement of the asynchroneous behavior
  • You can now use more versions of the NuGet packages

Qlik Sense Repository Sevice API