Getstarted - 24i/fokuson-developer-portal GitHub Wiki
Getting started
The Nordija Developer Program consist of 3 pillars.
- Access to source code. A repository with source code for all your Widgets. Updated every night
- Tools. Create -> Develop -> Build
- Documentation. Tutorials and Demo widgets
The main purpose of the this page is to give an introduction to the 3 pillars.
Source code
The standard way of receiving widgets from Nordija, is through prebuilt packages delivered on FTP, ready to be deployed on the fokusOn platform.
With NDP you get access to a customer specific GitHub repository with the source code behind those widgets. This repository is referred to as the Customer Repository or CR for short.
In the diagram below, the bottom half is the standard way of receiving widgets. You get all your widgets in a zip file on our FTP server.
In the top half is the NDP way of receiving the Nordija widgets. Here the source code for the widgets are committed to a customer specific read only repository. This is done every night.
The customer specific repository can then be forked by you and the widgets modified to your wishes. After the widgets has be modified they need to be build before they are ready to be deployed. This is explained in the tools sections below.
If Nordija updates a widget that you have modified, then you need to "follow master" in the CR and merge the Nordija changes into the widget if you wish to receive them.
NDP also contains a process for you submitting changes back to Nordija to be included in future versions of the widget.
As a member of the NDP you get your widgets delivered both on FTP and in the Customer Repository.

How to get your code back to Nordija
If you have created or changed code, skin or translations that you think is relevant for Nordija or others in upcoming versions of widgets, you can provide the change back to Nordija through a Pull Request (PR) on your customer repository.
The diagram below displays the flow of source code/widget from Nordija to you and back. The middle and lower part of the diagram is equal to the one on the Getting Started page.
To top shows the flow of a Pull Request from the Customer forked repository and back to the Customer repository. From the Customer repository Nordija will make a Pull Request and merge the changed code into the Nordija Widgets repository. From then on the future builds of the Nordija Widgets repository will contain the code changes both in the zip on the FTP and in the Customer repository.
Nordija has the right to decline any Pull Request made against a Customer repository.
Pull Requests with changes to only the customer skin and language file has a high likelihood of being accepted. Because the changes will not impact other Nordija customers.
Pull Request that change the javascript goes through a more rigid evaluation and with a lower likelihood of being accepted, because the change will impact other customers and the fokusOn roadmap. Still any bug fix or general improvement will be very welcomed.
Tools
Build
As mentioned in the "Source code" section the widget source code delivered in the Customer Repository need to be build before being ready to be deployed on fokusOn. The Customer Repository contains a build tool for that purpose. The documentation of the build tool can be found in the Readme.md file in the root of your Customer Repository.
Create
The Customer Repository also contains a widget creator script. This script can help you create a widget for different platformS and skins. This is done through a step by step guide.
The documentation of the widget creator script can be found in the Readme.md file in the root of the Cusotmer Repository.
Develop
NDP includes the WDK tool that Nordija uses internally to develop widgets. WDK enable you to load widgets from your local machine without first deploying them on a fokusOn installation. This is useful for fast turnaround while developing the widget. The diagram below explains that.
On the left side of the diagram you find the client, a device, e.g. a settop box, that can use a fokusOn backend.
On the right you find the fokusOn client-portal, the fokusOn backend. This can be any fokusOn client-portal that you can access, e.g. a test or production server, preferably a test sever.
In the center of the digram you find the WDK. The WDK consist of two parts. The first part is a web-server that serves widgets from your local machine. The second part is a proxy that handles splitting of the requests to the fokusOn backend or the local web-server, allowing you to "shadow" only the widgets you are modifying and serve the rest from the backend.

Documentation
We aim to provide you with enough documentation to build or modify the UI that is served from the fokusOn system.
We have split the documentation in to 3 groups.
- Api documentation
- Demo widgets repository
- Tutorials and How to's
Api documentation
We try to gather all the relevant documentation for the fokusOn components and services in one place.
The documentation can be found here
Tutorials and How to's
We are building a library of tutorials and How to's.
If you are missing a tutorial or have an idea for one. Then please rise an issue in the left menu under "Issues"
The tutorials can be found here
Demo widgets repository
With the NDP you get access to a repository with a set of demo widget.
The repository can be found here
