Developing your add-on

Getting started with add-on development

After having Set Up all the necessary tools and environments, you can start developing your add-on. The following steps will guide you through this process.

Before starting development, An excellent first step is to look at the available Recipes and Examples for inspiration or insight or the Marketplace to prevent you from reinventing the wheel.

Create a new add-on

Now that you have set up your development environment and decided on the add-on you want to develop, you can start creating your add-on. You will need to go to the developer portal and navigate to the "My Add-ons" page. You can do this by using the following link:

My Add-ons

Here, you can see all your add-ons. Click on the "Create new add-on" button to create a new add-on, which will give you the following prompt to fill in the details of your add-on:

When you have filled in the details of your add-on, click on the "Create" button to create your new add-on. You are then redirected to the add-on overview. You could already fill in the add-on details and information, but this is mainly important for the Publishing of your add-on.

The main point of interest here is under the code section and is the template download. This button will provide you with a template to start developing your add-on.

To make sure that your add-on file has all the mandatory elements, you can check the following recipe:

Important to note is that this standard format recipe is for side loading and add-on development. It has the additional context element of:

context.init();

This element needs to be called to make the add-on active via the developer tab inside eLab. When the add-on is Published to the marketplace, this is not needed anymore and must be removed from the code.

Developing your add-on

Now that you have downloaded the template and all the mandatory elements are present, you can start developing your add-on. We recommend using JavaScript for add-on development because the eLabNext SDK has been written in JavaScript. The eLabSDK1 and eLabSDK2 are the key components that allow you to integrate your functionality, add-on, or application with eLabNext.

Important to note here is that eLabSDK2 is the SDK run on the inventory V2 pages of eLaBNext. Inventory V2 is the new system being developed and will replace the current one. At the moment, inventory V2 is still in BETA. ELabSDK2 is also currently in BETA and might be subject to change without prior notice.

If you are developing an add-on for the (new) inventory, you should use eLabSDK2, with the exception of eLabSDK.API, which functions on all pages, including the new inventory. If you are developing an add-on for other parts of eLabNext, you should use eLabSDK1. If the add-on should have functionality for both the inventory and other parts of eLabNext, you should use both eLabSDK1 and eLabSDK2 and make use of the following recipe:

This recipe shows how you can use a check to see whether SDK2 is enabled on the current page and then how to automatically switch between SDK1 and SDK2 for the add-on.

The other powerful key component for developing your add-on is the eLabNext API. The eLabNext API is a RESTful API that allows you to interact with eLabNext and its data. This API is used to retrieve data from eLabNext, send data to eLabNext and to perform actions in eLabNext. As stated earlier, you can make API calls by using the eLabSDK.API.

With this, you should have all the tools to develop your add-on. If there is any functionality you want to see added or is missing at the moment, please don't hesitate to Contact Us. We are always looking for ways to improve our platform and are happy to help you with any questions or problems.