qExt v2

John Bellizzi
4 min readJul 14, 2020

--

Hey Qlik developers. I’ve made some updates to the qExt Qlik Development tool (github) and released a new major version (v2 🎉).

The full qExt documentation can be found here.

Building extensions with qExt

Working off of the original qExt Qlik extension development library, I’ve made some changes to make development easier. If you’re new to qExt, read on to see how it works, or if you want to learn how Qlik extensions work, follow this tutorial.

A smarter way to develop extensions

Qlik extensions are becoming increasingly popular as a way to implement custom visualizations within Qlik dashboards. If you’ve worked on building Qlik extensions in the past, you may know how difficult it can be to set up a development environment and deploy your extension to a Qlik server. qExt is a tool that helps with all of that. It includes bootstrapped templates to quickly spin up new extension projects, compiles your code with babel and webpack, and even deploys it to a Qlik server for you, eliminating the need to manually delete old extensions in the QMC just to upload a new one.

Starting a new extension project

To get started, you’ll need to install qExt

npm install -g qext

Next, use the command line to create a new extension

qext --create-extension my-extension --install

--create-extension tells qext we’re creating a new project with the name my-extension and --install will install all project dependencies

Updating your project

After creating the extension, you’ll see your project directory includes a src directory with all source project files.

in src/index.js you’ll find the root of the extension project. All extension properties are defined and imported from src/methods

Open the methods/paint.js file and add the following code

Now from a command line at the root of the project directory, run npm run build. qExt will bundle the code and place it in the dist folder. It also zips up the project so you can easily import it into the QMC.

Instead of manually importing it though, try using qExt to upload it to a Qlik server. Open up qext.config.json and add the “serverDeploy” section with the pertinent information

note: if the server has a self signed certificate, you’ll also need to add the allowSelfSignedSignature property within “serverDeploy” and set its value to true

Now run npm run deploy from the command line and enter the username and password of a Qlik user who has extension publishing privileges in the QMC. qExt will delete the extension from the QMC if it already exists and upload the built extension zip file from the dist directory.

You can find your extension in the custom objects/extensions section of an app in edit mode and check to see if it works. By default, the extension name defined in src/index.qext is qExt Template and that is what will display in the extensions section until you update the name in the index.qext file

One last feature to be aware of when using qExt is the watch script. Instead of running npm run build and npm run deploy every time you make a change to your code, you can instead run npm run watch-deploy once and qExt will continue to watch for any changes you make to your extension code, and then redeploy those updates to the Qlik server.

Updates

Since the original version of qExt, there have been a few important updates to take note of:

Authentication

As we demonstrated above, you can now have qExt authenticate against the server with a Qlik username and password instead of setting up header-authentication.

Header authentication config

Header authentication is still available if that’s your jam. qExt now has the option to also define a header name if it is different than the oft-used hdr-usr. More info on header authentication can be found in the docs here.

Alternate webpack configuration

qExt v2 now includes the option to provide your own alternate webpack configuration. You can install any special loaders that are need to make your extension run and define them in your own webpack.config.js file. To use an alternate webpack configuration, reference the compile docs here.

Reach out on GitHub if there are any issues or new features you would like to see, or give me a shoutout on Twitter

--

--