<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Miralem Drek on Medium]]></title>
        <description><![CDATA[Stories by Miralem Drek on Medium]]></description>
        <link>https://medium.com/@mm85dk?source=rss-96138dc03991------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nsa3ivBPLNP7_Y2paF1yLw.jpeg</url>
            <title>Stories by Miralem Drek on Medium</title>
            <link>https://medium.com/@mm85dk?source=rss-96138dc03991------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:54:58 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mm85dk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The challenges of making a native extension]]></title>
            <link>https://medium.com/qlik-branch/the-challenges-of-making-a-native-extension-85d15a3703b2?source=rss-96138dc03991------2</link>
            <guid isPermaLink="false">https://medium.com/p/85d15a3703b2</guid>
            <category><![CDATA[dataviz]]></category>
            <category><![CDATA[qlik]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[d3js]]></category>
            <category><![CDATA[qlik-sense]]></category>
            <dc:creator><![CDATA[Miralem Drek]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 15:18:59 GMT</pubDate>
            <atom:updated>2018-11-02T15:18:59.141Z</atom:updated>
            <content:encoded><![CDATA[<p>Visualising data has become a rather common and simple task for developers thanks to awesome tools like d3 and picasso.js. Creating something from scratch using any one of those tools can be done within hours, even minutes.</p><p>Despite that, new extensions in Qlik Sense are few and far in between, which begs the question… what’s taking so long?</p><p>During my years at Qlik, I’ve been a member of the teams responsible for developing and delivering extensions in Sense, here are some of the biggest challenges when incorporating a new extension to be shipped with Qlik Sense.</p><h3>Showing all data</h3><p>Qlik’s Associative Engine has virtually no limit in the amount of data it can consume and provide to the client. However, sending potentially millions of points of data to a client over slow or cellular networks isn’t ideal. Even if the client gets that large amounts of data, rendering it is usually a time-consuming process, which often creates a very sluggish and sometimes frustrating experience for the user. So, if we can’t get all data at once, how can we make sure no important data is missing when visualising it?</p><p>The first step is to use various reduction and/or compression algorithms on the engine-side, and then visualise that reduced dataset to give the user an overview. The second step is to allow the user to navigate to a subset of the data small enough for it to be visualised in its raw form.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iiM8LgYDvx2f5Ui2EiTkig.png" /><figcaption>Stacked bar chart showing a reduced dataset in the mini chart, and only the largest values in each stack.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iHlNFeQUybhRYpzjvngMUw.gif" /><figcaption>Scatter plot showing a binned data set, zoom in to get to details.</figcaption></figure><h3>Snapshots</h3><p>By default, all extensions receive their data from a live backend and are updated as soon as any changes are made to the data model. When a user wants to share the current state of the extension and its data with someone else, they can do so by exporting it to an image, sharing it online or adding it to a story.</p><p>What all these actions have in common is the <em>snapshot</em>, a special static state which stores everything needed for the extension to be re-rendered in the exact same way <strong>without</strong> a connection to the engine. Storing the data in the snapshot is fairly straightforward if the extension doesn’t fetch any additional data after the initial render as this is done by default.</p><p>Any extra information like language, legend data, compressed data etc need to be stored by the developer. Ideally only the visible data should be stored since the rest won’t be visible anyway, which takes us to the second part of snapshots.</p><p>In order to exactly reproduce what the user saw, the <em>view state</em> also needs to be stored, these are interactive changes done by the user which usually only affects the view of the extension like:</p><ul><li>The size/dimensions of the chart.</li><li>Scroll position in the chart and legend.</li><li>Zoom level and coordinate in a map.</li><li>Angle of rotation in a pie chart.</li></ul><p>When the extension is rendered from the snapshot state, only data available in that state can be used since a connection to the engine is not available. If you forgot any part, you’re out of luck.</p><h3>Labeling</h3><p>While shapes, lines and other visuals can be used relatively freely to encode data, labels don’t enjoy that same freedom. Unlike shapes which are used to create patterns, labels have the main purpose to provide extra details on what a shape represents, and must therefore fulfill the following requirements at all times:</p><ul><li>Must have high enough contrast with its background to fulfill minimum accessibility requirements.</li><li>Need to be close enough to the data point to avoid ambiguity in what it’s labeling.</li><li>Must not overlap or be too close to other labels.</li><li>Must not overlap with shapes it’s not associated with.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RVWqtFROxAtpciHQipc7IQ.png" /><figcaption>Value labels in a stacked bar chart receive a white backdrop to increase readability</figcaption></figure><h3>Migration and object conversion</h3><p>All settings seen in the property panel are stored as properties of the extension and persisted between different versions of Qlik Sense. This works fairly well, until we add or remove a feature which requires changes in those properties. To ensure backwards and forwards compatibility of an extension we need to migrate properties between Sense versions by patching old releases. For example, if we add support for a second measure to an extension that previously only supported one, we need to go back and ensure the extension works with the new measure in older releases, if not we need to add a migration patch to that release to make sure the extension still works.</p><p>You might think that when a certain feature has been changed and the relevant properties have been migrated, there is no longer any need to keep code that handles the old properties… think again. Remember snapshots? Those little bastards are generally not something we can migrate, in particular if the change affects the hypercube. For that reason code that handles really old stuff has to coexist with new code. To this day, there are snippets of code that is run only in case a five year old snapshot needs to be rendered in the latest Sense release.</p><p>Another part of Sense where properties are heavily modified is during chart conversion. As the extension is converted between various charts, its properties are moved, removed or merged depending on how relevant one chart’s properties are to another. Properties that happen to have the same name but have completely different values or are not applicable to the new chart are <em>quarantined </em>in case they need to be restored.</p><h3>Responsiveness</h3><p>When Qlik Sense was released in 2013, it’s support on touch and mobile devices was unrivaled. This was mainly due to extensions being responsive and had their content adapted based on the available size. Components like legends and axes were removed in case there wasn’t enough space. Even components that didn’t necessarily take up extra space in the layout were adapted by removing parts of them or changing font size in order to reduce clutter. In addition to the size, extensions adapt based on whether the device has touch support by for example increasing the size of shapes and whitespace in order to make them easier to tap.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ofszk7xI0bhbhDUAZA-6xg.png" /><figcaption>Bar chart responding to varying width.</figcaption></figure><p>With each new extension it becomes easier and faster to overcome these challenges as we develop tools and APIs to solve them. One of the biggest steps towards speeding up the development of new extensions was picasso.js, which allows us to quickly create re-usable charts. As we continue our work with extensions, we are continuously looking out for ways to simplify the work required both internally as well as externally for our developer community. There are good things ahead, stay tuned…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=85d15a3703b2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/qlik-branch/the-challenges-of-making-a-native-extension-85d15a3703b2">The challenges of making a native extension</a> was originally published in <a href="https://medium.com/qlik-branch">Qlik Branch</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>