Skip to content
This repository has been archived by the owner on Jun 26, 2018. It is now read-only.

Nomenclature

Marc Streit edited this page Nov 4, 2017 · 3 revisions

Within the documentation and tutorials several terms are used. This section clarifies these terms and the relationship among them.

Plugin

A plugin is a Git repository containing multiple source code files (TypeScript, Python, SCSS). It is an independent unit that can be compiled and tested. A plugin usually depends on other plugins, for example the TDP core plugin.

Examples: tdp_dummy

TypeScript / Python file

TypeScript and Python are the main two programming languages in which Phovea and TDP are programmed. The frontend is implemented using TypeScript while the server backend using Python. Python was chosen because it is a common programming language among data scientists. TypeScript was chosen instead of JavaScript ES6 due to its typed style. In addition, since a dedicated compiler is checking the TypeScript files bugs can be avoided. As part of the language, each valid JavaScript code also valid TypeScript code. This ensure an easy transition.

SCSS file

SASS/SCSS is a language on top of CSS for styling HTML. Similar to TypeScript, every valid CSS clause is a valid SCSS clause. In addition, several features are added that simplifies the creation.

Application

An application is a special kind of plugin which provides a complete web application to the user. Applications are the end point to the user within the TDP platform and Phovea.

Examples: Ordino, Dashboard

Extension, Extension Point, and Registry

The core of Phovea and TDP is an flexible extension mechanism that allows plugin to register extensions to certain extension points. Other plugins can query the registry for all registered extensions of a given extension point. For example, the main extension point of TDP is “tdpView”. Plugins can register additional views using this extension point which are automatically listed in application without changing the application code itself.

Both concepts exists in frontend and backend side. Frontend extensions are registered within the “phovea.js” file. Backend extensions are registered within the “init.py” file of the plugin module. The Phovea Yeoman generator is a utility tool that helps developer to add extensions.

Examples: tdpView -> DummyView

Product

A product is a composition of plugins to a buildable unit of docker containers. Due to the flexible extension mechanism the actual set of plugins can be configured during build time. This allows to create different product configurations for different customers and usage scenarios. For example, one product of the Dashboard application may focus on the genes while the other on exploring tissues only. Through the extension mechanism the same Dashboard application can be used with modifications. The main configuration file is “phovea_product.json” that is listing all plugins this product is composed of. In addition, build scripts for diverse Continuous Integration environments are included that allow to build Docker containers out of product configuration.

Examples: Ordino Product

Docker container

The deployable unit of Phovea and TDP applications are Docker containers. Usually two docker container are forming a product. A frontend web Docker container hosting the compiled and optimized web application and a backend python Docker container hosting the Python backend. In addition, supporting docker containers are part of a deployment such as databases including MongoDB and Redis.

Workspace

Developing a project consisting of multiple plugins can be challenging to manage. A workspace is a folder on a developer machine containing several cloned plugins that are managed at once. Utility functions from the Phovea Yeoman generator simplify the creation and management of a workspace, for example by creating a workspace based on an existing product. In this case, each plugin of which is product is composed is cloned and locally prepared for development. Unless only a specific plugin is programmed it is highly recommended to use a workspace for the project. See also the tutorial on setting up a workspace: How to create a workspace